|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2008-2010,2011,2012,2013 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2008-2013,2015 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -23,15 +23,13 @@
|
|
|
|
|
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
|
|
|
|
# |
|
|
|
|
# Latest fontforge sourcecode is available at: |
|
|
|
|
# <http://fontforge.sourceforge.net/>. |
|
|
|
|
# <http://github.com/fontforge/>. |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-fontforge_full} |
|
|
|
|
VERSION=${VERSION:-20120731} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-b.tar.bz2} |
|
|
|
|
DOCSRC=${DOCS:-fontforge_htdocs-20120731-b.tar.bz2} |
|
|
|
|
BASEURL=${BASEURL:-http://downloads.sourceforge.net/fontforge} |
|
|
|
|
FREETYPE=${FREETYPE:-freetype-2.5.0.1.tar.xz} |
|
|
|
|
NAMESRC=${NAMESRC:-fontforge} |
|
|
|
|
VERSION=${VERSION:-20150612} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://github.com/fontforge/fontforge/releases/download/$VERSION/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-fontforge} |
|
|
|
@ -75,18 +73,10 @@ esac
|
|
|
|
|
|
|
|
|
|
# Get and verify the source and documentation archives |
|
|
|
|
if [ ! -r $ARCHIVE ]; then |
|
|
|
|
wget -c -O $ARCHIVE.part "$BASEURL/$ARCHIVE" |
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
|
fi |
|
|
|
|
if [ ! -r $DOCSRC ]; then |
|
|
|
|
wget -c -O $DOCSRC.part "$BASEURL/$DOCSRC" |
|
|
|
|
mv $DOCSRC.part $DOCSRC |
|
|
|
|
fi |
|
|
|
|
if [ ! -r $FREETYPE ]; then |
|
|
|
|
wget -c -O $FREETYPE.part "ftp://ftp.lip6.fr/pub/linux/distributions/slackware/slackware-14.1/source/l/freetype/$FREETYPE" |
|
|
|
|
mv $FREETYPE.part $FREETYPE |
|
|
|
|
fi |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 $DOCSRC.sha1 $FREETYPE.sha1 |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
@ -94,32 +84,21 @@ cd $TMP
|
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
mkdir htdocs |
|
|
|
|
tar xf $CWD/$DOCSRC --directory htdocs |
|
|
|
|
tar xf $CWD/$FREETYPE |
|
|
|
|
./bootstrap |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=/usr \ |
|
|
|
|
--libdir=/usr/lib$LIBDIRSUFFIX \ |
|
|
|
|
--mandir=/usr/man \ |
|
|
|
|
--enable-libff \ |
|
|
|
|
--enable-type3 \ |
|
|
|
|
--enable-devicetables \ |
|
|
|
|
--enable-pyextension \ |
|
|
|
|
--with-freetype-src=$(pwd)/${FREETYPE%.tar.*} |
|
|
|
|
--mandir=/usr/man |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install DESTDIR=$PKG docdir=/usr/doc/$NAMEPKG-$VERSION/html |
|
|
|
|
|
|
|
|
|
# Strip binaries |
|
|
|
|
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
|
|
xargs strip --strip-unneeded 2> /dev/null |
|
|
|
|
make install-strip DESTDIR=$PKG docdir=/usr/doc/$NAMEPKG-$VERSION/html |
|
|
|
|
|
|
|
|
|
# Compress man pages |
|
|
|
|
find $PKG/usr/man -type f -exec gzip -9 '{}' \; |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
install -m 644 AUTHORS LICENSE README-unix $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
install -m 644 AUTHORS CONTRIBUTING.md COPYING.gplv3 LICENSE README.md $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|