summaryrefslogtreecommitdiff
path: root/source/l/gtk+
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/gtk+')
-rwxr-xr-xsource/l/gtk+/gtk+.SlackBuild27
1 files changed, 20 insertions, 7 deletions
diff --git a/source/l/gtk+/gtk+.SlackBuild b/source/l/gtk+/gtk+.SlackBuild
index 8133e2da..8ac39412 100755
--- a/source/l/gtk+/gtk+.SlackBuild
+++ b/source/l/gtk+/gtk+.SlackBuild
@@ -22,11 +22,20 @@
PKGNAM=gtk+
-VERSION=${VERSION:-1.2.10}
-ARCH=${ARCH:-x86_64}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-5}
+# 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
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -43,11 +52,14 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION
bzcat $CWD/gtk+1.2_1.2.10-18.diff.bz2 | patch -p1 --verbose || exit 1
@@ -61,7 +73,8 @@ find . \
-exec chmod 644 {} \;
# The original config.{guess,sub} do not work on x86_64
-cp -p /usr/share/libtool/config.{guess,sub} .
+#cp /usr/share/libtool/config.{guess,sub} . # libtool-1.x
+cp /usr/share/libtool/config/config.{guess,sub} . # libtool-2.x
# Configure:
CFLAGS="$SLKCFLAGS" \
@@ -110,8 +123,8 @@ fi
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- ABOUT-NLS AUTHORS COPYING HACKING INSTALL NEWS \
- README README.cvs-commits TODO \
+ ABOUT-NLS AUTHORS COPYING* HACKING INSTALL NEWS \
+ README* TODO \
$PKG/usr/doc/${PKGNAM}-$VERSION
mkdir -p $PKG/install