diff options
author | B. Watson <yalhcru@gmail.com> | 2017-12-20 23:47:48 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-12-21 08:19:32 +0700 |
commit | ff2725c7b0c28311abdfc5c1b77460863d74069e (patch) | |
tree | 619f8853c76e1b20e6f3cd7f9bd140765d97495e /graphics/hp2xx/hp2xx.SlackBuild | |
parent | b89af10eb3e885bf8ef78c8ee5ac100a3fc534be (diff) |
graphics/hp2xx: Added (vector graphics conversion).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'graphics/hp2xx/hp2xx.SlackBuild')
-rw-r--r-- | graphics/hp2xx/hp2xx.SlackBuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/graphics/hp2xx/hp2xx.SlackBuild b/graphics/hp2xx/hp2xx.SlackBuild new file mode 100644 index 0000000000000..8eebc71cecffd --- /dev/null +++ b/graphics/hp2xx/hp2xx.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for hp2xx + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=hp2xx +VERSION=${VERSION:-3.4.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +mkdir -p $PKG/usr/bin $PKG/usr/info $PKG/usr/man/man1 +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +sed -i "s,-O2 -g,$SLKCFLAGS," sources/Makefile + +# hp2xx hasn't been updated in over 10 years, and it's no longer +# compatible with newer versions of libpng (because it diddles the innards +# of the png structure, which have changed). For now, we just build without +# PNG support. If anyone has a burning desire to fix this, please do, +# and send me the patch. +sed -i '/^EX_.*[pP][nN][gG]/s,^,#,' sources/Makefile + +# Grr. +sed -i 's,@daveg,@@daveg,' doc/hp2xxinf.tex + +make prefix=/usr +make -j1 install prefix=$PKG/usr + +# binary is already stripped. + +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 $PKG/usr/info/$PRGNAM.info + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS CHANGES README TODO $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |