an easy and consistent way of installing software ported to FreeBSD
#!/bin/sh
set -e
fontdir="/usr/X11R6/lib/X11/fonts/local"
# $fontdir no longer exists;
# remove the FontPath from /etc/X11/XF86Config
if [ -f /etc/X11/XF86Config ]
then
echo "Removing FontPath \"$fontdir\" from /etc/X11/XF86Config ..."
tmpfile="/tmp/tempfile"
sed -e '/Section *"Files"/,/EndSection/{' \
-e "\\%^ *FontPath *[\"']$fontdir%d" \
-e '}' /etc/X11/XF86Config >> $tmpfile
mv -f $tmpfile /etc/X11/XF86Config
else
echo "/etc/X11/XF86Config not found!"
echo "You need to remove the line"
echo " FontPath \"$fontdir/:unscaled\""
echo "from /etc/X11/XF86Config yourself, otherwise X may fail to work."
fi
This package contains the standard Big5+ Chinese Ming 24x24 bitmap font (and
a resized 16x16 bitmap font) by CMEX and DynaLab for the X Window System
(PCF). This is one of the few Big5 or Big5+ Chinese bitmap fonts on the
Internet that is DFSG-compliant.
The font was designed by DynaLab and released by CMEX as part of the
proposed Big5+ standard documentation. It was then converted to HBF and BDF
format and further modified by Wei-Lun Chao in September 1998.
WWW: http://www.cmex.org.tw/
#!/bin/sh
set -e
fontdir="/usr/X11R6/lib/X11/fonts/local"
# Add FontPath to /etc/X11/XF86Config
if [ -f /etc/X11/XF86Config ]
then
if ! grep -q "^ *FontPath *[\"']$fontdir/" /etc/X11/XF86Config
then
echo "Adding FontPath \"$fontdir\" to /etc/X11/XF86Config ..."
tmpfile="/tmp/tempfile"
sed -e '/Section "Files"/,/EndSection/{
/EndSection/i\
FontPath \"'$fontdir'/:unscaled\"\
FontPath \"'$fontdir'/\"
}' /etc/X11/XF86Config >> $tmpfile
mv -f $tmpfile /etc/X11/XF86Config
else
echo "Having FontPath \"$fontdir\" to /etc/X11/XF86Config ..."
fi
else
echo "/etc/X11/XF86Config not found!"
echo "You need to add"
echo " FontPath \"$fontdir/:unscaled\""
echo "to /etc/X11/XF86Config yourself in order to use the font."
fi
lib/X11/fonts/local/cmex16m.pcf.gz
lib/X11/fonts/local/cmex24m.pcf.gz
lib/X11/fonts/local/cmex_fonts.alias
@exec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
@exec cd %D/lib/X11/fonts/local ; cat cmex_fonts.alias >> fonts.alias ; cp fonts.alias ..fonts.alias.. ; sort ..fonts.alias.. | uniq > fonts.alias ; rm ..fonts.alias..
@unexec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
@unexec if [ -s %D/lib/X11/fonts/local/fonts.alias ]; then perl -e 'while (<>) { if (!/dynalab-ming/) { print <>} }' < %D/lib/X11/fonts/local/fonts.alias > /tmp/fonts.alias.$$; mv /tmp/fonts.alias.$$ %D/lib/X11/fonts/local/fonts.alias; fi
@unexec if [ `\head -1 %D/lib/X11/fonts/local/fonts.dir` = 0 ]; then rm -f %D/lib/X11/fonts/local/fonts.dir; fi
@unexec if [ ! -s %D/lib/X11/fonts/local/fonts.alias ]; then rm -f %D/lib/X11/fonts/local/fonts.alias; fi