an easy and consistent way of installing software ported to FreeBSD
Japanese 8 dot font named `elisa font'.
You can use 'k8', 'r8', 'a8' as an alias for elisa font, 4x8 dots
jis.x0201 font, 4x8 dots iso8859-1 font.
A simple usage:
% kterm -fn a8 -fr r8 -fk k8
%%FONTSDIR%%/elisat10.pcf.gz
%%FONTSDIR%%/jpnhn4-jis.pcf.gz
%%FONTSDIR%%/jpnhn4-iso.pcf.gz
share/doc/elisa/elisa100.doc
share/doc/elisa/elisat10.doc
share/doc/elisa/elisat10.html
@exec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir
@unexec cd %D/%%FONTSDIR%% ; %D/bin/mkfontdir
@unexec if [ `wc -c %D/%%FONTSDIR%%/fonts.dir | awk '{print $1}'` = 2 ]; then rm -f %D/%%FONTSDIR%%/fonts.dir; fi
@unexec if [ ! -s %D/%%FONTSDIR%%/fonts.alias ]; then rm -f %D/%%FONTSDIR%%/fonts.alias; fi
@dirrm share/doc/elisa
#!/bin/sh
if [ "x$1" = "x" ]; then
exit 1;
fi
if [ "x$2" != "xINSTALL" -a "x$2" != "xDEINSTALL" ]; then
exit 1;
fi
export FONTDIR; FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local
if [ "$2x" = "INSTALLx" -a ! -d ${FONTDIR} ]; then
echo '**********************************************************************'
echo "****** ${FONTDIR}/ doesn't exist."
echo "****** Creating ${FONTDIR}/"
echo '****** Please upgrade your XFree86 to 3.3.3 or upper,'
echo "****** or add this directory to your /etc/XF86Config's FontPath entry."
echo '**********************************************************************'
mkdir ${FONTDIR}
fi
grepv() {
awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
}
# font alias entry here!
TMPFILE=/tmp/install-fonts-alias-$$
cat << EOF > ${TMPFILE}
k8 -elisa100-fixed-medium-r-normal--8-70-75-75-c-80-jisx0208.1983-0
r8 -hiro-fixed-medium-r-normal--8-70-75-75-c-40-jisx0201.1976-0
a8 -hiro-fixed-medium-r-normal--8-70-75-75-c-40-iso8859-1
4x8 -hiro-fixed-medium-r-normal--8-70-75-75-c-40-iso8859-1
EOF
echo "Updating ${FONTDIR}/fonts.alias"
cd ${FONTDIR}
touch fonts.alias
cp fonts.alias fonts.alias.orig
if [ "$2" = "INSTALL" ] ; then
(grepv ${TMPFILE} fonts.alias.orig ; \
cat ${TMPFILE}) > fonts.alias
elif [ "$2" = "DEINSTALL" ] ; then
grepv ${TMPFILE} fonts.alias.orig > fonts.alias
fi
rm -f fonts.alias.orig ${TMPFILE}
echo "**********************************************************"
echo "You should restart X server or do 'xset fp rehash' command"
echo "to enable this update."
echo "**********************************************************"
exit 0;