From gslin@netnews.NCTU.edu.tw  Sat Aug 12 07:17:47 2006
Return-Path: <gslin@netnews.NCTU.edu.tw>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A2FCA16A4DD;
	Sat, 12 Aug 2006 07:17:47 +0000 (UTC)
	(envelope-from gslin@netnews.NCTU.edu.tw)
Received: from netnews.NCTU.edu.tw (ccreader.nctu.edu.tw [140.113.54.119])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0EEE643D4C;
	Sat, 12 Aug 2006 07:17:46 +0000 (GMT)
	(envelope-from gslin@netnews.NCTU.edu.tw)
Received: by netnews.NCTU.edu.tw (Postfix, from userid 1000)
	id 855D2372; Sat, 12 Aug 2006 15:17:43 +0800 (CST)
Message-Id: <20060812071743.855D2372@netnews.NCTU.edu.tw>
Date: Sat, 12 Aug 2006 15:17:43 +0800 (CST)
From: Gea-Suan Lin <gslin@gslin.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: rafan@FreeBSD.org, gslin@gslin.org
Subject: [PATCH] chinese/CJK: Respect DESTDIR, fix porlint
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         101867
>Category:       ports
>Synopsis:       [PATCH] chinese/CJK: Respect DESTDIR, fix porlint
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rafan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 12 07:20:09 GMT 2006
>Closed-Date:    Mon Aug 14 04:16:31 GMT 2006
>Last-Modified:  Mon Aug 14 04:16:31 GMT 2006
>Originator:     Gea-Suan Lin
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD netnews.NCTU.edu.tw 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sat May 13 03:43:48 CST 2006
>Description:
- Respect DESTDIR
- Fix portlint
- Use INSTALL instead of /usr/bin/install
- Use SETENV

