aboutsummaryrefslogtreecommitdiff
path: root/chinese/cxterm/scripts/pre-install
blob: a03377bc3ca56aca1ed32e8cb6b68c21b1e91b99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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