1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

chinese/moettf: Unbreak, stage, restore public distfiles

This port was in bad shape!

1) It had a MASTER_SITES definition pointing to a FreeBSD mirror.  This
   was a circular dependency that broke when the "real" master site
   domain disappeared.  Fix this by hosting at LOCAL/MARINO

2) The kai-pc ttf font was never installed (always broken)

3) It broke (more) with recent chinese font work

4) It included makefile.tty by absolute ${PORTDIR} instead of
   correct ${.CURDIR}, which also unnecessarily required <pre>, <post>

5) It wasn't staged

So fix all that. Also improve efficiency of staging by copying directly
from distfiles to stage directory instead of first copying to WRKSRC then
STAGEDIR.  The post-install target is no longer needed, nor is the
pkg-plist file.
This commit is contained in:
John Marino 2014-07-19 08:47:58 +00:00
parent a2a33d5199
commit f053d91c1a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=362239
2 changed files with 23 additions and 34 deletions

View File

@ -3,56 +3,47 @@
PORTNAME= moettf
PORTVERSION= 2.0
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= chinese x11-fonts
MASTER_SITES= http://ftp.riken.go.jp/pub/FreeBSD/distfiles/zh-moettf/ \
http://ftp.math.uni-bielefeld.de/pub/unix/FreeBSD/distfiles/zh-moettf/
DISTFILES= moe_kai.ttf moe_sung.ttf edustds1.exe edustds2.exe \
edustd-15.exe kai-pc.ttf
MASTER_SITES= LOCAL/MARINO
DISTFILES= edustds1.exe edustds2.exe edustd-15.exe \
kai-pc.ttf moe_kai.ttf moe_sung.ttf
DIST_SUBDIR= zh-moettf
MAINTAINER= ports@FreeBSD.org
COMMENT= Three Chinese BIG5 TrueType fonts: Kai LiShu Sung SungExt
EXTRACT_DEPENDS=unrar:${PORTSDIR}/archivers/unrar
EXTRACT_DEPENDS= unrar:${PORTSDIR}/archivers/unrar
DIST_SUBDIR= zh-moettf
NO_CDROM= Contact Taiwan's Ministry of Education for commercial use
NO_CDROM= Contact Ministry of Education of Taiwan for commercial use
NO_BUILD= yes
NO_WRKSUBDIR= yes
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
EXE_TTF= moe_lishu.ttf moe_sungext.ttf moe_sungsym.ttf
REG_TTF= kai-pc.ttf moe_kai.ttf moe_sung.ttf
TTF= ${EXE_TTF} ${REG_TTF}
NO_STAGE= yes
do-extract:
@${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}
@(cd ${WRKSRC}; \
${MV} Edustd-15.TTF moe_lishu.ttf ; \
${MV} edustds1.ttf moe_sungext.ttf ; \
${MV} edustds2.ttf moe_sungsym.ttf )
do-install:
@${MKDIR} ${FONTSDIR}
.for ttf in ${TTF}
${INSTALL_DATA} ${WRKSRC}/${ttf} ${FONTSDIR}
@${MKDIR} ${STAGEDIR}${FONTSDIR}
.for ttf in ${EXE_TTF}
${INSTALL_DATA} ${WRKSRC}/${ttf} ${STAGEDIR}${FONTSDIR}/${ttf}
.endfor
.for ttf in ${REG_TTF}
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${ttf} \
${STAGEDIR}${FONTSDIR}/${ttf}
.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
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/chinese/ttfm/Makefile.ttf"
.include <bsd.port.post.mk>
.include "${.CURDIR}/../ttfm/Makefile.ttf"
.include <bsd.port.mk>

View File

@ -1,2 +0,0 @@
@exec sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" %%LOCALBASE%%/%%XFONTSDIR%%/fonts.dir > %%LOCALBASE%%/%%XFONTSDIR%%/fonts.dir.tmp && mv %%LOCALBASE%%/%%XFONTSDIR%%/fonts.dir.tmp %%LOCALBASE%%/%%XFONTSDIR%%/fonts.dir
@exec sed -e "s/ ° ê ¦ r ¼ Ð · Ç § º Å é/twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" %%LOCALBASE%%/%%XFONTSDIR%%/fonts.alias > %%LOCALBASE%%/%%XFONTSDIR%%/fonts.alias.tmp && mv %%LOCALBASE%%/%%XFONTSDIR%%/fonts.alias.tmp %%LOCALBASE%%/%%XFONTSDIR%%/fonts.alias