diff options
Diffstat (limited to 'source/x/xaw3d/xaw3d.SlackBuild')
-rwxr-xr-x | source/x/xaw3d/xaw3d.SlackBuild | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/source/x/xaw3d/xaw3d.SlackBuild b/source/x/xaw3d/xaw3d.SlackBuild index 2991fe7a..1574d7f3 100755 --- a/source/x/xaw3d/xaw3d.SlackBuild +++ b/source/x/xaw3d/xaw3d.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,11 +21,20 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=${VERSION:-1.5E} -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} +PKGNAM=xaw3d +VERSION=${VERSION:-20110415git} BUILD=${BUILD:-1} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -37,6 +46,8 @@ elif [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" fi +NUMJOBS=${NUMJOBS:-" -j7 "} + CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-xaw3d @@ -44,11 +55,9 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP -rm -rf $TMP/xc -tar xvf $CWD/Xaw3d-$VERSION.tar.gz || exit 1 -( cd xc ; zcat $CWD/Xaw3d-$VERSION.diff.gz | patch -p2 --verbose --backup --suffix=.orig ) -( cd xc ; zcat $CWD/Xaw3d-1.5-debian-fixes.diff.gz | patch -p2 --verbose --backup --suffix=.orig ) -cd xc +rm -rf $TMP/xaw3d-$VERSION +tar xvf $CWD/xaw3d-$VERSION.tar.?z* || exit 1 +cd xaw3d-$VERSION/xc || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -60,35 +69,19 @@ cd lib/Xaw3d ln -s .. X11 xmkmf make CCOPTIONS="$SLKCFLAGS -I." || exit 1 -strip --strip-unneeded libXaw3d.so.8.0 -mkdir -p $PKG/usr/lib${LIBDIRSUFFIX} -cat libXaw3d.so.8.0 > $PKG/usr/lib${LIBDIRSUFFIX}/libXaw3d.so.8.0 -chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libXaw3d.so.8.0 -# Make compat symlinks: +make install DESTDIR=$PKG + +strip --strip-unneeded $PKG/usr/lib${LIBDIRSUFFIX}/libXaw3d.so.* +# Make compat symlinks. For whatever reason, Xaw3d has had more random +# numbers assigned to it over the years than about anything, so we need +# to make links that work for at least .6 and .8 in addition to .7. ( cd $PKG/usr/lib${LIBDIRSUFFIX} - ln -sf libXaw3d.so.8.0 libXaw3d.so.8 - ln -sf libXaw3d.so.8 libXaw3d.so - ln -sf libXaw3d.so.8 libXaw3d.so.7 + ln -sf libXaw3d.so.7 libXaw3d.so.8 ln -sf libXaw3d.so.7 libXaw3d.so.6 ) mkdir -p $PKG/usr/doc/Xaw3d-$VERSION cp -a README.XAW3D $PKG/usr/doc/Xaw3d-$VERSION chmod 644 $PKG/usr/doc/Xaw3d-$VERSION/README.XAW3D -mkdir -p $PKG/usr/include/X11/Xaw3d -for header in AllWidgets.h AsciiSink.h AsciiSinkP.h AsciiSrc.h AsciiSrcP.h \ -AsciiText.h AsciiTextP.h Box.h BoxP.h Cardinals.h Command.h CommandP.h \ -Dialog.h DialogP.h Form.h FormP.h Grip.h GripP.h Label.h LabelP.h Layout.h \ -LayoutP.h List.h ListP.h MenuButton.h MenuButtoP.h MultiSrc.h MultiSrcP.h \ -MultiSink.h MultiSinkP.h Paned.h PanedP.h Panner.h PannerP.h Porthole.h \ -PortholeP.h Repeater.h RepeaterP.h Reports.h Scrollbar.h ScrollbarP.h \ -Simple.h SimpleP.h SimpleMenu.h SimpleMenP.h Sme.h SmeP.h SmeBSB.h SmeBSBP.h \ -SmeLine.h SmeLineP.h SmeThreeD.h SmeThreeDP.h StripChart.h StripCharP.h \ -Template.c Template.h TemplateP.h Text.h TextP.h TextSink.h TextSinkP.h \ -TextSrc.h TextSrcP.h ThreeD.h ThreeDP.h Tip.h TipP.h Toggle.h ToggleP.h Tree.h \ -TreeP.h VendorEP.h Viewport.h ViewportP.h Xaw3dP.h XawImP.h XawInit.h ; do - cp -a $header $PKG/usr/include/X11/Xaw3d/$header - chmod 644 $PKG/usr/include/X11/Xaw3d/$header -done mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |