1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/chinese/cxterm/scripts/pre-install
David E. O'Brien f4bbcde9f5 Don't install the fonts that are part of the X11R6 misc fonts dist.
==> warn installer if they don't have the required fonts installed

Requested by: Satoshi
1996-11-03 09:40:42 +00:00

31 lines
1.2 KiB
Bash

#!/bin/sh -x
# set up the resource file
RESFILE=${PREFIX}/lib/X11/cxterm.dic
sed -e 's|^\(cxterm[*.].*hanziInputDir:\).*$|\1 '"${RESFILE}"'/gb|;
s|^\(cxtermb5[*.].*hanziInputDir:\).*$|\1 '"${RESFILE}"'/big5|
s|^\(cxtermjis[*.].*hanziInputDir:\).*$|\1 '"${RESFILE}"'/jis|
s|^\(cxtermks[*.].*hanziInputDir:\).*$|\1 '"${RESFILE}"'/ks|' \
${WRKSRC}/cxterm/CXterm.ad > ${WRKDIR}/CXterm.ad
# setup helper script
echo "creating CXterm script for inexperienced users"
CXTERM_SH=${WRKDIR}/CXterm.sh
echo "#!/bin/sh" > $CXTERM_SH
echo "" >> $CXTERM_SH
echo "CXTERM_AD=${PREFIX}/lib/X11/cxterm.dic/CXterm.ad" >> $CXTERM_SH
echo "XFONTDIR=${PREFIX}/lib/X11/fonts/chinese" >> $CXTERM_SH
echo "" >> $CXTERM_SH
/bin/cat ${WRKSRC}/scripts/CXterm.sh >> $CXTERM_SH
# look for Simple fonts from the X11R6 misc fonts collection
if [ ! -f ${X11BASE}/lib/X11/fonts/misc/gb16st.pcf.Z ]; then
echo ""
echo "You need to install the X11R6 misc fonts in order to get the"
echo "Simple Chinese fonts."
echo ""
fi