svn commit: r360720 - in head/chinese: cwtexttf fireflyttf ttfm

Yen-Ming Lee leeym at FreeBSD.org
Sat Jul 5 05:28:31 UTC 2014


Author: leeym
Date: Sat Jul  5 05:28:30 2014
New Revision: 360720
URL: http://svnweb.freebsd.org/changeset/ports/360720
QAT: https://qat.redports.org/buildarchive/r360720/

Log:
  - support stage and options

Modified:
  head/chinese/cwtexttf/Makefile
  head/chinese/fireflyttf/Makefile
  head/chinese/ttfm/Makefile.ttf

Modified: head/chinese/cwtexttf/Makefile
==============================================================================
--- head/chinese/cwtexttf/Makefile	Sat Jul  5 04:55:30 2014	(r360719)
+++ head/chinese/cwtexttf/Makefile	Sat Jul  5 05:28:30 2014	(r360720)
@@ -18,11 +18,10 @@ WRKSRC=		${WRKDIR}/texmf/fonts/truetype/
 
 TTF=		bbttf.ttf fttf.ttf kttf.ttf mttf.ttf rttf.ttf
 
-NO_STAGE=	yes
 do-install:
-	@${MKDIR} ${FONTSDIR}
+	@${MKDIR} ${STAGEDIR}${FONTSDIR}
 .for i in ${TTF}
-	${INSTALL_DATA} ${WRKSRC}/${i} ${FONTSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${FONTSDIR}
 .endfor
 
 .include <bsd.port.pre.mk>

Modified: head/chinese/fireflyttf/Makefile
==============================================================================
--- head/chinese/fireflyttf/Makefile	Sat Jul  5 04:55:30 2014	(r360719)
+++ head/chinese/fireflyttf/Makefile	Sat Jul  5 05:28:30 2014	(r360720)
@@ -22,7 +22,6 @@ LGJ_FONT_DESC=	Patch for Taiwan horn
 
 TTF=		fireflysung.ttf
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 .if ${PORT_OPTIONS:MLGJ_FONT}
@@ -48,9 +47,9 @@ post-extract:
 .endif
 
 do-install:
-	${MKDIR} ${FONTSDIR}
-	${INSTALL_DATA} ${WRKSRC}/${TTF} ${FONTSDIR}
-	${INSTALL_DATA} ${FILESDIR}/local.conf-sung ${FONTSDIR}
+	${MKDIR} ${STAGEDIR}${FONTSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${TTF} ${STAGEDIR}${FONTSDIR}
+	${INSTALL_DATA} ${FILESDIR}/local.conf-sung ${STAGEDIR}${FONTSDIR}
 .if ${PORT_OPTIONS:MX11}
 	${INSTALL_DATA} ${FILESDIR}/local.conf-sung ${LOCALBASE}/etc/fonts/local.conf
 .endif

Modified: head/chinese/ttfm/Makefile.ttf
==============================================================================
--- head/chinese/ttfm/Makefile.ttf	Sat Jul  5 04:55:30 2014	(r360719)
+++ head/chinese/ttfm/Makefile.ttf	Sat Jul  5 05:28:30 2014	(r360720)
@@ -7,10 +7,11 @@
 # The variable(s) for installing TrueType fonts.
 # TTF		- Name(s) of font file(s) installed in FONTSDIR. Mandatory.
 #
-# The variable(s) to change the behavior of installing TrueType fonts.
-# WITH_GS	- Add Ghostscript support
-# WITHOUT_X11	- Remove X Window support
-#
+
+OPTIONS_DEFINE+=	GHOSTSCRIPT X11
+OPTIONS_DEFAULT+=	X11
+
+.include <bsd.port.options.mk>
 
 FONTSDIR?=	${PREFIX}/share/fonts/TrueType
 FONTSDIR_REL=	${FONTSDIR:S,^${PREFIX}/,,}
@@ -20,12 +21,12 @@ XFONTSDIR?=	${LOCALBASE}/lib/X11/fonts/T
 XFONTSDIR_REL=	${XFONTSDIR:S,${LOCALBASE}/,,}
 PLIST_SUB+=	XFONTSDIR=${XFONTSDIR_REL}
 
-.if !defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
 RUN_DEPENDS+=	${LOCALBASE}/bin/fc-cache:${PORTSDIR}/x11-fonts/fontconfig
 _TTF_MODULES=	xttfm
 .endif
 
-.if defined(WITH_GS)
+.if ${PORT_OPTIONS:MGHOSTSCRIPT}
 RUN_DEPENDS+=	${LOCALBASE}/share/fonts/adobe-cmaps/ai0/CMap/Identity-H:${PORTSDIR}/print/adobe-cmaps
 _TTF_MODULES+=	gscjk
 .endif
@@ -37,12 +38,12 @@ RUN_DEPENDS+=	${PREFIX}/bin/ttfm.sh:${PO
 check-makefile: check-makefile-ttf
 check-makefile-ttf:
 .if !defined(_TTF_MODULES)
-	@${ECHO_CMD} "Makefile warning: You choose neither X11 nor GS. Only font files themselves are installed"
+	@${ECHO_CMD} "Makefile warning: You choose neither X11 nor GHOSTSCRIPT. Only font files themselves are installed"
 .else
 	@${ECHO_CMD} ""
 	@${ECHO_CMD} "You may use the following options:"
-	@${ECHO_CMD} "	WITH_GS		- if you want Ghostscript support"
-	@${ECHO_CMD} "	WITHOUT_X11	- if you DON'T want X Window support"
+	@${ECHO_CMD} "	${OPTIONS_NAME}_SET=GHOSTSCRIPT		- if you want Ghostscript support"
+	@${ECHO_CMD} "	${OPTIONS_NAME}_UNSET=X11	- if you DON'T want X Window support"
 	@${ECHO_CMD} ""
 .endif
 .if !defined(TTF)
@@ -57,19 +58,19 @@ do-install-ttf:
 .endif
 .for module in ${_TTF_MODULES}
 .	for ttf in ${TTF}
-		${PREFIX}/bin/ttfm.sh --add ${module} ${FONTSDIR}/${ttf}
+		${PREFIX}/bin/ttfm.sh --add ${module} ${STAGEDIR}${FONTSDIR}/${ttf}
 .	endfor
 .endfor
-.if !defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
 	@${ECHO_MSG} "===>  Running fc-cache"
-	-@${LOCALBASE}/bin/fc-cache -f -v ${XFONTSDIR}
+	-@${LOCALBASE}/bin/fc-cache -f -v ${STAGEDIR}${XFONTSDIR}
 .endif
 
 add-plist-post: add-plist-ttf
 add-plist-ttf:
 .for module in ${_TTF_MODULES}
 .	for ttf in ${TTF}
-		@${ECHO_CMD} "@unexec %D/bin/ttfm.sh --remove ${module} ${FONTSDIR}/${ttf} || true" >> ${TMPPLIST}
+		@${ECHO_CMD} "@unexec %D/bin/ttfm.sh --remove ${module} ${STAGEDIR}${FONTSDIR}/${ttf} || true" >> ${TMPPLIST}
 .	endfor
 .endfor
 .for ttf in ${TTF}
@@ -77,15 +78,15 @@ add-plist-ttf:
 .endfor
 .for module in ${_TTF_MODULES}
 .	for ttf in ${TTF}
-		@${ECHO_CMD} "@exec %D/bin/ttfm.sh --add ${module} ${FONTSDIR}/${ttf} || true" >> ${TMPPLIST}
+		@${ECHO_CMD} "@exec %D/bin/ttfm.sh --add ${module} ${STAGEDIR}${FONTSDIR}/${ttf} || true" >> ${TMPPLIST}
 .	endfor
 .endfor
-.if !defined(WITHOUT_X11)
+.if ${PORT_OPTIONS:MX11}
 	@${ECHO_CMD} "@unexec ${LOCALBASE}/bin/fc-cache -f -v ${XFONTSDIR} || true" >> ${TMPPLIST}
 	@${ECHO_CMD} "@exec ${LOCALBASE}/bin/fc-cache -f -v ${XFONTSDIR} || true" >> ${TMPPLIST}
 	@${ECHO_CMD} "@unexec find ${XFONTSDIR} -size -3c -delete || true" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec rmdir ${XFONTSDIR} 2>/dev/null || true" >> ${TMPPLIST}
+	@${ECHO_CMD} "@dirrmtry ${XFONTSDIR}" >> ${TMPPLIST}
 .endif
-	@${ECHO_CMD} "@unexec rmdir ${FONTSDIR} 2>/dev/null || true" >> ${TMPPLIST}
-	@${ECHO_CMD} "@unexec rmdir %D/share/fonts 2>/dev/null || true" >> ${TMPPLIST}
+	@${ECHO_CMD} "@dirrmtry ${FONTSDIR}" >> ${TMPPLIST}
+	@${ECHO_CMD} "@dirrmtry share/fonts" >> ${TMPPLIST}
 


More information about the svn-ports-all mailing list