print/xpdf4: include sample xpdfrc and adjust font search path to PREFIX.diff -r1.9 -r1.10 pkgsrc/print/xpdf4/Makefile
(rhialto)
@@ -1,44 +1,55 @@ | @@ -1,44 +1,55 @@ | |||
1 | # $NetBSD: Makefile,v 1.9 2020/11/05 09:09:00 ryoon Exp $ | 1 | # $NetBSD: Makefile,v 1.10 2020/12/19 13:42:59 rhialto Exp $ | |
2 | 2 | |||
3 | DISTNAME= xpdf-4.02 | 3 | DISTNAME= xpdf-4.02 | |
4 | PKGREVISION= 8 | 4 | PKGREVISION= 9 | |
5 | CATEGORIES= print | 5 | CATEGORIES= print | |
6 | MASTER_SITES= https://xpdfreader-dl.s3.amazonaws.com/ | 6 | MASTER_SITES= https://xpdfreader-dl.s3.amazonaws.com/ | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://www.xpdfreader.com/ | 9 | HOMEPAGE= https://www.xpdfreader.com/ | |
10 | COMMENT= Display tool for PDF files (Qt version) | 10 | COMMENT= Display tool for PDF files (Qt version) | |
11 | LICENSE= gnu-gpl-v2 | 11 | LICENSE= gnu-gpl-v2 | |
12 | 12 | |||
13 | USE_CMAKE= yes | 13 | USE_CMAKE= yes | |
14 | USE_TOOLS+= pkg-config | 14 | USE_TOOLS+= pkg-config | |
15 | USE_LANGUAGES= c c++ | 15 | USE_LANGUAGES= c c++ | |
16 | 16 | |||
17 | TOOL_DEPENDS+= icoutils-[0-9]*:../../graphics/icoutils | 17 | TOOL_DEPENDS+= icoutils-[0-9]*:../../graphics/icoutils | |
18 | 18 | |||
19 | INSTALLATION_DIRS+= share/applications | 19 | INSTALLATION_DIRS+= share/applications | |
20 | INSTALLATION_DIRS+= share/icons/hicolor/scalable/apps | 20 | INSTALLATION_DIRS+= share/icons/hicolor/scalable/apps | |
21 | INSTALLATION_DIRS+= share/icons/hicolor/256x256/apps | 21 | INSTALLATION_DIRS+= share/icons/hicolor/256x256/apps | |
22 | 22 | |||
23 | EGDIR= ${PREFIX}/share/examples/xpdf | |||
24 | CONF_FILES= ${EGDIR}/xpdfrc ${PKG_SYSCONFDIR}/xpdfrc | |||
25 | INSTALLATION_DIRS+= ${EGDIR} | |||
26 | ||||
27 | SUBST_CLASSES+= paths | |||
28 | SUBST_FILES.paths+= doc/sample-xpdfrc xpdf/GlobalParams.cc | |||
29 | SUBST_VARS.paths= PREFIX | |||
30 | SUBST_STAGE.paths= pre-configure | |||
31 | ||||
23 | post-build: | 32 | post-build: | |
24 | cd ${WRKSRC} && ${PREFIX}/bin/icotool -w 256 -h 256 -x -o xpdf-icon.png xpdf-qt/xpdf-icon.ico | 33 | cd ${WRKSRC} && ${PREFIX}/bin/icotool -w 256 -h 256 -x -o xpdf-icon.png xpdf-qt/xpdf-icon.ico | |
25 | 34 | |||
26 | post-install: | 35 | post-install: | |
27 | # Avoid conflicting with poppler-utils | 36 | # Avoid conflicting with poppler-utils | |
28 | ${RM} ${DESTDIR}${PREFIX}/bin/pdf* | 37 | ${RM} ${DESTDIR}${PREFIX}/bin/pdf* | |
29 | ${RM} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pdf* | 38 | ${RM} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pdf* | |
30 | ${INSTALL_DATA} ${FILESDIR}/xpdf.desktop ${DESTDIR}${PREFIX}/share/applications | 39 | ${INSTALL_DATA} ${FILESDIR}/xpdf.desktop ${DESTDIR}${PREFIX}/share/applications | |
31 | ${INSTALL_DATA} ${WRKSRC}/xpdf-qt/xpdf-icon.svg \ | 40 | ${INSTALL_DATA} ${WRKSRC}/xpdf-qt/xpdf-icon.svg \ | |
32 | ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/xpdf.svg | 41 | ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/xpdf.svg | |
33 | ${INSTALL_DATA} ${WRKSRC}/xpdf-icon.png \ | 42 | ${INSTALL_DATA} ${WRKSRC}/xpdf-icon.png \ | |
34 | ${DESTDIR}${PREFIX}/share/icons/hicolor/256x256/apps/xpdf.png | 43 | ${DESTDIR}${PREFIX}/share/icons/hicolor/256x256/apps/xpdf.png | |
44 | ${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc \ | |||
45 | ${DESTDIR}${EGDIR}/xpdfrc | |||
35 | 46 | |||
36 | .include "options.mk" | 47 | .include "options.mk" | |
37 | .include "../../fonts/fontconfig/buildlink3.mk" | 48 | .include "../../fonts/fontconfig/buildlink3.mk" | |
38 | .include "../../graphics/freetype2/buildlink3.mk" | 49 | .include "../../graphics/freetype2/buildlink3.mk" | |
39 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | 50 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | |
40 | .include "../../graphics/png/buildlink3.mk" | 51 | .include "../../graphics/png/buildlink3.mk" | |
41 | .include "../../print/libpaper/buildlink3.mk" | 52 | .include "../../print/libpaper/buildlink3.mk" | |
42 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | 53 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | |
43 | .include "../../x11/qt5-qtbase/buildlink3.mk" | 54 | .include "../../x11/qt5-qtbase/buildlink3.mk" | |
44 | .include "../../mk/bsd.pkg.mk" | 55 | .include "../../mk/bsd.pkg.mk" |
@@ -1,7 +1,8 @@ | @@ -1,7 +1,8 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.1 2019/10/22 22:21:26 nia Exp $ | 1 | @comment $NetBSD: PLIST,v 1.2 2020/12/19 13:42:59 rhialto Exp $ | |
2 | bin/xpdf | 2 | bin/xpdf | |
3 | man/man1/xpdf.1 | 3 | man/man1/xpdf.1 | |
4 | man/man5/xpdfrc.5 | 4 | man/man5/xpdfrc.5 | |
5 | share/applications/xpdf.desktop | 5 | share/applications/xpdf.desktop | |
6 | share/examples/xpdf/xpdfrc | |||
6 | share/icons/hicolor/256x256/apps/xpdf.png | 7 | share/icons/hicolor/256x256/apps/xpdf.png | |
7 | share/icons/hicolor/scalable/apps/xpdf.svg | 8 | share/icons/hicolor/scalable/apps/xpdf.svg |
@@ -1,8 +1,10 @@ | @@ -1,8 +1,10 @@ | |||
1 | $NetBSD: distinfo,v 1.1 2019/10/22 22:21:26 nia Exp $ | 1 | $NetBSD: distinfo,v 1.2 2020/12/19 13:42:59 rhialto Exp $ | |
2 | 2 | |||
3 | SHA1 (xpdf-4.02.tar.gz) = 2b22ad40749e151a095d28a6cf4c9e5727f8d643 | 3 | SHA1 (xpdf-4.02.tar.gz) = 2b22ad40749e151a095d28a6cf4c9e5727f8d643 | |
4 | RMD160 (xpdf-4.02.tar.gz) = ac78da37112bb05ab7a22da93dc628cf901dbfdb | 4 | RMD160 (xpdf-4.02.tar.gz) = ac78da37112bb05ab7a22da93dc628cf901dbfdb | |
5 | SHA512 (xpdf-4.02.tar.gz) = 72c9413fc7241dde5288137ca8a68c837d2a68e95e909dbe2afe8f374b5a7c92af4edf82918963d1c6388c947057fcf5f0ae1e6fbb2b31c3d5eb9a07d3c74ddc | 5 | SHA512 (xpdf-4.02.tar.gz) = 72c9413fc7241dde5288137ca8a68c837d2a68e95e909dbe2afe8f374b5a7c92af4edf82918963d1c6388c947057fcf5f0ae1e6fbb2b31c3d5eb9a07d3c74ddc | |
6 | Size (xpdf-4.02.tar.gz) = 912885 bytes | 6 | Size (xpdf-4.02.tar.gz) = 912885 bytes | |
7 | SHA1 (patch-cmake-config.txt) = a2c25a258c8c72494c3b53854cabf2e51db0c32d | 7 | SHA1 (patch-cmake-config.txt) = a2c25a258c8c72494c3b53854cabf2e51db0c32d | |
8 | SHA1 (patch-doc_sample-xpdfrc) = c16f4355efa279e79b9f27bc256e7569a348f13d | |||
8 | SHA1 (patch-xpdf-qt_XpdfWidgetPrint.cc) = 8d05b6e95228f07cc571b176ec821f5b535424e8 | 9 | SHA1 (patch-xpdf-qt_XpdfWidgetPrint.cc) = 8d05b6e95228f07cc571b176ec821f5b535424e8 | |
10 | SHA1 (patch-xpdf_GlobalParams.cc) = c997a3c3da33c30d259f26fe37b407ab6f1f491f |
$NetBSD: patch-doc_sample-xpdfrc,v 1.1 2020/12/19 13:42:59 rhialto Exp $
Adjust to path names that actually exist (in the fonts/urw-fonts pkg).
--- doc/sample-xpdfrc.orig 2020-12-19 13:11:54.156414314 +0000
+++ doc/sample-xpdfrc
@@ -29,20 +29,20 @@
# installed in a "standard" location, xpdf will find them
# automatically.)
-#fontFile Times-Roman /usr/local/share/ghostscript/fonts/n021003l.pfb
-#fontFile Times-Italic /usr/local/share/ghostscript/fonts/n021023l.pfb
-#fontFile Times-Bold /usr/local/share/ghostscript/fonts/n021004l.pfb
-#fontFile Times-BoldItalic /usr/local/share/ghostscript/fonts/n021024l.pfb
-#fontFile Helvetica /usr/local/share/ghostscript/fonts/n019003l.pfb
-#fontFile Helvetica-Oblique /usr/local/share/ghostscript/fonts/n019023l.pfb
-#fontFile Helvetica-Bold /usr/local/share/ghostscript/fonts/n019004l.pfb
-#fontFile Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
-#fontFile Courier /usr/local/share/ghostscript/fonts/n022003l.pfb
-#fontFile Courier-Oblique /usr/local/share/ghostscript/fonts/n022023l.pfb
-#fontFile Courier-Bold /usr/local/share/ghostscript/fonts/n022004l.pfb
-#fontFile Courier-BoldOblique /usr/local/share/ghostscript/fonts/n022024l.pfb
-#fontFile Symbol /usr/local/share/ghostscript/fonts/s050000l.pfb
-#fontFile ZapfDingbats /usr/local/share/ghostscript/fonts/d050000l.pfb
+#fontFile Times-Roman @PREFIX@/share/fonts/urw/n021003l.pfb
+#fontFile Times-Italic @PREFIX@/share/fonts/urw/n021023l.pfb
+#fontFile Times-Bold @PREFIX@/share/fonts/urw/n021004l.pfb
+#fontFile Times-BoldItalic @PREFIX@/share/fonts/urw/n021024l.pfb
+#fontFile Helvetica @PREFIX@/share/fonts/urw/n019003l.pfb
+#fontFile Helvetica-Oblique @PREFIX@/share/fonts/urw/n019023l.pfb
+#fontFile Helvetica-Bold @PREFIX@/share/fonts/urw/n019004l.pfb
+#fontFile Helvetica-BoldOblique @PREFIX@/share/fonts/urw/n019024l.pfb
+#fontFile Courier @PREFIX@/share/fonts/urw/n022003l.pfb
+#fontFile Courier-Oblique @PREFIX@/share/fonts/urw/n022023l.pfb
+#fontFile Courier-Bold @PREFIX@/share/fonts/urw/n022004l.pfb
+#fontFile Courier-BoldOblique @PREFIX@/share/fonts/urw/n022024l.pfb
+#fontFile Symbol @PREFIX@/share/fonts/urw/s050000l.pfb
+#fontFile ZapfDingbats @PREFIX@/share/fonts/urw/d050000l.pfb
# If you need to display PDF files that refer to non-embedded fonts,
# you should add one or more fontDir options to point to the
@@ -50,7 +50,7 @@
# .pfb, .ttf, and .ttc files in those directories (other files will
# simply be ignored).
-#fontDir /usr/local/fonts/bakoma
+#fontDir @PREFIX@/fonts/bakoma
#----- PostScript output control
$NetBSD: patch-xpdf_GlobalParams.cc,v 1.1 2020/12/19 13:42:59 rhialto Exp $
Adjust font search directories to @PREFIX@.
--- xpdf/GlobalParams.cc.orig 2019-09-25 19:54:33.000000000 +0000
+++ xpdf/GlobalParams.cc
@@ -109,11 +109,16 @@ static const char *displayFontDirs[] = {
};
#else
static const char *displayFontDirs[] = {
- "/usr/share/ghostscript/fonts",
+ "@PREFIX@/share/ghostscript/fonts",
"/usr/local/share/ghostscript/fonts",
- "/usr/share/fonts/default/Type1",
- "/usr/share/fonts/default/ghostscript",
- "/usr/share/fonts/type1/gsfonts",
+ "@PREFIX@/share/fonts/default/Type1",
+ "@PREFIX@/share/fonts/default/ghostscript",
+ "@PREFIX@/share/fonts/type1/gsfonts",
+ "@PREFIX@/share/fonts/X11/Type1",
+ "/usr/X11R6/lib/X11/fonts/Type1",
+ "/usr/X11R7/lib/X11/fonts/Type1",
+ "@PREFIX@/xorg/lib/X11/fonts/Type1",
+ "@PREFIX@/share/fonts/urw",
#if defined(__sun) && defined(__SVR4)
"/usr/sfw/share/ghostscript/fonts",
#endif