pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print Add print/xpdf4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/24a4e3ce86e2
branches:  trunk
changeset: 342638:24a4e3ce86e2
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Oct 22 22:21:26 2019 +0000

description:
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:

 print/Makefile                                       |   3 +-
 print/xpdf/Makefile                                  |   4 +-
 print/xpdf4/DESCR                                    |   4 +
 print/xpdf4/Makefile                                 |  43 ++++++++++++++++++++
 print/xpdf4/PLIST                                    |   7 +++
 print/xpdf4/distinfo                                 |   8 +++
 print/xpdf4/files/xpdf.desktop                       |  11 +++++
 print/xpdf4/options.mk                               |  19 ++++++++
 print/xpdf4/patches/patch-cmake-config.txt           |  17 +++++++
 print/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc |  24 +++++++++++
 10 files changed, 137 insertions(+), 3 deletions(-)

diffs (200 lines):

diff -r 9b3e16f344c4 -r 24a4e3ce86e2 print/Makefile
--- a/print/Makefile    Tue Oct 22 18:45:30 2019 +0000
+++ b/print/Makefile    Tue Oct 22 22:21:26 2019 +0000
@@ -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+=       xdvik
 SUBDIR+=       xetex
 SUBDIR+=       xpdf
+SUBDIR+=       xpdf4
 SUBDIR+=       xpdf-arabic
 SUBDIR+=       xpdf-chinese-simplified
 SUBDIR+=       xpdf-chinese-traditional
diff -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf/Makefile
--- a/print/xpdf/Makefile       Tue Oct 22 18:45:30 2019 +0000
+++ b/print/xpdf/Makefile       Tue Oct 22 22:21:26 2019 +0000
@@ -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 @@
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/DESCR Tue Oct 22 22:21:26 2019 +0000
@@ -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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/Makefile      Tue Oct 22 22:21:26 2019 +0000
@@ -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@localhost
+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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/PLIST Tue Oct 22 22:21:26 2019 +0000
@@ -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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/distinfo      Tue Oct 22 22:21:26 2019 +0000
@@ -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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/files/xpdf.desktop
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/files/xpdf.desktop    Tue Oct 22 22:21:26 2019 +0000
@@ -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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/options.mk    Tue Oct 22 22:21:26 2019 +0000
@@ -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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/patches/patch-cmake-config.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/patches/patch-cmake-config.txt        Tue Oct 22 22:21:26 2019 +0000
@@ -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 -r 9b3e16f344c4 -r 24a4e3ce86e2 print/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc      Tue Oct 22 22:21:26 2019 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index