summaryrefslogtreecommitdiffstats
path: root/fontforge
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2012-03-25 11:50:42 +0000
committer Eric Hameleers <alien@slackware.com>2012-03-25 11:50:42 +0000
commit7ee44e321b5d3a190fec31a7ae6048cb3af9f491 (patch)
treea6edefd9964192301ce195caf4166e0977f216e0 /fontforge
parent187390d32a60c73df2f739dc864a1e8f522ee71d (diff)
downloadasb-7ee44e321b5d3a190fec31a7ae6048cb3af9f491.tar.gz
asb-7ee44e321b5d3a190fec31a7ae6048cb3af9f491.tar.xz
Update to 20110222
Diffstat (limited to 'fontforge')
-rwxr-xr-xfontforge/build/fontforge.SlackBuild89
1 files changed, 43 insertions, 46 deletions
diff --git a/fontforge/build/fontforge.SlackBuild b/fontforge/build/fontforge.SlackBuild
index 1c00a4c2..325d109b 100755
--- a/fontforge/build/fontforge.SlackBuild
+++ b/fontforge/build/fontforge.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2006-2010 Eric Hameleers, Eindhoven, NL
+# Copyright 2006-2012 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -54,6 +54,8 @@
# * Update.
# 20100501-1: 29/may/2010 by Eric Hameleers <alien@slackware.com>
# * Update.
+# 20110222-1: 25/mar/2012 by Eric Hameleers <alien@slackware.com>
+# * Update. Automatically download and use freetype library.
#
# Run 'sh fontforge.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -62,23 +64,21 @@
# -----------------------------------------------------------------------------
PRGNAM=fontforge
-VERSION=${VERSION:-20100501}
+VERSION=${VERSION:-20110222}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
+FREETYPE=${FREETYPE:-2.4.9}
+
DOCS="AUTHORS LICENSE README-unix VERSION"
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
-# Fontforge can use the Freetype sources for better TTF font support.
+# Fontforge uses the Freetype sources for better TTF font support.
# Additionally, Fontforge can enable the bytecode interpreter (this can lead to
# patent issues in certain countries if you distribute the resulting binaries).
-# Just make sure you extract the freetype sourcecode into the current directory
-# and rename the top-directory to 'freetype'. Or else, change the value of
-# FREETYPE_DIR below to the proper name.
# Set USE_BYTECODE="YES" in order to enable the bytecode interpreter.
-FREETYPE_DIR="$SRCDIR/freetype"
USE_BYTECODE=${USE_BYTECODE:-"NO"}
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
@@ -92,17 +92,22 @@ SRCURL[0]="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}_full-${VERSION}.
SOURCE[1]="$SRCDIR/cidmaps.tgz"
SRCURL[1]="http://fontforge.sourceforge.net/cidmaps.tgz"
+SOURCE[2]="$SRCDIR/freetype-${FREETYPE}.tar.gz"
+SRCURL[2]="http://downloads.sourceforge.net/freetype/freetype-${FREETYPE}.tar.gz"
+
##
## --- with a little luck, you won't have to edit below this point --- ##
##
# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
+ 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=$( uname -m ) ;;
+ *) export ARCH=$MARCH ;;
esac
fi
@@ -113,11 +118,19 @@ case "$ARCH" in
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
*) SLKCFLAGS="-O2"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
esac
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
@@ -141,19 +154,20 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
# Source file availability:
for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
if ! [ -f ${SOURCE[$i]} ]; then
+ echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
+ if [ -f ${SOURCE[$i]} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL[$i]}" == "x" ]; then
- # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
- echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
echo "Will download file to $(dirname $SOURCE[$i])"
wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true
if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then
- echo "Downloading '$(basename ${SOURCE[$i]})' failed.. aborting the build."
+ echo "Fail to download '$(basename ${SOURCE[$i]})'. Aborting the build."
mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL
exit 1
fi
else
- echo "File '$(basename ${SOURCE[$i]})' not available.. aborting the build."
+ echo "File '$(basename ${SOURCE[$i]})' not available. Aborting the build."
exit 1
fi
fi
@@ -170,20 +184,6 @@ echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"
-# Check if directory with freetype source exists. If so, use it;
-if [ -d ${FREETYPE_DIR} ]; then
- echo ">>> Using freetype source in '$FREETYPE_DIR'"
- FREETYPE_OPTS="--with-freetype-src=${FREETYPE_DIR}"
-else
- echo ">>> NOT using freetype source in '$FREETYPE_DIR' (missing)"
- FREETYPE_OPTS=""
-fi
-# Use bytecode interpreter?
-if [ "$USE_BYTECODE" == "YES" -a "x$FREETYPE_OPTS" != "x" ]; then
- echo ">>> Enabling freetype's byte code interpreter."
- FREETYPE_OPTS="$FREETYPE_OPTS --with-freetype-bytecode"
-fi
-
# Explode the package framework:
if [ -f $SRCDIR/_$PRGNAM.tar.gz ]; then
cd $PKG
@@ -197,16 +197,20 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
tar -xvf ${SOURCE[$i]}
done
+# Define the freetype related options:
+FREETYPE_OPTS="--with-freetype-src=$TMP/tmp-$PRGNAM/freetype-${FREETYPE}"
+
+# Use bytecode interpreter?
+if [ "$USE_BYTECODE" == "YES" -a "x$FREETYPE_OPTS" != "x" ]; then
+ echo ">>> Enabling freetype's byte code interpreter."
+ FREETYPE_OPTS="$FREETYPE_OPTS --with-freetype-bytecode"
+fi
+
# Read README-unix for the 'why' of the cidmaps:
mkdir ${PRGNAM}-${VERSION}/cidmap
mv *.cidmap ${PRGNAM}-${VERSION}/cidmap/
cd ${PRGNAM}-${VERSION}
-
-## Support new libpng14:
-#cat $SRCDIR/fontforge_png14.diff | patch -p1 --verbose \
-# tee $OUTPUT/patch-${PRGNAM}.log
-
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .
@@ -227,24 +231,17 @@ CXXFLAGS="$SLKCFLAGS" \
${FREETYPE_OPTS} \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux \
+ --build=$TARGET \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
# Using this, the man pages go into the root instead of $PKG
# --mandir=/usr/man \
+
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
# Install all the needed stuff to the package dir
mkdir -p $PKG/usr/{bin,lib${LIBDIRSUFFIX},man,share}
-
-# Use installwatch if available, to produce a logfile of the installation
-# process that is more easily readable:
-if $(which installwatch > /dev/null 2>&1); then
- installwatch -o $OUTPUT/install-${PRGNAM}.log \
- make prefix=$PKG/usr libdir=$PKG/usr/lib${LIBDIRSUFFIX} install
-else
- make prefix=$PKG/usr libdir=$PKG/usr/lib${LIBDIRSUFFIX} install \
- 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
-fi
+make prefix=$PKG/usr libdir=$PKG/usr/lib${LIBDIRSUFFIX} install \
+ 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION