summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorrhialto <rhialto@pkgsrc.org>2020-12-19 13:42:59 +0000
committerrhialto <rhialto@pkgsrc.org>2020-12-19 13:42:59 +0000
commit49f121a64cfdc3cf998db913194150dfe1292069 (patch)
tree830a4a7ba3102fc09f85e71b3c6146c84ae053af /print
parent626d6eab0b1821fda4067ba14a37b63cca3d02b0 (diff)
downloadpkgsrc-49f121a64cfdc3cf998db913194150dfe1292069.tar.gz
print/xpdf4: include sample xpdfrc and adjust font search path to PREFIX.
Diffstat (limited to 'print')
-rw-r--r--print/xpdf4/Makefile15
-rw-r--r--print/xpdf4/PLIST3
-rw-r--r--print/xpdf4/distinfo4
-rw-r--r--print/xpdf4/patches/patch-doc_sample-xpdfrc50
-rw-r--r--print/xpdf4/patches/patch-xpdf_GlobalParams.cc27
5 files changed, 95 insertions, 4 deletions
diff --git a/print/xpdf4/Makefile b/print/xpdf4/Makefile
index 4dd1d3b1c97..6159c93618c 100644
--- a/print/xpdf4/Makefile
+++ b/print/xpdf4/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2020/11/05 09:09:00 ryoon Exp $
+# $NetBSD: Makefile,v 1.10 2020/12/19 13:42:59 rhialto Exp $
DISTNAME= xpdf-4.02
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= print
MASTER_SITES= https://xpdfreader-dl.s3.amazonaws.com/
@@ -20,6 +20,15 @@ INSTALLATION_DIRS+= share/applications
INSTALLATION_DIRS+= share/icons/hicolor/scalable/apps
INSTALLATION_DIRS+= share/icons/hicolor/256x256/apps
+EGDIR= ${PREFIX}/share/examples/xpdf
+CONF_FILES= ${EGDIR}/xpdfrc ${PKG_SYSCONFDIR}/xpdfrc
+INSTALLATION_DIRS+= ${EGDIR}
+
+SUBST_CLASSES+= paths
+SUBST_FILES.paths+= doc/sample-xpdfrc xpdf/GlobalParams.cc
+SUBST_VARS.paths= PREFIX
+SUBST_STAGE.paths= pre-configure
+
post-build:
cd ${WRKSRC} && ${PREFIX}/bin/icotool -w 256 -h 256 -x -o xpdf-icon.png xpdf-qt/xpdf-icon.ico
@@ -32,6 +41,8 @@ post-install:
${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/xpdf.svg
${INSTALL_DATA} ${WRKSRC}/xpdf-icon.png \
${DESTDIR}${PREFIX}/share/icons/hicolor/256x256/apps/xpdf.png
+ ${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc \
+ ${DESTDIR}${EGDIR}/xpdfrc
.include "options.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
diff --git a/print/xpdf4/PLIST b/print/xpdf4/PLIST
index 391810b06bf..4d0e28d1730 100644
--- a/print/xpdf4/PLIST
+++ b/print/xpdf4/PLIST
@@ -1,7 +1,8 @@
-@comment $NetBSD: PLIST,v 1.1 2019/10/22 22:21:26 nia Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/12/19 13:42:59 rhialto Exp $
bin/xpdf
man/man1/xpdf.1
man/man5/xpdfrc.5
share/applications/xpdf.desktop
+share/examples/xpdf/xpdfrc
share/icons/hicolor/256x256/apps/xpdf.png
share/icons/hicolor/scalable/apps/xpdf.svg
diff --git a/print/xpdf4/distinfo b/print/xpdf4/distinfo
index 8ebc43b50fd..5d3a93d424b 100644
--- a/print/xpdf4/distinfo
+++ b/print/xpdf4/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.1 2019/10/22 22:21:26 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/12/19 13:42:59 rhialto Exp $
SHA1 (xpdf-4.02.tar.gz) = 2b22ad40749e151a095d28a6cf4c9e5727f8d643
RMD160 (xpdf-4.02.tar.gz) = ac78da37112bb05ab7a22da93dc628cf901dbfdb
SHA512 (xpdf-4.02.tar.gz) = 72c9413fc7241dde5288137ca8a68c837d2a68e95e909dbe2afe8f374b5a7c92af4edf82918963d1c6388c947057fcf5f0ae1e6fbb2b31c3d5eb9a07d3c74ddc
Size (xpdf-4.02.tar.gz) = 912885 bytes
SHA1 (patch-cmake-config.txt) = a2c25a258c8c72494c3b53854cabf2e51db0c32d
+SHA1 (patch-doc_sample-xpdfrc) = c16f4355efa279e79b9f27bc256e7569a348f13d
SHA1 (patch-xpdf-qt_XpdfWidgetPrint.cc) = 8d05b6e95228f07cc571b176ec821f5b535424e8
+SHA1 (patch-xpdf_GlobalParams.cc) = c997a3c3da33c30d259f26fe37b407ab6f1f491f
diff --git a/print/xpdf4/patches/patch-doc_sample-xpdfrc b/print/xpdf4/patches/patch-doc_sample-xpdfrc
new file mode 100644
index 00000000000..9e4d5aa38d6
--- /dev/null
+++ b/print/xpdf4/patches/patch-doc_sample-xpdfrc
@@ -0,0 +1,50 @@
+$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
+
diff --git a/print/xpdf4/patches/patch-xpdf_GlobalParams.cc b/print/xpdf4/patches/patch-xpdf_GlobalParams.cc
new file mode 100644
index 00000000000..7af86f85436
--- /dev/null
+++ b/print/xpdf4/patches/patch-xpdf_GlobalParams.cc
@@ -0,0 +1,27 @@
+$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