diff options
-rw-r--r-- | korean/xpdf/Makefile | 39 | ||||
-rw-r--r-- | korean/xpdf/files/dot.xpdfrc.in | 18 | ||||
-rw-r--r-- | korean/xpdf/pkg-install | 11 | ||||
-rw-r--r-- | korean/xpdf/pkg-plist | 4 |
4 files changed, 34 insertions, 38 deletions
diff --git a/korean/xpdf/Makefile b/korean/xpdf/Makefile index fc1f6960ed24..3c4d1571654b 100644 --- a/korean/xpdf/Makefile +++ b/korean/xpdf/Makefile @@ -6,37 +6,44 @@ # PORTNAME= xpdf -PORTVERSION= 3.01 -PORTREVISION= 3 +PORTVERSION= 3.02 CATEGORIES= korean MASTER_SITES= ftp://ftp.foolabs.com/pub/xpdf/ +PKGNAMESUFFIX= -kofont DISTNAME= xpdf-korean -MAINTAINER= ports@FreeBSD.org -COMMENT= Korean xpdf font support +MAINTAINER= hrs@FreeBSD.org +COMMENT= Korean font support for xpdf RUN_DEPENDS= xpdf:${PORTSDIR}/graphics/xpdf \ ${ADOBECMAPDIR}/ai0/CMap/Identity-H:${PORTSDIR}/print/adobe-cmaps \ - ${LOCALBASE}/lib/X11/fonts/TrueType/UnBatang.ttf:${PORTSDIR}/korean/unfonts-ttf + ${FONTSDIR}/UnBatang.ttf:${PORTSDIR}/korean/unfonts-ttf NO_BUILD= 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}/korean/dot.xpdfrc ADOBECMAPDIR= ${LOCALBASE}/share/fonts/adobe-cmaps INSTALL_FILES= Adobe-Korea1.cidToUnicode ISO-2022-KR.unicodeMap \ - README - -.if defined(WITHOUT_X11) -BROKEN= Broken dependency when WITHOUT_X11 set -.endif + README ../dot.xpdfrc do-install: ${MKDIR} ${DATADIR}/korean - ${INSTALL_DATA} ${WRKDIR}/dot.xpdfrc ${DATADIR}/korean -.for i in ${INSTALL_FILES} - ${INSTALL_DATA} ${WRKSRC}/${i} ${DATADIR}/korean -.endfor - ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + cd ${WRKSRC} && \ + ${INSTALL_DATA} ${INSTALL_FILES} ${DATADIR}/korean + +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/korean/xpdf/files/dot.xpdfrc.in b/korean/xpdf/files/dot.xpdfrc.in index f8ceb1386a50..c15fb4dcf701 100644 --- a/korean/xpdf/files/dot.xpdfrc.in +++ b/korean/xpdf/files/dot.xpdfrc.in @@ -1,16 +1,16 @@ #Korean PDF resources # $FreeBSD$ -cidToUnicode Adobe-Korea1 %%PREFIX%%/share/xpdf/korean/Adobe-Korea1.cidToUnicode -unicodeMap ISO-2022-KR %%PREFIX%%/share/xpdf/korean/ISO-2022-KR.unicodeMap +cidToUnicode Adobe-Korea1 %%DATADIR%%/korean/Adobe-Korea1.cidToUnicode +unicodeMap ISO-2022-KR %%DATADIR%%/korean/ISO-2022-KR.unicodeMap cMapDir Adobe-Korea1 %%ADOBECMAPDIR%% toUnicodeDir %%ADOBECMAPDIR%% -displayNamedCIDFontTT Batang "%%LOCALBASE%%/lib/X11/fonts/TrueType/UnBatang.ttf" -displayNamedCIDFontTT Batang,Bold "%%LOCALBASE%%/lib/X11/fonts/TrueType/UnBatangBold.ttf" -displayNamedCIDFontTT Dotum "%%LOCALBASE%%/lib/X11/fonts/TrueType/UnDotum.ttf" -displayNamedCIDFontTT Dotum,Bold "%%LOCALBASE%%/lib/X11/fonts/TrueType/UnDotumBold.ttf" -displayNamedCIDFontTT Gulim "%%LOCALBASE%%/lib/X11/fonts/TrueType/UnGraphic.ttf" -displayNamedCIDFontTT Gulim,Bold "%%LOCALBASE%%/lib/X11/fonts/TrueType/UnGraphicBold.ttf" -displayNamedCIDFontTT Gungsuh "%%LOCALBASE%%/lib/X11/fonts/TrueType/UnGungseo.ttf" +displayNamedCIDFontTT Batang "%%FONTSDIR%%/UnBatang.ttf" +displayNamedCIDFontTT Batang,Bold "%%FONTSDIR%%/UnBatangBold.ttf" +displayNamedCIDFontTT Dotum "%%FONTSDIR%%/UnDotum.ttf" +displayNamedCIDFontTT Dotum,Bold "%%FONTSDIR%%/UnDotumBold.ttf" +displayNamedCIDFontTT Gulim "%%FONTSDIR%%/UnGraphic.ttf" +displayNamedCIDFontTT Gulim,Bold "%%FONTSDIR%%/UnGraphicBold.ttf" +displayNamedCIDFontTT Gungsuh "%%FONTSDIR%%/UnGungseo.ttf" psFont16 Adobe-Korea1 H Batang-UniKS-UCS2-H UCS-2 psFont16 Adobe-Korea1 V Batang-UniKS-UCS2-V UCS-2 diff --git a/korean/xpdf/pkg-install b/korean/xpdf/pkg-install deleted file mode 100644 index abee3aa12e85..000000000000 --- a/korean/xpdf/pkg-install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ "$2" = "PRE-INSTALL" ]; then - exit 0 -fi -umask 222 -XPDFRC=${PKG_PREFIX}/etc/xpdfrc -ADDRESOURCE=${PKG_PREFIX}/share/xpdf/korean/dot.xpdfrc -/usr/bin/sed '/^#Korean PDF resources$/,/^#Korean PDF resources$/d' ${XPDFRC} > ${XPDFRC}.nokorea -/bin/rm -f ${XPDFRC} -/bin/cat ${XPDFRC}.nokorea ${ADDRESOURCE} > ${XPDFRC} -/bin/rm -f ${XPDFRC}.nokorea diff --git a/korean/xpdf/pkg-plist b/korean/xpdf/pkg-plist index ff83f008d52f..e64610e670d1 100644 --- a/korean/xpdf/pkg-plist +++ b/korean/xpdf/pkg-plist @@ -2,8 +2,8 @@ %%DATADIR%%/korean/Adobe-Korea1.cidToUnicode %%DATADIR%%/korean/ISO-2022-KR.unicodeMap %%DATADIR%%/korean/README -@unexec cp %D/etc/xpdfrc %D/etc/xpdfrc.korea -@unexec (umask 222; /usr/bin/sed '/^#Korean PDF resources$/,/^#Korean PDF resources$/d' < %D/etc/xpdfrc.korea > %D/etc/xpdfrc && rm -f %D/etc/xpdfrc.korea) +@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%%/korean/dot.xpdfrc @dirrm %%DATADIR%%/korean @dirrmtry %%DATADIR%% |