pkgsrc-WIP-changes archive

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

xpdf4: add update candidate



Module Name:	pkgsrc-wip
Committed By:	pin <voidpin%protonmail.com@localhost>
Pushed By:	pin
Date:		Mon Feb 23 11:51:59 2026 +0100
Changeset:	cb900a4a353862fe1f477c07aa04225c5bd11023

Modified Files:
	Makefile
Added Files:
	xpdf4/DESCR
	xpdf4/Makefile
	xpdf4/PLIST
	xpdf4/distinfo
	xpdf4/files/xpdf.desktop
	xpdf4/options.mk
	xpdf4/patches/patch-cmake-config.txt
	xpdf4/patches/patch-doc_sample-xpdfrc
	xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc
	xpdf4/patches/patch-xpdf_GlobalParams.cc

Log Message:
xpdf4: add update candidate

While here switch to Qt6.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cb900a4a353862fe1f477c07aa04225c5bd11023

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                       |  1 +
 xpdf4/DESCR                                    |  4 ++
 xpdf4/Makefile                                 | 56 ++++++++++++++++++++++++++
 xpdf4/PLIST                                    |  8 ++++
 xpdf4/distinfo                                 |  9 +++++
 xpdf4/files/xpdf.desktop                       | 11 +++++
 xpdf4/options.mk                               | 19 +++++++++
 xpdf4/patches/patch-cmake-config.txt           | 17 ++++++++
 xpdf4/patches/patch-doc_sample-xpdfrc          | 50 +++++++++++++++++++++++
 xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc | 24 +++++++++++
 xpdf4/patches/patch-xpdf_GlobalParams.cc       | 27 +++++++++++++
 11 files changed, 226 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index eee2f49a58..e048c65725 100644
--- a/Makefile
+++ b/Makefile
@@ -6184,6 +6184,7 @@ SUBDIR+=	xorriso
 SUBDIR+=	xoscope
 SUBDIR+=	xournalpp-git
 SUBDIR+=	xpde
+SUBDIR+=	xpdf4
 SUBDIR+=	xpdq
 SUBDIR+=	xpi-quick_locale_switcher
 SUBDIR+=	xpilot-ng
diff --git a/xpdf4/DESCR b/xpdf4/DESCR
new file mode 100644
index 0000000000..b81132dbbb
--- /dev/null
+++ b/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/xpdf4/Makefile b/xpdf4/Makefile
new file mode 100644
index 0000000000..86454fef9b
--- /dev/null
+++ b/xpdf4/Makefile
@@ -0,0 +1,56 @@
+# $NetBSD: Makefile,v 1.48 2026/02/06 10:05:46 wiz Exp $
+
+DISTNAME=	xpdf-4.06
+CATEGORIES=	print
+MASTER_SITES=	https://dl.xpdfreader.com/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.xpdfreader.com/
+COMMENT=	Display tool for PDF files (Qt version)
+LICENSE=	gnu-gpl-v2
+
+DEPENDS+=	urw-fonts-[0-9]*:../../fonts/urw-fonts
+
+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
+
+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
+
+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
+	${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc \
+	    ${DESTDIR}${EGDIR}/xpdfrc
+
+.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/qt6-qtbase/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/xpdf4/PLIST b/xpdf4/PLIST
new file mode 100644
index 0000000000..4d0e28d173
--- /dev/null
+++ b/xpdf4/PLIST
@@ -0,0 +1,8 @@
+@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/xpdf4/distinfo b/xpdf4/distinfo
new file mode 100644
index 0000000000..513f8c3c65
--- /dev/null
+++ b/xpdf4/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.7 2024/04/02 18:27:55 rhialto Exp $
+
+BLAKE2s (xpdf-4.06.tar.gz) = d9f883b3a90c52d08aeae22f1b3c4dc24658c0b51f0c1c388daf05e2342bd8c6
+SHA512 (xpdf-4.06.tar.gz) = ace2d2c006411ef40f3510fe34809e6ed5fd4a2367ac11a75e9d4795aa5054e72f12e307165d11a25b12609d33b279b9b99d9c072442e98308a77ad022bc8355
+Size (xpdf-4.06.tar.gz) = 999317 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) = a0322fda0b8977afc8b7ea2d7855395e59fd837d
diff --git a/xpdf4/files/xpdf.desktop b/xpdf4/files/xpdf.desktop
new file mode 100644
index 0000000000..be2c85cc82
--- /dev/null
+++ b/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/xpdf4/options.mk b/xpdf4/options.mk
new file mode 100644
index 0000000000..e3ccf40558
--- /dev/null
+++ b/xpdf4/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.3 2024/08/25 06:19:11 wiz 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_CONFIGURE_ARGS+=	-DXPDFWIDGET_PRINTING=ON
+.include "../../print/libcups/buildlink3.mk"
+.elif ${OPSYS} != "Darwin"
+CMAKE_CONFIGURE_ARGS+=	-DXPDFWIDGET_PRINTING=OFF
+.endif
diff --git a/xpdf4/patches/patch-cmake-config.txt b/xpdf4/patches/patch-cmake-config.txt
new file mode 100644
index 0000000000..59c36b2912
--- /dev/null
+++ b/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/xpdf4/patches/patch-doc_sample-xpdfrc b/xpdf4/patches/patch-doc_sample-xpdfrc
new file mode 100644
index 0000000000..9e4d5aa38d
--- /dev/null
+++ b/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/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc b/xpdf4/patches/patch-xpdf-qt_XpdfWidgetPrint.cc
new file mode 100644
index 0000000000..b69accd061
--- /dev/null
+++ b/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);
diff --git a/xpdf4/patches/patch-xpdf_GlobalParams.cc b/xpdf4/patches/patch-xpdf_GlobalParams.cc
new file mode 100644
index 0000000000..f75bcbab0d
--- /dev/null
+++ b/xpdf4/patches/patch-xpdf_GlobalParams.cc
@@ -0,0 +1,27 @@
+$NetBSD: patch-xpdf_GlobalParams.cc,v 1.2 2024/04/02 18:27:55 rhialto Exp $
+
+Adjust font search directories to @PREFIX@.
+
+--- xpdf/GlobalParams.cc.orig	2024-02-07 20:32:41.000000000 +0000
++++ xpdf/GlobalParams.cc
+@@ -107,11 +107,16 @@ static const char *displayFontDirs[] = {
+   "c:/windows/fonts",
+   "c:/winnt/fonts",
+ #else // _WIN32
+-  "/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


Home | Main Index | Thread Index | Old Index