Port maintainer (rafan@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- CJK-4.6.0_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/chinese/CJK/Makefile /home/staff/gslin/work/ports/CJK/Makefile
--- /usr/ports/chinese/CJK/Makefile	Tue Jun 27 11:58:53 2006
+++ /home/staff/gslin/work/ports/CJK/Makefile	Sat Aug 12 15:16:03 2006
@@ -12,18 +12,16 @@
 MASTER_SITES=	http://cjk.ffii.org/ \
 		ftp://freebsd.csie.ntu.edu.tw/users/rafan/
 DISTNAME=	cjk-${PORTVERSION}
-DISTFILES=	${DISTNAME}.tar.gz
 
 MAINTAINER=	rafan@FreeBSD.org
 COMMENT=	A LaTeX2e macro package which enables the use of CJK scripts
 
-BUILD_DEPENDS=	latex:${PORTSDIR}/print/teTeX \
-		${LOCALBASE}/share/fonts/TrueType/bsmi00lp.ttf:${PORTSDIR}/chinese/arphicttf \
+RUN_DEPENDS=	${LOCALBASE}/share/fonts/TrueType/bsmi00lp.ttf:${PORTSDIR}/chinese/arphicttf \
+		latex:${PORTSDIR}/print/teTeX \
 		ttf2pk:${PORTSDIR}/print/freetype-tools
-RUN_DEPENDS:=	${BUILD_DEPENDS} # Equal to BUILD_DEPENDS, immediate effect
-
-BUILD_DEPENDS+=	ttf2pt1:${PORTSDIR}/print/ttf2pt1 \
-		${LOCALBASE}/share/ttf2pt1/maps/cugb.map:${PORTSDIR}/chinese/ttf2pt1
+BUILD_DEPENDS=	${RUN_DEPENDS} \
+		${LOCALBASE}/share/ttf2pt1/maps/cugb.map:${PORTSDIR}/chinese/ttf2pt1 \
+		ttf2pt1:${PORTSDIR}/print/ttf2pt1
 
 USE_GMAKE=	yes
 USE_FREETYPE=	yes
@@ -34,11 +32,11 @@
 SUB_FILES=	pkg-message
 SUB_LIST=	TEXMFMAIN=${LOCALBASE}/share/texmf
 
-INSTALL_DIR=	/usr/bin/install -d -m 0755 -o root -g wheel
+INSTALL_DIR=	${INSTALL} -d -m 0755 -o root -g wheel
 
-CJKDIR=		${PREFIX}/share/texmf/tex/latex/CJK
+CJKDIR=		${TARGETDIR}/share/texmf/tex/latex/CJK
+CJKMAPDIR=	${TARGETDIR}/share/texmf/fonts/map/CJK
 WRKFONTDIR=	${WRKDIR}/fonts
-CJKMAPDIR=	${PREFIX}/share/texmf/fonts/map/CJK
 
 # Options: WITH_*/WITHOUT_*
 OPTIONS=	CCMAP       "CCT CCMap package (for PDFTeX's CID support)" on \
@@ -56,7 +54,6 @@
 .endif
 
 .if !defined(WITHOUT_DVIPDFMX)
-BUILD_DEPENDS+=	dvipdfmx:${PORTSDIR}/print/dvipdfmx
 RUN_DEPENDS+=	dvipdfmx:${PORTSDIR}/print/dvipdfmx
 # Configuration is done by "pkg-install"
 .endif
@@ -71,35 +68,43 @@
 	@${RM} -f ${WRKSRC}/Makefile
 
 post-patch:
-	@${FIND} ${WRKSRC}/texinput -name \*.orig | ${XARGS} -n 1 ${RM} -f
+	@${FIND} ${WRKSRC}/texinput -name \*.orig -delete
 
 pre-install:
 	${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 post-install:
 .if !defined(NOPORTDOCS)
-	${RM} -fr ${PREFIX}/share/doc/CJK
-	${CP} -R ${WRKSRC}/doc ${PREFIX}/share/doc/CJK
+	${RM} -fr ${DOCSDIR}
+	${CP} -R ${WRKSRC}/doc ${DOCSDIR}
 .endif
-	${RM} -fr ${PREFIX}/share/examples/CJK
-	${CP} -R ${WRKSRC}/examples ${PREFIX}/share/examples/CJK
+	${RM} -fr ${EXAMPLESDIR}
+	${CP} -R ${WRKSRC}/examples ${EXAMPLESDIR}
 
 # Install Arphic fonts for Type 3 or DVIPDFMx
 	@${ECHO_CMD} "Generating Arphic fonts' TFM files..."
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh   arb5sung arb5sung.ttf UBig5
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh   arb5kai  arb5kai.ttf  UBig5
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh   argbsung argbsung.ttf UGB
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh   argbkai  argbkai.ttf  UGB
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		arb5sung arb5sung.ttf UBig5
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		arb5kai arb5kai.ttf UBig5
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		argbsung argbsung.ttf UGB
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		argbkai argbkai.ttf UGB
 
 # Install Arphic fonts for Type 1 and PDFTeX
 	@${ECHO_CMD} "Generating Type 1 Arphic fonts..."
 	${MKDIR} ${WRKFONTDIR}
 	${ECHO} -n "" > ${WRKFONTDIR}/CJK-type1.map
 	${ECHO} -n "" > ${WRKFONTDIR}/CJK-pdftex.map
-	cd ${WRKFONTDIR} && LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installt1enc.sh arb5sung arb5sung.ttf Bg5
-	cd ${WRKFONTDIR} && LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installt1enc.sh arb5kai  arb5kai.ttf  Bg5
-	cd ${WRKFONTDIR} && LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installt1enc.sh argbsung argbsung.ttf GB
-	cd ${WRKFONTDIR} && LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installt1enc.sh argbkai  argbkai.ttf  GB
+	cd ${WRKFONTDIR} && ${SETENV} LOCALBASE=${LOCALBASE} ${SH} \
+		${SCRIPTDIR}/installt1enc.sh arb5sung arb5sung.ttf Bg5
+	cd ${WRKFONTDIR} && ${SETENV} LOCALBASE=${LOCALBASE} ${SH} \
+		${SCRIPTDIR}/installt1enc.sh arb5kai arb5kai.ttf Bg5
+	cd ${WRKFONTDIR} && ${SETENV} LOCALBASE=${LOCALBASE} ${SH} \
+		${SCRIPTDIR}/installt1enc.sh argbsung argbsung.ttf GB
+	cd ${WRKFONTDIR} && ${SETENV} LOCALBASE=${LOCALBASE} ${SH} \
+		${SCRIPTDIR}/installt1enc.sh argbkai argbkai.ttf GB
 
 # Install package ccmap
 .if !defined(WITHOUT_CCMAP)
@@ -112,10 +117,14 @@
 # Install Arphic fonts in Unicode separation for Type 3 or DVIPDFMx
 .if defined(WITH_UTF8ARPHIC)
 	@${ECHO_CMD} "Generating Arphic fonts' TFM files in Unicode..."
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh arb5sungu arb5sung.ttf Unicode
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh arb5kaiu  arb5kai.ttf  Unicode
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh argbsungu argbsung.ttf Unicode
-	LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh argbkaiu  argbkai.ttf  Unicode
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		arb5sungu arb5sung.ttf Unicode
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		arb5kaiu arb5kai.ttf Unicode
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		argbsungu argbsung.ttf Unicode
+	${SETENV} LOCALBASE=${LOCALBASE} ${SH} ${SCRIPTDIR}/installtfm.sh \
+		argbkaiu argbkai.ttf Unicode
 .endif
 
 # Mapping files for updmap(1) and PDFTeX
@@ -125,7 +134,6 @@
 
 # Final
 	${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
 	${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
--- CJK-4.6.0_1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->rafan 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Aug 12 07:20:34 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101867 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Mon Aug 14 04:16:28 UTC 2006 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101867 
>Unformatted:
