aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorTomasz Bywalec <t.bywalec@gmail.com>2019-06-05 22:18:44 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-06-09 05:31:21 +0700
commit642828d7c7b77b4715af6c0204bfbadc95a25e6d (patch)
treebc20bd1f38bc3e653c81ea02f245273d40e057ab /system
parent34d06147b5b79ea699eef057425e49a1cc434868 (diff)
system/gnu-unifont: Updated for version 12.1.02.
Also: * Remove bashisms when checking FONTFORMATS var * Print error message if no font format has been selected Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/gnu-unifont/gnu-unifont.SlackBuild28
-rw-r--r--system/gnu-unifont/gnu-unifont.info6
2 files changed, 27 insertions, 7 deletions
diff --git a/system/gnu-unifont/gnu-unifont.SlackBuild b/system/gnu-unifont/gnu-unifont.SlackBuild
index 3c1f7e22775c4..d7d897cbfdcb4 100644
--- a/system/gnu-unifont/gnu-unifont.SlackBuild
+++ b/system/gnu-unifont/gnu-unifont.SlackBuild
@@ -25,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=gnu-unifont
-VERSION=${VERSION:-12.1.01}
+VERSION=${VERSION:-12.1.02}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -40,6 +40,11 @@ SRCNAM=unifont
DOCFILES="ChangeLog COPYING INSTALL NEWS README"
FONTFORMATS=${FONTFORMATS:-ttf,pcf,psf}
+contains()
+{
+ echo "$1" | grep -qi "\(^\|,\)$2\($\|,\)"
+}
+
set -e
rm -rf $PKG
@@ -55,25 +60,40 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+FONTSCOPIED=0
+
cd font/precompiled
-if [[ $FONTFORMATS == *pcf* ]]; then
+if contains "$FONTFORMATS" "pcf"; then
mkdir -p $PKG/usr/share/fonts/misc
cp -a *.pcf.gz $PKG/usr/share/fonts/misc
+
+ FONTSCOPIED=1
fi
-if [[ $FONTFORMATS == *ttf* ]]; then
+if contains "$FONTFORMATS" "ttf"; then
mkdir -p $PKG/usr/share/fonts/TTF
cp -a *.ttf $PKG/usr/share/fonts/TTF
+
+ FONTSCOPIED=1
fi
-if [[ $FONTFORMATS == *psf* ]]; then
+if contains "$FONTFORMATS" "psf"; then
mkdir -p $PKG/usr/share/kbd/consolefonts
cp -a *.psf.gz $PKG/usr/share/kbd/consolefonts
+
+ FONTSCOPIED=1
fi
cd -
+if [ "$FONTSCOPIED" -eq 0 ]; then
+ echo
+ echo "No fonts selected to be included in the package."
+ echo "Please check value of the FONTFORMATS environment variable."
+ exit 1
+fi
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/system/gnu-unifont/gnu-unifont.info b/system/gnu-unifont/gnu-unifont.info
index 838ff661360aa..9b61b65b00186 100644
--- a/system/gnu-unifont/gnu-unifont.info
+++ b/system/gnu-unifont/gnu-unifont.info
@@ -1,8 +1,8 @@
PRGNAM="gnu-unifont"
-VERSION="12.1.01"
+VERSION="12.1.02"
HOMEPAGE="http://unifoundry.com/unifont/index.html"
-DOWNLOAD="https://ftpmirror.gnu.org/unifont/unifont-12.1.01/unifont-12.1.01.tar.gz"
-MD5SUM="7c21885ce6070b2718739cc1e5205ed0"
+DOWNLOAD="https://ftpmirror.gnu.org/unifont/unifont-12.1.02/unifont-12.1.02.tar.gz"
+MD5SUM="39d14d95e86abcf2da2d6c061b71cc9f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""