summaryrefslogtreecommitdiffstats
path: root/source.local/x/fontconfig/fontconfig.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/x/fontconfig/fontconfig.SlackBuild')
-rwxr-xr-xsource.local/x/fontconfig/fontconfig.SlackBuild89
1 files changed, 55 insertions, 34 deletions
diff --git a/source.local/x/fontconfig/fontconfig.SlackBuild b/source.local/x/fontconfig/fontconfig.SlackBuild
index 1e2ab2e..6be1e10 100755
--- a/source.local/x/fontconfig/fontconfig.SlackBuild
+++ b/source.local/x/fontconfig/fontconfig.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,42 +20,43 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+# Modified 2013 by Eric Hameleers <alien at slackware.com> for ARM port.
PKGNAM=fontconfig
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.10.2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:-" -j7 "}
-# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
-if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ # 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
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
fi
case "$ARCH" in
@@ -93,20 +94,36 @@ zcat $CWD/fontconfig.dejavu.diff.gz | patch -p1 --verbose || exit 1
# index ugly bitmapped fonts):
zcat $CWD/fontconfig.font.dir.list.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+# Upstream patch to fix 10-autohint.conf:
+zcat $CWD/fontconfig.10.autohint.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
CFLAGS=$SLKCFLAGS \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--sysconfdir=/etc \
+ --with-templatedir=/etc/fonts/conf.avail \
+ --with-baseconfigdir=/etc/fonts \
+ --with-configdir=/etc/fonts/conf.d \
+ --with-xmldir=/etc/fonts \
--localstatedir=/var \
- --disable-docs \
+ --enable-static=no \
--build=$TARGET
# Uses a currently non-functional sgml tool, thus '-i':
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Upstream has changed the default templatedir to /usr/share/fontconfig/conf.avail.
+# This change, if accepted, would break any existing font package containing a
+# conf.avail directory. The safest thing to do is to keep things in the
+# traditional location, but put a link in the new place so that font packages
+# following the new standard location will work. Let's hear it for being
+# "more correct" at the expense of having things "just work"!
+mkdir -p $PKG/usr/share/fontconfig
+( cd $PKG/usr/share/fontconfig ; ln -sf /etc/fonts/conf.avail . )
+
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* INSTALL NEWS README \
@@ -133,7 +150,6 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
# Set up the default options in /etc/fonts/conf.d:
( cd $PKG/etc/fonts/conf.d
for fontconf in \
- 20-fix-globaladvance.conf \
20-unhint-small-vera.conf \
30-urw-aliases.conf \
30-metric-aliases.conf \
@@ -148,7 +164,12 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
69-unifont.conf \
80-delicious.conf \
90-synthetic.conf ; do
- ln -sf ../conf.avail/$fontconf . || exit 1
+ if [ -r ../conf.avail/$fontconf ]; then
+ ln -sf ../conf.avail/$fontconf .
+ else
+ echo "ERROR: unable to symlink ../conf.avail/$fontconf, file does not exist."
+ exit 1
+ fi
done
if [ ! $? = 0 ]; then
exit 1
@@ -179,5 +200,5 @@ 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/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n --prepend $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz