|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2008-2013,2015,2016,2019 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2008-2013,2015,2016,2019,2020 Damien Goutte-Gattat |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
# is permitted provided that the following conditions are met: |
|
|
@ -27,8 +27,8 @@ |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-fontforge} |
|
|
|
VERSION=${VERSION:-20190801} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
VERSION=${VERSION:-20200314} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.xz} |
|
|
|
WGET=${WGET:-https://github.com/fontforge/fontforge/releases/download/$VERSION/$ARCHIVE} |
|
|
|
|
|
|
|
# Build infos |
|
|
@ -84,26 +84,33 @@ cd $TMP |
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
cd $NAME |
|
|
|
mkdir build && cd build |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
./configure \ |
|
|
|
--prefix=/usr \ |
|
|
|
--libdir=/usr/lib$LIBDIRSUFFIX \ |
|
|
|
--mandir=/usr/man \ |
|
|
|
--disable-static \ |
|
|
|
--enable-python-scripting=3 \ |
|
|
|
--enable-gdk=yes \ |
|
|
|
--without-libuninameslist \ |
|
|
|
--disable-dependency-tracking \ |
|
|
|
--build=$ARCH-slackware-linux |
|
|
|
make -j $JOBS |
|
|
|
make install-strip DESTDIR=$PKG docdir=/usr/doc/$NAMEPKG-$VERSION/html |
|
|
|
cmake -GNinja \ |
|
|
|
-DCMAKE_BUILD_TYPE=Release \ |
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \ |
|
|
|
-DCMAKE_INSTALL_MANDIR=/usr/man \ |
|
|
|
-DENABLE_FONTFORGE_EXTRAS=ON \ |
|
|
|
-DENABLE_LIBSPIRO=OFF \ |
|
|
|
-DENABLE_LIBUNINAMESLIST=OFF \ |
|
|
|
-DENABLE_DOCS=OFF \ |
|
|
|
.. |
|
|
|
ninja -j $JOBS |
|
|
|
DESTDIR=$PKG ninja install |
|
|
|
cd .. |
|
|
|
|
|
|
|
# Strip binaries |
|
|
|
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
|
xargs strip --strip-unneeded 2> /dev/null |
|
|
|
|
|
|
|
# Compress man pages |
|
|
|
find $PKG/usr/man -type f -exec gzip -9 '{}' \; |
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
install -m 644 AUTHORS COPYING.gplv3 LICENSE $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
install -m 644 AUTHORS CONTRIBUTING.md COPYING.gplv3 LICENSE README.md \ |
|
|
|
$PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
|
|
|
# Copy slack-desc and file doinst.sh files |
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|