diff options
author | dholland <dholland@pkgsrc.org> | 2014-12-16 23:51:57 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2014-12-16 23:51:57 +0000 |
commit | 00a257d8da574fa145e7ae22ee1bcf9b02fd2f37 (patch) | |
tree | d581e7686c136039a454f73dbaa902f4d8fc0168 | |
parent | 2de3aeaa5e920418516466acddc3149ab1af50ce (diff) | |
download | pkgsrc-00a257d8da574fa145e7ae22ee1bcf9b02fd2f37.tar.gz |
Adjust the edits to the add-to-xpdfrc file. Do it with SUBST instead
of raw seddery. While here, fix DEINSTALL to more reliably remove the
block this package adds to xpdfrc, and also to avoid stepping on its
own scratch files.
From qjsgkem on freenode.
XXX: This package really shouldn't be munging files in PKG_SYSCONFDIR, but
XXX: that's probably nontrivial to avoid and an issue for some other day.
-rw-r--r-- | print/xpdf-korean/DEINSTALL | 10 | ||||
-rw-r--r-- | print/xpdf-korean/Makefile | 15 |
2 files changed, 13 insertions, 12 deletions
diff --git a/print/xpdf-korean/DEINSTALL b/print/xpdf-korean/DEINSTALL index bc1e8a6e1f6..526b70e08f7 100644 --- a/print/xpdf-korean/DEINSTALL +++ b/print/xpdf-korean/DEINSTALL @@ -1,12 +1,12 @@ -# $NetBSD: DEINSTALL,v 1.4 2005/10/12 11:39:12 wiz Exp $ +# $NetBSD: DEINSTALL,v 1.5 2014/12/16 23:51:57 dholland Exp $ XPDFRC=${PKG_SYSCONFDIR}/xpdfrc case ${STAGE} in POST-DEINSTALL) - ${SED} -e "/orean/d" ${XPDFRC} > ${XPDFRC}.tmp - ${SED} -e "/ksc5601/d" ${XPDFRC}.tmp > ${XPDFRC} - ${SED} -e "/displayCIDFontTT.*Korea/d" ${XPDFRC}.tmp > ${XPDFRC} - ${RM} -f ${XPDFRC}.tmp + ${SED} -e ' + /^#----- begin Korean support package/,/^#----- end Korean support package/d + ' ${XPDFRC} > ${XPDFRC}.tmp || exit 1 + ${MV} ${XPDFRC}.tmp ${XPDFRC} || exit 1 ;; esac diff --git a/print/xpdf-korean/Makefile b/print/xpdf-korean/Makefile index 535f8bade39..03e48291c35 100644 --- a/print/xpdf-korean/Makefile +++ b/print/xpdf-korean/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2014/12/16 23:37:48 dholland Exp $ +# $NetBSD: Makefile,v 1.25 2014/12/16 23:51:57 dholland Exp $ DISTNAME= xpdf-korean-2011-sep-02 PKGNAME= xpdf-korean-20110902 @@ -21,12 +21,13 @@ NO_BUILD= yes INSTALLATION_DIRS+= share/xpdf/korean/CMap -post-patch: - ${MV} ${WRKSRC}/add-to-xpdfrc ${WRKSRC}/add-to-xpdfrc.orig - ${SED} -e 's:/usr/local:'${PREFIX}':g' < ${WRKSRC}/add-to-xpdfrc.orig > ${WRKSRC}/add-to-xpdfrc - ${ECHO} "displayCIDFontTT Adobe-Korea1 ${PREFIX}/share/fonts/X11/TTF/batang.ttf" >> ${WRKSRC}/add-to-xpdfrc - ${ECHO} "displayCIDFontTT Unidocs-Korea1 ${PREFIX}/share/fonts/X11/TTF/batang.ttf" >> ${WRKSRC}/add-to-xpdfrc - +SUBST_CLASSES+= xpdfrc +SUBST_MESSAGE.xpdfrc= Adjusting xpdfrc wedge. +SUBST_STAGE.xpdfrc= post-patch +SUBST_FILES.xpdfrc= add-to-xpdfrc +SUBST_SED.xpdfrc+= -e 's,/usr/\.\.\.\.,'${PREFIX}'/share/fonts/X11/TTF,' \ + -e 's:/usr/local:'${PREFIX}':g' \ + -e '/^.fontFileCC/{;s/^.//;s/.$$//;};' do-install: ${INSTALL_DATA} ${WRKSRC}/Adobe-Korea1.cidToUnicode \ ${WRKSRC}/ISO-2022-KR.unicodeMap ${WRKSRC}/add-to-xpdfrc \ |