#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} PKG=$TMP/package-xlibs32 VERSION=2.4.2 export ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} DISTRO=${DISTRO:-slamd64} if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" fi if [ $DISTRO = slackware ]; then PKGARCH=$ARCH else PKGARCH=${ARCH}_${DISTRO} fi if [ $DISTRO = slamd64 ]; then LIBSUFFIX=${LIBSUFFIX:-64} else LIBSUFFIX=${LIBSUFFIX:-""} fi #rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf fontconfig-$VERSION tar xjvf $CWD/fontconfig-$VERSION.tar.bz2 cd fontconfig-$VERSION chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; 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 # Stepan Roh did such a marvelous job on getting the ball # rolling with should clearly (IMHO) be the default font: zcat $CWD/fontconfig.dejavu.diff.gz | patch -p1 --verbose || exit 1 # Hardcode the default font search path rather than having # fontconfig figure it out (and possibly follow symlinks, or # index ugly bitmapped fonts): zcat $CWD/fontconfig.font.dir.list.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=$FCPREFIX \ --libdir=$FCPREFIX/lib$LIBSUFFIX \ --mandir=/usr/man \ --sysconfdir=/etc \ --localstatedir=/var # Uses a currently non-functional sgml tool, thus '-i': make -i -j10 make -i install DESTDIR=$PKG # This ought to be easily found here, but it's still safer to move it: if [ ! -d $PKG/usr/lib$LIBSUFFIX/pkgconfig ]; then mkdir -p $PKG/usr/lib$LIBSUFFIX/pkgconfig mv ${PKG}${FCPREFIX}/lib$LIBSUFFIX/pkgconfig/* $PKG/usr/lib$LIBSUFFIX/pkgconfig rmdir ${PKG}${FCPREFIX}/lib$LIBSUFFIX/pkgconfig fi ( cd $PKG rm -rf usr/bin etc find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null )