diff --git a/system/dosemu-fonts/README b/system/dosemu-fonts/README new file mode 100644 index 0000000000..231b129594 --- /dev/null +++ b/system/dosemu-fonts/README @@ -0,0 +1,17 @@ +dosemu-fonts (fonts from dosemu, packaged for system-wide use) + +DOSEmu includes various VGA-style fonts, which get installed to a +private directory, used only by DOSEmu. This package installs the same +fonts in the system-wide /usr/share/fonts/misc directory, so other +software can use them. + +These fonts are for codepages 437, 866, and 1125. ASCII text displays +correctly with them, but they don't support Unicode or ISO-8859-* +encodings. They're useful for applications such as BitchX (which uses +codepage 437) and viewing old text files from MS-DOS. + +After the package is installed, you may have to run "xset fp rehash" +to make the fonts available to X. You can get a list of the fonts +with "xlsfonts -fn -dosemu-*". Also, there are short aliases, so you +can run e.g. "xterm -fn vga11x19". These are: vga vga8x19 vga11x19 +vga10x24 vga12x30 vgacyr vga10x20 vga-ua vga10x20-ua. diff --git a/system/dosemu-fonts/doinst.sh b/system/dosemu-fonts/doinst.sh new file mode 100644 index 0000000000..9ebe5c1d5b --- /dev/null +++ b/system/dosemu-fonts/doinst.sh @@ -0,0 +1,14 @@ +if [ -x /usr/bin/fc-cache ]; then + /usr/bin/fc-cache -f &> /dev/null +fi + +if [ -x /usr/bin/mkfontdir ]; then + ( cd usr/share/fonts/misc ; /usr/bin/mkfontdir ) +fi + +if [ -x /usr/bin/mkfontscale ]; then + ( cd usr/share/fonts/misc ; /usr/bin/mkfontscale ) +fi + +# This may or may not work, but will do no harm: +DISPLAY=:0 /usr/bin/xset fp rehash &>/dev/null diff --git a/system/dosemu-fonts/dosemu-fonts.SlackBuild b/system/dosemu-fonts/dosemu-fonts.SlackBuild new file mode 100644 index 0000000000..23fd01cd34 --- /dev/null +++ b/system/dosemu-fonts/dosemu-fonts.SlackBuild @@ -0,0 +1,77 @@ +#!/bin/bash + +# Slackware build script for dosemu-fonts + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=dosemu-fonts +VERSION=${VERSION:-20130804_35054ba} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +ARCH=noarch + +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} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod 644 * + +mkdir -p $PKG/usr/share/fonts/misc +cp -a *.pcf.gz $PKG/usr/share/fonts/misc + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# The first parts of doinst.sh and douninst.sh are identical... +cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/doinst.sh > $PKG/install/douninst.sh + +# ...the rest is generated. +# doinst adds the aliases to fonts.alias if they're not already there. +# We won't get duplicate aliases even if the package is installpkg'ed +# multiple times without being removed. +# douninst removes them, if they're still there. +ALIAS=usr/share/fonts/misc/fonts.alias +while read line; do + set $line + cat >> $PKG/install/doinst.sh <> $ALIAS +fi +EOF + + cat >> $PKG/install/douninst.sh < $ALIAS.\$\$ +/bin/mv $ALIAS.\$\$ $ALIAS +EOF + +done < dosemu.alias + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/dosemu-fonts/dosemu-fonts.info b/system/dosemu-fonts/dosemu-fonts.info new file mode 100644 index 0000000000..a565b065c1 --- /dev/null +++ b/system/dosemu-fonts/dosemu-fonts.info @@ -0,0 +1,10 @@ +PRGNAM="dosemu-fonts" +VERSION="20130804_35054ba" +HOMEPAGE="http://www.dosemu.org" +DOWNLOAD="https://slackware.uk/~urchlay/src/dosemu-fonts-20130804_35054ba.tar.xz" +MD5SUM="8c7a1ee65da005eb28d1a4749d903a0f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/system/dosemu-fonts/slack-desc b/system/dosemu-fonts/slack-desc new file mode 100644 index 0000000000..d5f4a0e7c6 --- /dev/null +++ b/system/dosemu-fonts/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +dosemu-fonts: dosemu-fonts (fonts from dosemu, packaged for system-wide use) +dosemu-fonts: +dosemu-fonts: DOSEmu includes various VGA-style fonts, which get installed to a +dosemu-fonts: private directory, used only by DOSEmu. This package installs the same +dosemu-fonts: fonts in the system-wide /usr/share/fonts/misc directory, so other +dosemu-fonts: software can use them. +dosemu-fonts: +dosemu-fonts: +dosemu-fonts: +dosemu-fonts: +dosemu-fonts: