diff options
author | Jing-Tang Keith Jang <keith@FreeBSD.org> | 2000-12-08 16:23:16 +0000 |
---|---|---|
committer | Jing-Tang Keith Jang <keith@FreeBSD.org> | 2000-12-08 16:23:16 +0000 |
commit | 1b4ebbb32d981f6594ae5acc015f0d8328a2ccb4 (patch) | |
tree | 33478a01c36009c3af5ab7c1ff5aa00aadc4c325 /chinese/wangttf | |
parent | 843544003ec83ec0783ed3694cd28aedad81c636 (diff) | |
download | ports-1b4ebbb32d981f6594ae5acc015f0d8328a2ccb4.tar.gz ports-1b4ebbb32d981f6594ae5acc015f0d8328a2ccb4.zip |
Notes
Diffstat (limited to 'chinese/wangttf')
-rw-r--r-- | chinese/wangttf/Makefile | 21 | ||||
-rw-r--r-- | chinese/wangttf/pkg-deinstall | 26 | ||||
-rw-r--r-- | chinese/wangttf/pkg-install | 55 | ||||
-rw-r--r-- | chinese/wangttf/pkg-plist | 24 |
4 files changed, 113 insertions, 13 deletions
diff --git a/chinese/wangttf/Makefile b/chinese/wangttf/Makefile index 8394d4d84a65..45a9351253dc 100644 --- a/chinese/wangttf/Makefile +++ b/chinese/wangttf/Makefile @@ -18,14 +18,32 @@ MAINTAINER= keith@FreeBSD.org RUN_DEPENDS= ttfm.sh:${PORTSDIR}/chinese/ttfm +WANT_CJK?= NO +WANT_GS6?= NO +WANT_X?= YES + DIST_SUBDIR= zh-wangttf USE_BZIP2= yes +USE_XLIB= yes NO_BUILD= yes SHAREMODE= 644 -FONTDIR= ${PREFIX}/share/fonts/ttf +FONTDIR= ${PREFIX}/share/fonts/TrueType +XFONTDIR= ${X11BASE}/lib/X11/fonts/TrueType +INSTALL_ENV= PKG_PREFIX=${PREFIX} XFREE86_VERSION=${XFREE86_VERSION} \ + WANT_CJK=${WANT_CJK} WANT_GS6=${WANT_GS6} WANT_X=${WANT_X} .include <bsd.port.pre.mk> +.if ${WANT_CJK} != "NO" +RUN_DEPENDS+= bg5latex:${PORTSDIR}/chinese/CJK +.endif +.if ${WANT_GS6} != "NO" +RUN_DEPENDS+= ${LOCALBASE}/share/ghostscript/CJK/CMap/B5pc-H:${PORTSDIR}/chinese/ghostscript6 +.endif +.if ${XFREE86_VERSION} == 3 && ${WANT_X} != "NO" +RUN_DEPENDS+= mkfontdir.pl:${PORTSDIR}/x11-servers/XttXF86srv-common +.endif + do-install: @${MKDIR} ${FONTDIR} .for i in ${DISTFILES} @@ -33,5 +51,6 @@ do-install: @${EXTRACT_CMD} -dv ${FONTDIR}/${i} .endfor @${INSTALL_DATA} ${FILESDIR}/wangttf.txt ${FONTDIR} + @${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.post.mk> diff --git a/chinese/wangttf/pkg-deinstall b/chinese/wangttf/pkg-deinstall new file mode 100644 index 000000000000..41d36045d4d3 --- /dev/null +++ b/chinese/wangttf/pkg-deinstall @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ "$2" != "DEINSTALL" ]; then + exit 0 +fi + +PKGNAME=$1 +PREFIX=${PKG_PREFIX} +TTFM=${PKG_PREFIX}/bin/ttfm.sh + +# No default kai & ming for wangttf. +FONTDIR=${PREFIX}/share/fonts/TrueType +FONTS="wcl-01.ttf wcl-02.ttf wcl-03.ttf wcl-04.ttf wcl-05.ttf \ + wcl-06.ttf wcl-07.ttf wcl-08.ttf wcl-09.ttf wcl-10.ttf" + +if [ -r $FONTDIR/$PKGNAME ]; then + for i in `cat $FONTDIR/$PKGNAME`; do + for f in $FONTS $DEFAULTMING $DEFAULTKAI; do + $TTFM --remove $i $f + done + done +fi + +rm -f $FONTDIR/$PKGNAME + +exit 0 diff --git a/chinese/wangttf/pkg-install b/chinese/wangttf/pkg-install new file mode 100644 index 000000000000..064dc1f454e3 --- /dev/null +++ b/chinese/wangttf/pkg-install @@ -0,0 +1,55 @@ +#!/bin/sh + +if [ "$2" = "PRE-INSTALL" ]; then + exit 0 +fi + +PKGNAME=$1 +PREFIX=${PKG_PREFIX} +TTFM=${PREFIX}/bin/ttfm.sh + +# No default kai & ming for wangttf. +FONTDIR=${PREFIX}/share/fonts/TrueType +FONTS="wcl-01.ttf wcl-02.ttf wcl-03.ttf wcl-04.ttf wcl-05.ttf \ + wcl-06.ttf wcl-07.ttf wcl-08.ttf wcl-09.ttf wcl-10.ttf" + +[ "X$WANT_X" = "X" ] && WANT_X=YES + +if [ ! -x $TTFM ]; then + echo "$TTFM not found!" + exit 1 +fi + +rm -f $FONTDIR/$PKGNAME + +if [ "$WANT_CJK" = "YES" -o "$WANT_CJK" = "yes" ]; then + # There's no CJK module now. +fi + +if [ "$WANT_GS6" = "YES" -o "$WANT_GS6" = "yes" ]; then + for f in $FONTS; do + $TTFM --add ghostscript6 $FONTDIR/$f + done + for f in $DEFAULTMING; do + $TTFM --setdefault ghostscript6 $FONTDIR/$f + done + for f in $DEFAULTKAI; do + $TTFM --setdefault_kai ghostscript6 $FONTDIR/$f + done + echo "ghostscript6" >> $FONTDIR/$PKGNAME +fi + +if [ "$WANT_X" = "YES" -o "$WANT_X" = "yes" ]; then + for f in $FONTS; do + $TTFM --add xttfm $FONTDIR/$f + done + for f in $DEFAULTMING; do + $TTFM --setdefault xttfm $FONTDIR/$f + done + for f in $DEFAULTKAI; do + $TTFM --setdefault_kai xttfm $FONTDIR/$f + done + echo "xttfm" >> $FONTDIR/$PKGNAME +fi + +exit 0 diff --git a/chinese/wangttf/pkg-plist b/chinese/wangttf/pkg-plist index 8e1854a5c93c..c1ebca9c45c1 100644 --- a/chinese/wangttf/pkg-plist +++ b/chinese/wangttf/pkg-plist @@ -1,13 +1,13 @@ -share/fonts/ttf/wangttf.txt -share/fonts/ttf/wcl-01.ttf -share/fonts/ttf/wcl-02.ttf -share/fonts/ttf/wcl-03.ttf -share/fonts/ttf/wcl-04.ttf -share/fonts/ttf/wcl-05.ttf -share/fonts/ttf/wcl-06.ttf -share/fonts/ttf/wcl-07.ttf -share/fonts/ttf/wcl-08.ttf -share/fonts/ttf/wcl-09.ttf -share/fonts/ttf/wcl-10.ttf -@unexec rmdir %D/share/fonts/ttf 2>/dev/null || true +share/fonts/TrueType/wangttf.txt +share/fonts/TrueType/wcl-01.ttf +share/fonts/TrueType/wcl-02.ttf +share/fonts/TrueType/wcl-03.ttf +share/fonts/TrueType/wcl-04.ttf +share/fonts/TrueType/wcl-05.ttf +share/fonts/TrueType/wcl-06.ttf +share/fonts/TrueType/wcl-07.ttf +share/fonts/TrueType/wcl-08.ttf +share/fonts/TrueType/wcl-09.ttf +share/fonts/TrueType/wcl-10.ttf +@unexec rmdir %D/share/fonts/TrueType 2>/dev/null || true @unexec rmdir %D/share/fonts 2>/dev/null || true |