diff options
author | leeym <leeym@FreeBSD.org> | 2005-02-19 21:51:50 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2005-02-19 21:51:50 +0800 |
commit | 31459e01770eecb2584fba51544d7b5855a6300f (patch) | |
tree | 4b1bb35388cb87d2d1c66e786f5ae233b418c9f9 /chinese/moettf | |
parent | 5f8f4cbde94a90e2f70c8e265d8a42fc29b483ee (diff) | |
download | freebsd-ports-gnome-31459e01770eecb2584fba51544d7b5855a6300f.tar.gz freebsd-ports-gnome-31459e01770eecb2584fba51544d7b5855a6300f.tar.zst freebsd-ports-gnome-31459e01770eecb2584fba51544d7b5855a6300f.zip |
- add chinese/Makefile.ttf to control install/deinstall process of all
TrueType fonts in chinese/*ttf
- update related Makefile(s) and remove pkg-{install,pkg-deinstall,pkg-plist}
- relocate non-font files to DATADIR or DOCSDIR
- fix "unable to reomve fonts from gscjk" problem in ttfm.sh and gscjk.ttfm
- update chinese/zh-fireflyttf to 1.2.6 [1]
PR: [1] 77438
Submitted by: leeym
Approved by: statue at freebsd.sinica.edu.tw
Diffstat (limited to 'chinese/moettf')
-rw-r--r-- | chinese/moettf/Makefile | 67 | ||||
-rw-r--r-- | chinese/moettf/pkg-deinstall | 24 | ||||
-rw-r--r-- | chinese/moettf/pkg-install | 64 | ||||
-rw-r--r-- | chinese/moettf/pkg-plist | 10 |
4 files changed, 30 insertions, 135 deletions
diff --git a/chinese/moettf/Makefile b/chinese/moettf/Makefile index 5c97cff313ed..20de850d419c 100644 --- a/chinese/moettf/Makefile +++ b/chinese/moettf/Makefile @@ -21,55 +21,44 @@ MAINTAINER= statue@freebsd.netlab.cse.yzu.edu.tw COMMENT= Three Chinese BIG5 TrueType fonts: Kai LiShu Sung SungExt EXTRACT_DEPENDS=unrar:${PORTSDIR}/archivers/unrar -RUN_DEPENDS= ttfm.sh:${PORTSDIR}/chinese/ttfm -USE_XLIB= yes DIST_SUBDIR= zh-moettf NO_CDROM= "Contact Taiwan's Ministry of Education for commercial use." NO_BUILD= yes -SHAREMODE= 644 -FONTDIR= ${PREFIX}/share/fonts/TrueType -XFONTDIR= ${X11BASE}/lib/X11/fonts/TrueType +NO_WRKSUBDIR= yes -OPTIONS= CJK "CJK support" off \ - GS "Ghostscript support" off \ - X "X Window support" on \ - DEFAULT "set MOETTF the default font" off - -.include <bsd.port.pre.mk> - -INSTALL_ENV= PKG_PREFIX=${PREFIX} \ - DEFAULT=${WITH_DEFAULT} WANT_CJK=${WITH_CJK} \ - WANT_GS=${WITH_GS} WITHOUT_X=${WITHOUT_X} - -.if defined(WITH_CJK) -RUN_DEPENDS+= bg5latex:${PORTSDIR}/chinese/CJK -.endif -.if defined(WITH_GS) -RUN_DEPENDS+= ${LOCALBASE}/share/ghostscript/Resource/ai0/CMap/Identity-H:${PORTSDIR}/print/adobe-cmaps -.endif +TTF_DEFAULT= moe_sung.ttf +TTF_DEFAULTKAI= moe_kai.ttf +TTF= moe_lishu.ttf moe_kai.ttf moe_sung.ttf moe_sungext.ttf moe_sungsym.ttf do-extract: - @${RM} -rf ${WRKDIR} - @${MKDIR} ${WRKDIR} - @unrar x ${DISTDIR}/${DIST_SUBDIR}/edustd-15.exe ${WRKDIR} - @${MV} ${WRKDIR}/Edustd-15.TTF ${WRKDIR}/moe_lishu.ttf - @unrar x ${DISTDIR}/${DIST_SUBDIR}/edustds1.exe ${WRKDIR} - @${MV} ${WRKDIR}/edustds1.ttf ${WRKDIR}/moe_sungext.ttf - @unrar x ${DISTDIR}/${DIST_SUBDIR}/edustds2.exe ${WRKDIR} - @${MV} ${WRKDIR}/edustds2.ttf ${WRKDIR}/moe_sungsym.ttf + @${MKDIR} ${WRKSRC} + @unrar x ${DISTDIR}/${DIST_SUBDIR}/edustd-15.exe ${WRKSRC} + @${MV} ${WRKSRC}/Edustd-15.TTF ${WRKSRC}/moe_lishu.ttf + @unrar x ${DISTDIR}/${DIST_SUBDIR}/edustds1.exe ${WRKSRC} + @${MV} ${WRKSRC}/edustds1.ttf ${WRKSRC}/moe_sungext.ttf + @unrar x ${DISTDIR}/${DIST_SUBDIR}/edustds2.exe ${WRKSRC} + @${MV} ${WRKSRC}/edustds2.ttf ${WRKSRC}/moe_sungsym.ttf + @${CP} ${DISTDIR}/${DIST_SUBDIR}/moe_kai.ttf ${WRKSRC} + @${CP} ${DISTDIR}/${DIST_SUBDIR}/moe_sung.ttf ${WRKSRC} do-install: -.if !exists(${FONTDIR}) - @${MKDIR} ${FONTDIR} + @${MKDIR} ${FONTSDIR} +.for ttf in ${TTF} + ${INSTALL_DATA} ${WRKSRC}/${ttf} ${FONTSDIR} +.endfor + +post-install: +.if !defined(WITHOUT_X11) +.for f in fonts.dir fonts.alias + ${SED} -e "s/ t w m o e _ k a i/twmoe_kai/g" \ + -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" \ + ${XFONTSDIR}/${f} > ${XFONTSDIR}/${f}.$$ && \ + ${MV} ${XFONTSDIR}/${f}.$$ ${XFONTSDIR}/${f} +.endfor .endif - @${INSTALL_DATA} ${WRKDIR}/moe_lishu.ttf ${FONTDIR} - @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/moe_kai.ttf ${FONTDIR} - @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/kai-pc.ttf ${FONTDIR}/moe_kai_pc.ttf - @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/moe_sung.ttf ${FONTDIR} - @${INSTALL_DATA} ${WRKDIR}/moe_sungext.ttf ${FONTDIR} - @${INSTALL_DATA} ${WRKDIR}/moe_sungsym.ttf ${FONTDIR} - @${SETENV} ${INSTALL_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.include <bsd.port.pre.mk> +.include "${PORTSDIR}/chinese/ttfm/Makefile.ttf" .include <bsd.port.post.mk> diff --git a/chinese/moettf/pkg-deinstall b/chinese/moettf/pkg-deinstall deleted file mode 100644 index 055b67745316..000000000000 --- a/chinese/moettf/pkg-deinstall +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -if [ "$2" != "DEINSTALL" ]; then - exit 0 -fi - -PKGNAME=$1 -PREFIX=${PKG_PREFIX} -TTFM=${PKG_PREFIX}/bin/ttfm.sh - -FONTDIR=${PREFIX}/share/fonts/TrueType -FONTS="moe_lishu.ttf moe_kai.ttf moe_sung.ttf moe_sungext.ttf moe_sungsym.ttf moe_kai_pc.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/moettf/pkg-install b/chinese/moettf/pkg-install deleted file mode 100644 index cc556eaeddf1..000000000000 --- a/chinese/moettf/pkg-install +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -if [ "$2" = "PRE-INSTALL" ]; then - exit 0 -fi - -PKGNAME=$1 -PREFIX=${PKG_PREFIX} -TTFM=${PREFIX}/bin/ttfm.sh - -FONTDIR=${PREFIX}/share/fonts/TrueType -FONTS="moe_lishu.ttf moe_kai.ttf moe_sung.ttf moe_sungext.ttf moe_sungsym.ttf moe_kai_pc.ttf" -if [ "X$DEFAULT" != "X" ]; then - DEFAULTMING="moe_sung.ttf" - DEFAULTKAI="moe_kai.ttf" -fi - -TEMPFILE=`mktemp -q /tmp/moettf.XXXX` -XFONTDIR=${X11BASE}/lib/X11/fonts/TrueType - -if [ ! -x $TTFM ]; then - echo "$TTFM not found!" - exit 1 -fi - -rm -f $FONTDIR/$PKGNAME - -if [ "X$WANT_CJK" != "X" ]; then - # There's no CJK module now. -fi - -if [ "X$WANT_GS" != "X" ]; then - for f in $FONTS; do - $TTFM --add gscjk $FONTDIR/$f - done - for f in $DEFAULTMING; do - $TTFM --setdefault gscjk $FONTDIR/$f - done - for f in $DEFAULTKAI; do - $TTFM --setdefault_kai gscjk $FONTDIR/$f - done - echo "gscjk" >> $FONTDIR/$PKGNAME -fi - -if [ "X$WITHOUT_X" = "X" ]; 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 - sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" $XFONTDIR/fonts.dir > $TEMPFILE - mv $TEMPFILE $XFONTDIR/fonts.dir - sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" $XFONTDIR/fonts.alias > $TEMPFILE - mv $TEMPFILE $XFONTDIR/fonts.alias - echo "xttfm" >> $FONTDIR/$PKGNAME -fi - -rm -f $TEMPFILE - -exit 0 diff --git a/chinese/moettf/pkg-plist b/chinese/moettf/pkg-plist index b1e9f70144c2..08da29a46261 100644 --- a/chinese/moettf/pkg-plist +++ b/chinese/moettf/pkg-plist @@ -1,8 +1,2 @@ -share/fonts/TrueType/moe_kai.ttf -share/fonts/TrueType/moe_kai_pc.ttf -share/fonts/TrueType/moe_lishu.ttf -share/fonts/TrueType/moe_sung.ttf -share/fonts/TrueType/moe_sungext.ttf -share/fonts/TrueType/moe_sungsym.ttf -@unexec rmdir %D/share/fonts/TrueType 2>/dev/null || true -@unexec rmdir %D/share/fonts 2>/dev/null || true +@exec sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" %%X11BASE%%/%%XFONTSDIR%%/fonts.dir > %%X11BASE%%/%%XFONTSDIR%%/fonts.dir.tmp && mv %%X11BASE%%/%%XFONTSDIR%%/fonts.dir.tmp %%X11BASE%%/%%XFONTSDIR%%/fonts.dir +@exec sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" %%X11BASE%%/%%XFONTSDIR%%/fonts.alias > %%X11BASE%%/%%XFONTSDIR%%/fonts.alias.tmp && mv %%X11BASE%%/%%XFONTSDIR%%/fonts.alias.tmp %%X11BASE%%/%%XFONTSDIR%%/fonts.alias |