mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
- Install the localized xpdfrc separately and use "include"
instead of directly modifying the original xpdfrc. - Take maintainership. Approved by: dryice (maintainer)
This commit is contained in:
parent
f47931fa24
commit
559816b892
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=222920
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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%%
|
||||
|
Loading…
Reference in New Issue
Block a user