summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-10-22 22:21:26 +0000
committernia <nia@pkgsrc.org>2019-10-22 22:21:26 +0000
commit917634e0213b781dd9e4541c03fa078ea110edfc (patch)
tree2e0c3fe906442a2802815387cf1eda7b0c61ecd1 /print
parentf1484b483d4ac92e11b7238eef09b18c3cde39b7 (diff)
downloadpkgsrc-917634e0213b781dd9e4541c03fa078ea110edfc.tar.gz
Add print/xpdf4.
Xpdf is a viewer for Portable Document Format (PDF) files using the Qt toolkit. Note: this version does not include the command line tools because they conflict with poppler-utils.
Diffstat (limited to 'print')
-rw-r--r--print/Makefile3
-rw-r--r--print/xpdf/Makefile4
-rw-r--r--print/xpdf4/DESCR4
-rw-r--r--print/xpdf4/Makefile43
-rw-r--r--print/xpdf4/PLIST7
-rw-r--r--print/xpdf4/distinfo8
-rw-r--r--print/xpdf4/files/xpdf.desktop11
-rw-r--r--print/xpdf4/options.mk19
-rw-r--r--print/xpdf4/patches/patch-cmake-config.txt17
-rw-r--r--print/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc24
10 files changed, 137 insertions, 3 deletions
diff --git a/print/Makefile b/print/Makefile
index 5b7d5f576b6..8395234bd03 100644
--- a/print/Makefile
+++ b/print/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.749 2019/10/17 06:12:53 wiz Exp $
+# $NetBSD: Makefile,v 1.750 2019/10/22 22:21:26 nia Exp $
#
COMMENT= Desktop publishing
@@ -1447,6 +1447,7 @@ SUBDIR+= web2c
SUBDIR+= xdvik
SUBDIR+= xetex
SUBDIR+= xpdf
+SUBDIR+= xpdf4
SUBDIR+= xpdf-arabic
SUBDIR+= xpdf-chinese-simplified
SUBDIR+= xpdf-chinese-traditional
diff --git a/print/xpdf/Makefile b/print/xpdf/Makefile
index a3b333c1bf2..564a2c14d3b 100644
--- a/print/xpdf/Makefile
+++ b/print/xpdf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.87 2019/05/23 19:23:14 rillig Exp $
+# $NetBSD: Makefile,v 1.88 2019/10/22 22:21:26 nia Exp $
DISTNAME= xpdf-3.04
CATEGORIES= print
@@ -8,7 +8,7 @@ PKGREVISION= 1
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.xpdfreader.com/
-COMMENT= Display tool for PDF files
+COMMENT= Display tool for PDF files (Motif version)
LICENSE= gnu-gpl-v2
MAKE_JOBS_SAFE= no
diff --git a/print/xpdf4/DESCR b/print/xpdf4/DESCR
new file mode 100644
index 00000000000..b81132dbbba
--- /dev/null
+++ b/print/xpdf4/DESCR
@@ -0,0 +1,4 @@
+Xpdf is a viewer for Portable Document Format (PDF) files using the Qt toolkit.
+
+Note: this version does not include the command line tools because they
+conflict with poppler-utils.
diff --git a/print/xpdf4/Makefile b/print/xpdf4/Makefile
new file mode 100644
index 00000000000..95a8cc2e3e6
--- /dev/null
+++ b/print/xpdf4/Makefile
@@ -0,0 +1,43 @@
+# $NetBSD: Makefile,v 1.1 2019/10/22 22:21:26 nia Exp $
+
+DISTNAME= xpdf-4.02
+CATEGORIES= print
+MASTER_SITES= https://xpdfreader-dl.s3.amazonaws.com/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://www.xpdfreader.com/
+COMMENT= Display tool for PDF files (Qt version)
+LICENSE= gnu-gpl-v2
+
+USE_CMAKE= yes
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+TOOL_DEPENDS+= icoutils-[0-9]*:../../graphics/icoutils
+
+INSTALLATION_DIRS+= share/applications
+INSTALLATION_DIRS+= share/icons/hicolor/scalable/apps
+INSTALLATION_DIRS+= share/icons/hicolor/256x256/apps
+
+post-build:
+ cd ${WRKSRC} && ${PREFIX}/bin/icotool -w 256 -h 256 -x -o xpdf-icon.png xpdf-qt/xpdf-icon.ico
+
+post-install:
+ # Avoid conflicting with poppler-utils
+ ${RM} ${DESTDIR}${PREFIX}/bin/pdf*
+ ${RM} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pdf*
+ ${INSTALL_DATA} ${FILESDIR}/xpdf.desktop ${DESTDIR}${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKSRC}/xpdf-qt/xpdf-icon.svg \
+ ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/xpdf.svg
+ ${INSTALL_DATA} ${WRKSRC}/xpdf-icon.png \
+ ${DESTDIR}${PREFIX}/share/icons/hicolor/256x256/apps/xpdf.png
+
+.include "options.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../print/libpaper/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/print/xpdf4/PLIST b/print/xpdf4/PLIST
new file mode 100644
index 00000000000..391810b06bf
--- /dev/null
+++ b/print/xpdf4/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2019/10/22 22:21:26 nia Exp $
+bin/xpdf
+man/man1/xpdf.1
+man/man5/xpdfrc.5
+share/applications/xpdf.desktop
+share/icons/hicolor/256x256/apps/xpdf.png
+share/icons/hicolor/scalable/apps/xpdf.svg
diff --git a/print/xpdf4/distinfo b/print/xpdf4/distinfo
new file mode 100644
index 00000000000..8ebc43b50fd
--- /dev/null
+++ b/print/xpdf4/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2019/10/22 22:21:26 nia 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-xpdf-qt_XpdfWidgetPrint.cc) = 8d05b6e95228f07cc571b176ec821f5b535424e8
diff --git a/print/xpdf4/files/xpdf.desktop b/print/xpdf4/files/xpdf.desktop
new file mode 100644
index 00000000000..be2c85cc820
--- /dev/null
+++ b/print/xpdf4/files/xpdf.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=xpdf
+GenericName=PDF viewer
+Comment=View Portable Document Format files
+Exec=xpdf %f
+Terminal=false
+Type=Application
+Icon=xpdf
+Categories=Office;
+MimeType=application/pdf;
+
diff --git a/print/xpdf4/options.mk b/print/xpdf4/options.mk
new file mode 100644
index 00000000000..00cd8a40d68
--- /dev/null
+++ b/print/xpdf4/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1 2019/10/22 22:21:26 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.xpdf4
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${OPSYS} != "Darwin"
+PKG_SUPPORTED_OPTIONS= cups
+PKG_SUGGESTED_OPTIONS= cups
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mcups)
+CMAKE_ARGS+= -DXPDFWIDGET_PRINTING=ON
+.include "../../print/cups-base/buildlink3.mk"
+.elif ${OPSYS} != "Darwin"
+CMAKE_ARGS+= -DXPDFWIDGET_PRINTING=OFF
+.endif
diff --git a/print/xpdf4/patches/patch-cmake-config.txt b/print/xpdf4/patches/patch-cmake-config.txt
new file mode 100644
index 00000000000..59c36b29122
--- /dev/null
+++ b/print/xpdf4/patches/patch-cmake-config.txt
@@ -0,0 +1,17 @@
+$NetBSD: patch-cmake-config.txt,v 1.1 2019/10/22 22:21:26 nia Exp $
+
+CMake Error at xpdf/cmake_install.cmake:45 (file):
+ file RPATH_CHANGE could not write new RPATH
+
+--- cmake-config.txt.orig 2019-09-25 19:54:33.000000000 +0000
++++ cmake-config.txt
+@@ -70,9 +70,6 @@ if (WIN32)
+ endforeach ()
+ endif ()
+
+-#--- don't set an rpath
+-set(CMAKE_SKIP_RPATH FALSE)
+-
+ #--- miscellaneous options
+ option(A4_PAPER "use A4 (instead of Letter) paper size by default for PostScript output" OFF)
+ option(NO_TEXT_SELECT "do not allow text selection" OFF)
diff --git a/print/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc b/print/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc
new file mode 100644
index 00000000000..b69accd0612
--- /dev/null
+++ b/print/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc
@@ -0,0 +1,24 @@
+$NetBSD: patch-xpdf-qt_XpdfWidgetPrint.cc,v 1.1 2019/10/22 22:21:26 nia Exp $
+
+Use CUPS on !Linux.
+
+--- xpdf-qt/XpdfWidgetPrint.cc.orig 2019-09-25 19:54:33.000000000 +0000
++++ xpdf-qt/XpdfWidgetPrint.cc
+@@ -21,7 +21,7 @@
+ #elif defined(__APPLE__)
+ # include <CoreFoundation/CoreFoundation.h>
+ # include <ApplicationServices/ApplicationServices.h>
+-#elif defined(__linux__)
++#else
+ # include "PSOutputDev.h"
+ # include <cups/cups.h>
+ #endif
+@@ -315,7 +315,7 @@ XpdfWidget::ErrorCode printPDF(PDFDoc *d
+ // Linux
+ //------------------------------------------------------------------------
+
+-#elif defined(__linux__)
++#else
+
+ static void fileOut(void *stream, const char *data, int len) {
+ fwrite(data, 1, len, (FILE *)stream);