diff options
Diffstat (limited to 'source/l/t1lib/t1lib.SlackBuild')
-rwxr-xr-x | source/l/t1lib/t1lib.SlackBuild | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/source/l/t1lib/t1lib.SlackBuild b/source/l/t1lib/t1lib.SlackBuild index d192e1cd..86002a21 100755 --- a/source/l/t1lib/t1lib.SlackBuild +++ b/source/l/t1lib/t1lib.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,11 +21,19 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=5.1.2 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-1} +PKGNAM=t1lib +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-2} -NUMJOBS=${NUMJOBS:-" -j7 "} +# 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" @@ -38,6 +46,8 @@ elif [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" fi +NUMJOBS=${NUMJOBS:-" -j7 "} + CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-t1lib @@ -49,6 +59,16 @@ rm -rf t1lib-$VERSION tar xvf $CWD/t1lib-$VERSION.tar.?z* || exit 1 cd t1lib-$VERSION +# Apply Debian's patch since upstream seems inactive: +zcat $CWD/t1lib_5.1.2-3.diff.gz | patch -p1 --verbose || exit 1 + +# I don't think anyone is applying this first one: +#cat debian/patches/segfault.diff -b -z .segf | patch -p1 --verbose || exit 1 +# UUOCFTW: +cat debian/patches/no-config.diff | patch -p1 --verbose || exit 1 +cat debian/patches/no-docs.diff | patch -p1 --verbose || exit 1 +cat debian/patches/lib-cleanup.diff | patch -p1 --verbose || exit 1 + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -72,13 +92,11 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/*.so mkdir -p $PKG/usr/doc/t1lib-$VERSION -mv $PKG/usr/share/t1lib/doc/t1lib_doc.ps $PKG/usr/doc/t1lib-$VERSION -gzip -9 $PKG/usr/doc/t1lib-$VERSION/t1lib_doc.ps -rm -r $PKG/usr/share/t1lib/doc cp -a \ - Changes LGPL LICENSE README* \ + Change* COPYING* *GPL* LICENSE* README* \ $PKG/usr/doc/t1lib-$VERSION +mkdir -p $PKG/usr/share/t1lib cp -a Fonts $PKG/usr/share/t1lib /bin/ls $PKG/usr/share/t1lib/Fonts/afm/*.afm /usr/share/fonts/Type1/*.afm | sort | uniq | wc -l | sed -e 's/ //g' > $PKG/usr/share/t1lib/FontDataBase ( cd $PKG/usr/share/t1lib/Fonts/afm ; /bin/ls *.afm ; cd /usr/share/fonts/Type1 ; /bin/ls *.afm ) | sort | uniq >> $PKG/usr/share/t1lib/FontDataBase @@ -106,3 +124,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $TMP/t1lib-$VERSION-$ARCH-$BUILD.txz + |