diff options
Diffstat (limited to 'system/gnu-unifont')
-rw-r--r-- | system/gnu-unifont/README | 21 | ||||
-rw-r--r-- | system/gnu-unifont/doinst.sh | 1 | ||||
-rw-r--r-- | system/gnu-unifont/gnu-unifont.SlackBuild | 57 | ||||
-rw-r--r-- | system/gnu-unifont/gnu-unifont.info | 8 | ||||
-rw-r--r-- | system/gnu-unifont/slack-desc | 2 |
5 files changed, 65 insertions, 24 deletions
diff --git a/system/gnu-unifont/README b/system/gnu-unifont/README index 1e7e3058f1..436b337ab7 100644 --- a/system/gnu-unifont/README +++ b/system/gnu-unifont/README @@ -4,19 +4,22 @@ Unicode Basic Multilinguial Plane(BMP). The BMP is the first Unicode for most of the world's modern scripts. By default, the package will include precompiled versions of the font in -TTF (TrueType), PCF (X Window bitmap) and PSF (console) formats. This can be -changed using FONTFORMATS environment variable, which should be set to -comma-separated list of font formats to include in the package. +OTF (OpenType), TTF (TrueType), PCF (X Window bitmap), PSF (console) and +OTB (OpenType Bitmap) formats. This can be changed using FONTFORMATS +environment variable, which should be set to comma-separated list of +font formats to be included in the package. Available formats are: +otf = OpenType ttf = TrueType pcf = X Window bitmap psf = Console fonts -otb = OpenType Bitmap fonts, compatible with recent versions of Pango which - don't support PCF fonts. Fonts in this format are generated by - converting precompiled PCF fonts using fonttosfnt tool. +otb = OpenType Bitmap fonts, compatible with recent versions of Pango + which don't support BDF/PCF fonts. Fonts in this format are + generated by converting precompiled BDF/PCF fonts using fonttosfnt + tool. -For example, setting FONTFORMATS=pcf,psf will include only PCF and PSF fonts. -If FONTFORMATS variable is not set the default value "ttf,pcf,psf" is -assumed. +For example, setting FONTFORMATS=pcf,psf will include only PCF and PSF +fonts in the package. If FONTFORMATS variable is not set then the +default value "otf,ttf,pcf,psf,otb" is assumed. diff --git a/system/gnu-unifont/doinst.sh b/system/gnu-unifont/doinst.sh index 2822cf238c..47ed4e784f 100644 --- a/system/gnu-unifont/doinst.sh +++ b/system/gnu-unifont/doinst.sh @@ -1,6 +1,7 @@ # Update the X font indexes: if [ -x /usr/bin/mkfontdir ]; then ( cd /usr/share/fonts/misc ; mkfontscale . ; mkfontdir . ) + ( cd /usr/share/fonts/OTF ; mkfontscale . ; mkfontdir . ) ( cd /usr/share/fonts/TTF ; mkfontscale . ; mkfontdir . ) fi diff --git a/system/gnu-unifont/gnu-unifont.SlackBuild b/system/gnu-unifont/gnu-unifont.SlackBuild index 85ea602913..d9bb3ace3d 100644 --- a/system/gnu-unifont/gnu-unifont.SlackBuild +++ b/system/gnu-unifont/gnu-unifont.SlackBuild @@ -1,10 +1,10 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for gnu-unifont # Copyright 2010 crocket (crockabiscuit@gmail.com) # Copyright 2013-2015 LukenShiro, Italy -# Copyright 2019-2020 Tomasz Bywalec +# Copyright 2019-2022 Tomasz Bywalec # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,21 +24,31 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=gnu-unifont -VERSION=${VERSION:-13.0.06} +VERSION=${VERSION:-15.0.01} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} ARCH=noarch -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} SRCNAM=unifont DOCFILES="ChangeLog COPYING INSTALL NEWS README" -FONTFORMATS=${FONTFORMATS:-ttf,pcf,psf} +FONTFORMATS=${FONTFORMATS:-otf,ttf,pcf,psf,otb} contains() { @@ -71,6 +81,13 @@ if contains "$FONTFORMATS" "pcf"; then FONTSCOPIED=1 fi +if contains "$FONTFORMATS" "otf"; then + mkdir -p $PKG/usr/share/fonts/OTF + cp -a *.otf $PKG/usr/share/fonts/OTF + + FONTSCOPIED=1 +fi + if contains "$FONTFORMATS" "ttf"; then mkdir -p $PKG/usr/share/fonts/TTF cp -a *.ttf $PKG/usr/share/fonts/TTF @@ -87,10 +104,30 @@ fi if contains "$FONTFORMATS" "otb"; then mkdir -p $PKG/usr/share/fonts/misc - for pcf_file in *.pcf.gz; do - echo "Converting '$pcf_file' to OTB format." - otb_file=$(echo "$pcf_file" | sed 's/\.pcf\.gz$/.otb/g') - fonttosfnt -o "$PKG/usr/share/fonts/misc/$otb_file" "$pcf_file" + + # Find BDF and PCF fonts and convert them to OTB format. + # If a font exists in both formats then convert the file in BDF format, + # as this is the preferred input format for the 'fonttosfnt' tool. + + echo *.bdf.gz | tr ' ' '\n' | sort | sed 's/\.bdf\.gz$//g' > bdf-fonts + echo *.pcf.gz | tr ' ' '\n' | sort | sed 's/\.pcf\.gz$//g' > pcf-fonts + + comm -2 bdf-fonts pcf-fonts | tr -d '\t' | \ + while read font_name; do + input_font_file="${font_name}.bdf.gz" + echo "Converting '$input_font_file' to OTB format." + + zcat "$input_font_file" | \ + fonttosfnt -o "$PKG/usr/share/fonts/misc/${font_name}.otb" + done + + comm -13 bdf-fonts pcf-fonts | \ + while read font_name; do + input_font_file="${font_name}.pcf.gz" + echo "Converting '$input_font_file' to OTB format." + + fonttosfnt -o "$PKG/usr/share/fonts/misc/${font_name}.otb" \ + "$input_font_file" done FONTSCOPIED=1 @@ -117,4 +154,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/gnu-unifont/gnu-unifont.info b/system/gnu-unifont/gnu-unifont.info index fbcf5b0e78..9e040ecd4c 100644 --- a/system/gnu-unifont/gnu-unifont.info +++ b/system/gnu-unifont/gnu-unifont.info @@ -1,8 +1,8 @@ PRGNAM="gnu-unifont" -VERSION="13.0.06" -HOMEPAGE="http://unifoundry.com/unifont/index.html" -DOWNLOAD="https://ftpmirror.gnu.org/unifont/unifont-13.0.06/unifont-13.0.06.tar.gz" -MD5SUM="60971929464ceb99bbcca55b9ad7c796" +VERSION="15.0.01" +HOMEPAGE="https://unifoundry.com/unifont/index.html" +DOWNLOAD="https://ftpmirror.gnu.org/unifont/unifont-15.0.01/unifont-15.0.01.tar.gz" +MD5SUM="d6366a8fd03e815c2f18d36ff1a5cca7" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/gnu-unifont/slack-desc b/system/gnu-unifont/slack-desc index 259c4b902e..cc5cdddce4 100644 --- a/system/gnu-unifont/slack-desc +++ b/system/gnu-unifont/slack-desc @@ -13,7 +13,7 @@ gnu-unifont: Unicode Basic Multilinguial Plane (BMP). The BMP is the first gnu-unifont: Unicode "plane" of 65,536(16bit) code points, and includes character gnu-unifont: encoding for most of the world's modern scripts. gnu-unifont: -gnu-unifont: Homepage: http://unifoundry.com/unifont/index.html +gnu-unifont: Homepage: https://unifoundry.com/unifont/index.html gnu-unifont: gnu-unifont: gnu-unifont: |