aboutsummaryrefslogtreecommitdiffstats
path: root/chinese
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2008-11-16 20:25:22 +0800
committerhrs <hrs@FreeBSD.org>2008-11-16 20:25:22 +0800
commitdd32fbc0c5d632c94467a13071cf23956ecbe862 (patch)
tree19a7b409f265cb7c93f307a5efda603bc755f89d /chinese
parent3d61e43f01b966d0351b03ed52b27c13e9b01288 (diff)
downloadfreebsd-ports-gnome-dd32fbc0c5d632c94467a13071cf23956ecbe862.tar.gz
freebsd-ports-gnome-dd32fbc0c5d632c94467a13071cf23956ecbe862.tar.zst
freebsd-ports-gnome-dd32fbc0c5d632c94467a13071cf23956ecbe862.zip
- Install the localized xpdfrc separately and use "include"
instead of directly modifying the original xpdfrc. - Take maintainership. Approved by: dryice (maintainer)
Diffstat (limited to 'chinese')
-rw-r--r--chinese/xpdf/Makefile46
-rw-r--r--chinese/xpdf/files/dot.xpdfrc.in18
-rw-r--r--chinese/xpdf/pkg-install9
-rw-r--r--chinese/xpdf/pkg-plist6
4 files changed, 41 insertions, 38 deletions
diff --git a/chinese/xpdf/Makefile b/chinese/xpdf/Makefile
index 07f43a7f5ade..8f91d496a271 100644
--- a/chinese/xpdf/Makefile
+++ b/chinese/xpdf/Makefile
@@ -6,44 +6,56 @@
#
PORTNAME= xpdf
-PORTVERSION= 20040727
-PORTREVISION= 4
+PORTVERSION= 3.02
+PORTEPOCH= 1
CATEGORIES= chinese graphics print
MASTER_SITES= ftp://ftp.foolabs.com/pub/xpdf/ \
${MASTER_SITE_TEX_CTAN} \
http://dryice.name/computer/FreeBSD/distfiles/
MASTER_SITE_SUBDIR= support/xpdf
+PKGNAMESUFFIX= -zhfont
DISTFILES= xpdf-chinese-simplified-2004-jul-27.tar.gz \
xpdf-chinese-traditional-2004-jul-27.tar.gz
-MAINTAINER= dryice@dryice.name
-COMMENT= Chinese xpdf font support
+MAINTAINER= hrs@FreeBSD.org
+COMMENT= Chinese font support for xpdf
-RUN_DEPENDS= xpdf:${PORTSDIR}/graphics/xpdf\
+RUN_DEPENDS= xpdf:${PORTSDIR}/graphics/xpdf \
${ADOBECMAPDIR}/ai0/CMap/Identity-H:${PORTSDIR}/print/adobe-cmaps \
- ${LOCALBASE}/share/arphicttf/logo.gif:${PORTSDIR}/chinese/arphicttf
+ ${FONTSDIR}/bkai00mp.ttf:${PORTSDIR}/chinese/arphicttf
NO_BUILD= yes
NO_WRKSUBDIR= yes
SUB_FILES= dot.xpdfrc
-SUB_LIST= ADOBECMAPDIR=${ADOBECMAPDIR}
+SUB_LIST= ADOBECMAPDIR=${ADOBECMAPDIR} \
+ FONTSDIR=${FONTSDIR}
+PLIST_SUB= EXTRARC=${EXTRARC}
+DATADIR= ${PREFIX}/share/xpdf
+FONTSDIR= ${LOCALBASE}/share/fonts/TrueType
+EXTRARC= ${DATADIR}/chinese-traditional/dot.xpdfrc
+ADOBECMAPDIR= ${LOCALBASE}/share/fonts/adobe-cmaps
SIMP_FILES= Adobe-GB1.cidToUnicode EUC-CN.unicodeMap GBK.unicodeMap \
ISO-2022-CN.unicodeMap README
TRAD_FILES= Adobe-CNS1.cidToUnicode Big5.unicodeMap \
Big5ascii.unicodeMap README
-ADOBECMAPDIR= ${LOCALBASE}/share/fonts/adobe-cmaps
do-install:
- @${MKDIR} ${DATADIR}/chinese-simplified
-.for i in ${SIMP_FILES}
- ${INSTALL_DATA} ${WRKSRC}/xpdf-chinese-simplified/${i} ${DATADIR}/chinese-simplified
-.endfor
- @${MKDIR} ${DATADIR}/chinese-traditional
-.for i in ${TRAD_FILES}
- ${INSTALL_DATA} ${WRKSRC}/xpdf-chinese-traditional/${i} ${DATADIR}/chinese-traditional
-.endfor
+ ${MKDIR} ${DATADIR}/chinese-simplified
+ cd ${WRKSRC}/xpdf-chinese-simplified \
+ && ${INSTALL_DATA} ${SIMP_FILES} ${DATADIR}/chinese-simplified
+ ${MKDIR} ${DATADIR}/chinese-traditional
+ cd ${WRKSRC}/xpdf-chinese-traditional \
+ && ${INSTALL_DATA} ${TRAD_FILES} ${DATADIR}/chinese-traditional
${INSTALL_DATA} ${WRKSRC}/dot.xpdfrc ${DATADIR}/chinese-traditional
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
+post-install:
+ exec < ${LOCALBASE}/etc/xpdfrc; \
+ ${RM} -f ${LOCALBASE}/etc/xpdfrc; \
+ ( ${GREP} -v "${EXTRARC}"; \
+ ${ECHO_CMD} "include ${EXTRARC}" ) \
+ > ${LOCALBASE}/etc/xpdfrc
+ ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${LOCALBASE}/etc/xpdfrc
+ ${CHMOD} 0444 ${LOCALBASE}/etc/xpdfrc
.include <bsd.port.mk>
diff --git a/chinese/xpdf/files/dot.xpdfrc.in b/chinese/xpdf/files/dot.xpdfrc.in
index 0c3e43814cde..3d0d8dd9c176 100644
--- a/chinese/xpdf/files/dot.xpdfrc.in
+++ b/chinese/xpdf/files/dot.xpdfrc.in
@@ -1,17 +1,17 @@
#----- begin Chinese Traditional support package (2004-jul-27)
-cidToUnicode Adobe-CNS1 %%LOCALBASE%%/share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
-unicodeMap Big5 %%LOCALBASE%%/share/xpdf/chinese-traditional/Big5.unicodeMap
-unicodeMap Big5ascii %%LOCALBASE%%/share/xpdf/chinese-traditional/Big5ascii.unicodeMap
+cidToUnicode Adobe-CNS1 %%DATADIR%%/chinese-traditional/Adobe-CNS1.cidToUnicode
+unicodeMap Big5 %%DATADIR%%/chinese-traditional/Big5.unicodeMap
+unicodeMap Big5ascii %%DATADIR%%/chinese-traditional/Big5ascii.unicodeMap
cMapDir Adobe-CNS1 %%ADOBECMAPDIR%%
toUnicodeDir %%ADOBECMAPDIR%%
-displayCIDFontTT Adobe-CNS1 %%LOCALBASE%%/share/fonts/TrueType/bkai00mp.ttf
+displayCIDFontTT Adobe-CNS1 %%FONTSDIR%%/bkai00mp.ttf
#----- end Chinese Traditional support package
#----- begin Chinese Simplified support package (2004-jul-27)
-cidToUnicode Adobe-GB1 %%LOCALBASE%%/share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
-unicodeMap ISO-2022-CN %%LOCALBASE%%/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
-unicodeMap EUC-CN %%LOCALBASE%%/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
-unicodeMap GBK %%LOCALBASE%%/share/xpdf/chinese-simplified/GBK.unicodeMap
+cidToUnicode Adobe-GB1 %%DATADIR%%/chinese-simplified/Adobe-GB1.cidToUnicode
+unicodeMap ISO-2022-CN %%DATADIR%%/chinese-simplified/ISO-2022-CN.unicodeMap
+unicodeMap EUC-CN %%DATADIR%%/chinese-simplified/EUC-CN.unicodeMap
+unicodeMap GBK %%DATADIR%%/chinese-simplified/GBK.unicodeMap
cMapDir Adobe-GB1 %%ADOBECMAPDIR%%
toUnicodeDir %%ADOBECMAPDIR%%
-displayCIDFontTT Adobe-GB1 %%LOCALBASE%%/share/fonts/TrueType/gkai00mp.ttf
+displayCIDFontTT Adobe-GB1 %%FONTSDIR%%/gkai00mp.ttf
#----- end Chinese Simplified support package
diff --git a/chinese/xpdf/pkg-install b/chinese/xpdf/pkg-install
deleted file mode 100644
index 1810a1ea6743..000000000000
--- a/chinese/xpdf/pkg-install
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-if [ "$2" = "PRE-INSTALL" ]; then
- exit 0
-fi
-XPDFRC=${PKG_PREFIX}/etc/xpdfrc
-ADDRESOURCE=${PKG_PREFIX}/share/xpdf/chinese-traditional/dot.xpdfrc
-grep -F -v --file=${ADDRESOURCE} ${XPDFRC} > ${XPDFRC}.nochinese-traditional
-cat ${XPDFRC}.nochinese-traditional ${ADDRESOURCE} > ${XPDFRC}
-rm -f ${XPDFRC}.nochinese-traditional
diff --git a/chinese/xpdf/pkg-plist b/chinese/xpdf/pkg-plist
index d5c4a0b0d6b8..fd3ec2e78250 100644
--- a/chinese/xpdf/pkg-plist
+++ b/chinese/xpdf/pkg-plist
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
%%DATADIR%%/chinese-simplified/Adobe-GB1.cidToUnicode
%%DATADIR%%/chinese-simplified/EUC-CN.unicodeMap
%%DATADIR%%/chinese-simplified/GBK.unicodeMap
@@ -7,10 +8,9 @@
%%DATADIR%%/chinese-traditional/Big5.unicodeMap
%%DATADIR%%/chinese-traditional/Big5ascii.unicodeMap
%%DATADIR%%/chinese-traditional/README
-@unexec cp %D/etc/xpdfrc %D/etc/xpdfrc.chinese-traditional
-@unexec grep -F -v --file=%D/%%DATADIR%%/chinese-traditional/dot.xpdfrc %D/etc/xpdfrc.chinese-traditional > %D/etc/xpdfrc
+@exec exec < %D/etc/xpdfrc; rm -f %D/etc/xpdfrc; ( grep -v "%%EXTRARC%%"; echo "include %%EXTRARC%%" ) > %D/etc/xpdfrc; chmod 0444 %D/etc/xpdfrc
+@unexec exec < %D/etc/xpdfrc; rm -f %D/etc/xpdfrc; grep -v "%%EXTRARC%%" > %D/etc/xpdfrc
%%DATADIR%%/chinese-traditional/dot.xpdfrc
-@rmtry etc/xpdfrc.chinese-traditional
@dirrm %%DATADIR%%/chinese-simplified
@dirrm %%DATADIR%%/chinese-traditional
@dirrmtry %%DATADIR%%