summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2018-01-12 17:25:31 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2018-01-13 07:13:07 +0700
commit3f182011e5da5b41b9bfa0e9c9731a266c859ef2 (patch)
treedfd03b0fc21b8a6bd79d4427e65940cca6dab5f8
parent96ddbc4aab55e371589c594e21dce6f41faedcbe (diff)
downloadslackbuilds-3f182011e5da5b41b9bfa0e9c9731a266c859ef2.tar.gz
slackbuilds-3f182011e5da5b41b9bfa0e9c9731a266c859ef2.tar.xz
graphics/psftools: Install sample fonts.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r--graphics/psftools/README3
-rw-r--r--graphics/psftools/psftools.SlackBuild36
2 files changed, 38 insertions, 1 deletions
diff --git a/graphics/psftools/README b/graphics/psftools/README
index 2f7a793322..c800979abc 100644
--- a/graphics/psftools/README
+++ b/graphics/psftools/README
@@ -18,3 +18,6 @@ font formats:
...and can also convert fonts to XBM, PBM, C source, and human-readable
text files. psftools can also merge font files together, and transform
them in various ways (scaling, flipping, adjusting the bounding box, etc).
+
+The package also includes few console fonts, taken from the open source
+release of the GEM operating system.
diff --git a/graphics/psftools/psftools.SlackBuild b/graphics/psftools/psftools.SlackBuild
index 072f82c211..baec0d652c 100644
--- a/graphics/psftools/psftools.SlackBuild
+++ b/graphics/psftools/psftools.SlackBuild
@@ -6,13 +6,17 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20180112 bkw:
+# - BUILD=2
+# - install the fonts that ship with the source, for use with the console.
+
# 20170712 bkw:
# - updated for v1.1.0
# - expand the README since it was a bit too terse
PRGNAM=psftools
VERSION=${VERSION:-1.0.10}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -73,6 +77,33 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
+# 20180112 bkw: install the example fonts that ship with the source.
+psfdir=$PKG/usr/share/kbd/consolefonts
+mkdir -p $psfdir
+
+# I thought to also convert to X fonts, but the results are unusable
+# because the fonts generated by psf2bdf need to be "tidied up" according
+# to the man page... and I don't know (or care enough to find out right
+# now) how to do this in a shell script. X font code left in place,
+# commented out, for reference:
+
+## pcfdir=$PKG/usr/share/fonts/misc
+## mkdir -p $pcfdir
+
+cd Fonts
+for fonttxt in *.txt; do
+ font="$( echo $fonttxt | sed 's,\.txt$,,' )"
+
+ # console font:
+ ../tools/txt2psf $fonttxt > $font.psfu
+ gzip -9c $font.psfu > $psfdir/$font.psfu.gz
+
+ ## # X font:
+ ## ../tools/psf2bdf --fontname=$font --iso10646 $font.psfu > $font.bdf
+ ## bdftopcf $font.bdf | gzip -9c > $pcfdir/$font.pcf.gz
+done
+cd -
+
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
@@ -84,5 +115,8 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+# X fonts would need this:
+## cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}