diff options
author | B. Watson <yalhcru@gmail.com> | 2020-06-22 20:05:16 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-06-28 08:16:47 +0700 |
commit | 48e6dcca3baf0f1afe11bbda3126ca656233dc27 (patch) | |
tree | fcafed0f0fd28447e33762390b279d539ee2ab3b /system/ttf-ancient-fonts/ttf-ancient-fonts.SlackBuild | |
parent | 99eeed3b5c448a184a96e9ad4bfe6bcfb4f46cba (diff) |
system/ttf-ancient-fonts: Added (Unicode fonts for ancient scripts)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/ttf-ancient-fonts/ttf-ancient-fonts.SlackBuild')
-rw-r--r-- | system/ttf-ancient-fonts/ttf-ancient-fonts.SlackBuild | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/system/ttf-ancient-fonts/ttf-ancient-fonts.SlackBuild b/system/ttf-ancient-fonts/ttf-ancient-fonts.SlackBuild new file mode 100644 index 0000000000000..f01844ad7e75d --- /dev/null +++ b/system/ttf-ancient-fonts/ttf-ancient-fonts.SlackBuild @@ -0,0 +1,89 @@ +#!/bin/sh + +# Slackware build script for ttf-ancient-fonts + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Notes to self (or anyone else who cares): + +# The tarball includes both hinted and unhinted versions of the fonts. The +# Debian package installs <font>.ttf and <font>_hint.ttf for all the +# fonts. However, if I do this, it's impossible to select the _hint +# versions in any application (because the TTF names conflict). Since +# it's possible to disable hinting in fontconfig or specific apps, +# I'm only going to include the _hint versions here by default. User +# can override with HINTS=no. The .otf fonts only come in one variety, +# so they're always installed as-is. + +# There are newer versions of these fonts at https://dn-works.com/ufas/ +# but they're under what I consider a ludicrously restrictive license, +# so I'm not going to touch them with a 10 foot pole. The symbola-font-ttf +# package is the restrictive version, so I've made it possible to include +# the older (free-to-use) Symbola here, though it's not the default. + +# There's no documentation in the tarball, so I borrow it from Debian. +# There's no license info in the tarball, and neither the original site +# nor web.archive.org still has has the "un-Debianized" zip files that +# presumably included the licenses, so I'm including Debian's copyright +# file that asserts these fonts are "free for any use". + +PRGNAM=ttf-ancient-fonts +VERSION=${VERSION:-2.60} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +HINTS="${HINTS:-yes}" + +# If the user requested unhinted fonts, don't even bother to extract +# the hinted versions. +[ "$HINTS" != "yes" ] && UN=un && TAROPT="--exclude=*_hint.ttf" + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION.orig +tar xvf $CWD/${PRGNAM}_$VERSION.orig.tar.xz $TAROPT +cd $PRGNAM-$VERSION.orig +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +HAS_SYMBOLA=yes +[ "${SYMBOLA:-no}" = "no" ] && rm -f Symbola* && HAS_SYMBOLA=no + +# If we're doing hinted fonts, get rid of the unhinted ones. I can't think +# of a sane way to avoid extracting them in the first place... +[ "$HINTS" = "yes" ] && /bin/ls *.ttf | grep -v _hint | xargs rm -f + +for i in TTF OTF; do + mkdir -p $PKG/usr/share/fonts/$i + install -m0644 *.$( echo $i | tr A-Z a-z) $PKG/usr/share/fonts/$i +done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +for i in README.debian copyright.debian; do + cat $CWD/$i > $PKG/usr/doc/$PRGNAM-$VERSION/$i +done +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +sed "s,@UN@,$UN," $CWD/slack-desc > $PKG/install/slack-desc +if [ "$HAS_SYMBOLA" = "yes" ]; then + sed -i \ + '17s/$/ This package includes the Symbola font, and will conflict with symbola-font-ttf/' \ + $PKG/install/slack-desc +fi +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |