pkgsrc/print/xpdf-korean/Makefile
dholland 713690ef0a 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.
2014-12-16 23:51:57 +00:00

38 lines
1.1 KiB
Makefile

# $NetBSD: Makefile,v 1.25 2014/12/16 23:51:57 dholland Exp $
DISTNAME= xpdf-korean-2011-sep-02
PKGNAME= xpdf-korean-20110902
PKGREVISION= 1
CATEGORIES= print
MASTER_SITES= ftp://ftp.foolabs.com/pub/xpdf/ \
http://gd.tuwien.ac.at/publishing/xpdf/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.foolabs.com/xpdf/
COMMENT= Xpdf support files for Korean
LICENSE= gnu-gpl-v2 OR gnu-gpl-v3
DEPENDS+= xpdf>=2.02:../../print/xpdf
DEPENDS+= baekmuk-ttf>=1.0:../../fonts/baekmuk-ttf
WRKSRC= ${WRKDIR}/xpdf-korean
NO_CONFIGURE= yes
NO_BUILD= yes
INSTALLATION_DIRS+= share/xpdf/korean/CMap
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 \
${DESTDIR}${PREFIX}/share/xpdf/korean
${INSTALL_DATA} ${WRKSRC}/CMap/* \
${DESTDIR}${PREFIX}/share/xpdf/korean/CMap
.include "../../mk/bsd.pkg.mk"