#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} PKG=$TMP/package-fontconfig VERSION=2.2.3 export ARCH=${ARCH:-x86_64} BUILD=${BUILD:-5} 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 rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf fontconfig-$VERSION tar xjf $CWD/fontconfig-$VERSION.tar.bz2 cd fontconfig-$VERSION zcat $CWD/fontconfig.dejavu.diff.gz | patch -p1 --verbose 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 {} \; # This should remain in /usr/X11R6/ until the X.Org --prefix # is changed to /usr. Fair warning. ;-) FCPREFIX=/usr CFLAGS=$SLKCFLAGS \ ./configure \ --prefix=$FCPREFIX \ --libdir=$FCPREFIX/lib64 \ --sysconfdir=/etc # Uses some obscure sgml tool... thanks a bunch. make -i make -i install DESTDIR=$PKG 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 #mv $PKG/etc/fonts/local.conf $DESTDIR/etc/fonts/local.conf.new rm -f $PKG/etc/fonts/local.conf mkdir -p $PKG/var/log/setup cat $CWD/setup.05.fontconfig > $PKG/var/log/setup/setup.05.fontconfig chmod 755 $PKG/var/log/setup/setup.05.fontconfig ( cd $PKG 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 ) # Fix manpages: if [ -d ${PKG}${FCPREFIX}/man ]; then ( cd ${PKG}${FCPREFIX}/man for manpagedir in $(find . -type d -name "man*") ; do ( cd $manpagedir for eachpage in $( find . -type l -maxdepth 1) ; do ln -s $( readlink $eachpage ).gz $eachpage.gz rm $eachpage done gzip -9 *.? ) done ) fi mkdir $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat << EOF >> $PKG/install/doinst.sh #!/bin/sh # Update the X font indexes: if [ -x /usr/X11R6/bin/fc-cache ]; then /usr/X11R6/bin/fc-cache -f fi # else we'll catch it later with setup.fontconfig :-) # make links: EOF cd $PKG makepkg -l y -c n $TMP/fontconfig-$VERSION-$ARCH-$BUILD.tgz