diff options
Diffstat (limited to 'source/x/fontconfig/fontconfig.SlackBuild')
-rwxr-xr-x | source/x/fontconfig/fontconfig.SlackBuild | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/source/x/fontconfig/fontconfig.SlackBuild b/source/x/fontconfig/fontconfig.SlackBuild index 4714b824..5feb6fd9 100755 --- a/source/x/fontconfig/fontconfig.SlackBuild +++ b/source/x/fontconfig/fontconfig.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,10 +21,20 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=2.6.0 -export ARCH=${ARCH:-x86_64} +VERSION=${VERSION:-$(echo fontconfig-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +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 + NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-2} CWD=$(pwd) TMP=${TMP:-/tmp} @@ -39,6 +49,9 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi rm -rf $PKG @@ -46,7 +59,7 @@ mkdir -p $TMP $PKG cd $TMP rm -rf fontconfig-$VERSION -tar xvf $CWD/fontconfig-$VERSION.tar.bz2 || exit 1 +tar xvf $CWD/fontconfig-$VERSION.tar.?z* || exit 1 cd fontconfig-$VERSION chown -R root:root . find . \ @@ -55,8 +68,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -FCPREFIX=/usr - # The wonderful extended version of the font so generously # opened up for free modification and distribution by one # for the previously proprietary font founderies, and that @@ -71,30 +82,32 @@ zcat $CWD/fontconfig.font.dir.list.diff.gz | patch -p1 --verbose --backup --suff CFLAGS=$SLKCFLAGS \ ./configure \ - --prefix=$FCPREFIX \ - --libdir=$FCPREFIX/lib${LIBDIRSUFFIX} \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --sysconfdir=/etc \ - --localstatedir=/var + --localstatedir=/var \ + --build=$ARCH-slackware-linux # Uses a currently non-functional sgml tool, thus '-i': make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -# This ought to be easily found here, but it's still safer to move it: -if [ ! -d $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig ]; then - mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig - mv ${PKG}${FCPREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/* $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig - rmdir ${PKG}${FCPREFIX}/lib${LIBDIRSUFFIX}/pkgconfig -fi - mkdir -p $PKG/usr/doc/fontconfig-$VERSION cp -a \ AUTHORS COPYING* INSTALL NEWS README \ $PKG/usr/doc/fontconfig-$VERSION # You can shop for this kind of stuff in the source tarball. -rm -rf ${PKG}${FCPREFIX}/share/doc -rmdir ${PKG}${FCPREFIX}/share +rm -rf $PKG/usr/share/doc +rmdir $PKG/usr/share 2>/dev/null + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi mkdir -p $PKG/var/log/setup cat $CWD/setup.05.fontconfig > $PKG/var/log/setup/setup.05.fontconfig @@ -133,8 +146,8 @@ if [ ! $? = 0 ]; then fi # Fix manpages: -if [ -d ${PKG}${FCPREFIX}/man ]; then - ( cd ${PKG}${FCPREFIX}/man +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man for manpagedir in $(find . -type d -name "man*") ; do ( cd $manpagedir for eachpage in $( find . -type l -maxdepth 1) ; do @@ -148,16 +161,8 @@ if [ -d ${PKG}${FCPREFIX}/man ]; then fi mkdir $PKG/install -cat << EOF >> $PKG/install/doinst.sh -#!/bin/sh -# Update the X font indexes: -if [ -x /usr/bin/fc-cache ]; then - /usr/bin/fc-cache -f -fi -# else we'll catch it later with setup.fontconfig :-) -# make links: -EOF cat $CWD/slack-desc > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $TMP/fontconfig-$VERSION-$ARCH-$BUILD.txz |