pkgsrc-WIP-changes archive

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

xpopple: Add version 3.04.0



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Wed Sep 28 19:41:14 2022 +0200
Changeset:	bcc92f3f21bd5e6c34ceb9bda30f8055354e9760

Modified Files:
	Makefile
Added Files:
	xpopple/DESCR
	xpopple/Makefile
	xpopple/PLIST
	xpopple/distinfo
	xpopple/patches/patch-configure.ac
	xpopple/patches/patch-xpdf_XPDFViewer.cc

Log Message:
xpopple: Add version 3.04.0

xpopple is the xpdf version 3 program - a Motif-based PDF viewer for X11

Modified to use the Poppler library. This gives you the classic xpdf
interface, with Poppler's updated rendering facilities.

Why would you want to use xpopple rather than something like Evince?
One advantage is the flexible resource-based customisability of the
Motif interface and xpdf's commands system.
Another advantage is the much better performance with DISPLAY redirected
via network (compared to the Qt-based xdpf version 4, that is very slow
in this case).

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

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

diffstat:
 Makefile                                 |  1 +
 xpopple/DESCR                            | 11 ++++++
 xpopple/Makefile                         | 57 ++++++++++++++++++++++++++++++++
 xpopple/PLIST                            |  5 +++
 xpopple/distinfo                         |  7 ++++
 xpopple/patches/patch-configure.ac       | 31 +++++++++++++++++
 xpopple/patches/patch-xpdf_XPDFViewer.cc | 16 +++++++++
 7 files changed, 128 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 71f1694cc7..f9c4ff096b 100644
--- a/Makefile
+++ b/Makefile
@@ -6084,6 +6084,7 @@ SUBDIR+=	xpilot-ng
 SUBDIR+=	xpipe
 SUBDIR+=	xplore
 SUBDIR+=	xplugd
+SUBDIR+=	xpopple
 SUBDIR+=	xqf
 SUBDIR+=	xrdp
 SUBDIR+=	xsb
diff --git a/xpopple/DESCR b/xpopple/DESCR
new file mode 100644
index 0000000000..732ce2b4aa
--- /dev/null
+++ b/xpopple/DESCR
@@ -0,0 +1,11 @@
+xpopple is the xpdf version 3 program - a Motif-based PDF viewer for X11
+
+Modified to use the Poppler library. This gives you the classic xpdf
+interface, with Poppler's updated rendering facilities.
+
+Why would you want to use xpopple rather than something like Evince?
+One advantage is the flexible resource-based customisability of the
+Motif interface and xpdf's commands system.
+Another advantage is the much better performance with DISPLAY redirected
+via network (compared to the Qt-based xdpf version 4, that is very slow
+in this case).
diff --git a/xpopple/Makefile b/xpopple/Makefile
new file mode 100644
index 0000000000..f2659e5bf9
--- /dev/null
+++ b/xpopple/Makefile
@@ -0,0 +1,57 @@
+# $NetBSD$
+
+DISTNAME=	xpopple-3.04.0
+CATEGORIES=	print
+GIT_REPO=	http://offog.org/git/xpopple.git
+GIT_BRANCH=	master
+GIT_REVISION=	2229941bfaa12dd23ea482e6ba356f57a2686cb7
+
+MAINTAINER=	micha%NetBSD.org@localhost
+HOMEPAGE=	https://offog.org/code/xpopple/
+COMMENT=	Display tool for PDF files (based on Motif and Poppler)
+LICENSE=	gnu-gpl-v2 OR gnu-gpl-v3
+
+CONFLICTS=	xpdf-[0-9]*
+CONFLICTS+=	xpdf4-[0-9]*
+
+USE_LANGUAGES=		c c++17
+USE_TOOLS=		autoconf automake autoreconf pkg-config
+
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ENV+=		CXXFLAGS=${CXXFLAGS:M*:Q}
+MAKE_ENV+=		SED=${SED:Q} ECHO=${ECHO:Q}
+
+DEPENDS+=	urw-fonts-[0-9]*:../../fonts/urw-fonts
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_SYSCONFSUBDIR=	xpdf
+EGDIR=			${PREFIX}/share/examples/xpdf
+CONF_FILES=		${EGDIR}/xpdfrc ${PKG_SYSCONFDIR}/xpdfrc
+INSTALLATION_DIRS=	${EGDIR}
+
+SUBST_CLASSES+=		paths
+SUBST_STAGE.paths=	pre-configure
+SUBST_FILES.paths+=	doc/sample-xpdfrc doc/xpdf.1 doc/xpdfrc.5
+SUBST_SED.paths=	-e "s,/usr/local,${PREFIX},g"
+SUBST_SED.paths+=	-e "s,/usr/local/etc/xpdf,${PKG_SYSCONFDIR},g"
+SUBST_SED.paths+=	-e "s, /etc/xpdf, ${PKG_SYSCONFDIR},g"
+
+pre-configure:
+	set -e; cd ${WRKSRC} && autoreconf -fiv
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc \
+		${DESTDIR}${EGDIR}/xpdfrc
+
+.include "../../mk/motif.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+BUILDLINK_API_DEPENDS.poppler+=	poppler>=0.19
+.include "../../print/poppler/buildlink3.mk"
+.include "../../print/poppler-includes/buildlink3.mk"
+.include "../../x11/libXpm/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/xpopple/PLIST b/xpopple/PLIST
new file mode 100644
index 0000000000..6c07d31d67
--- /dev/null
+++ b/xpopple/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD$
+bin/xpdf
+man/man1/xpdf.1
+man/man5/xpdfrc.5
+share/examples/xpdf/xpdfrc
diff --git a/xpopple/distinfo b/xpopple/distinfo
new file mode 100644
index 0000000000..482bb8d707
--- /dev/null
+++ b/xpopple/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+BLAKE2s (xpopple-0.0.0.tar.gz) = 69217a3079908094e11121d042354a7c1f55b6482ca1a51e1b250dfd1ed0eef9
+SHA512 (xpopple-0.0.0.tar.gz) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
+Size (xpopple-0.0.0.tar.gz) = 0 bytes
+SHA1 (patch-configure.ac) = 184ed19038c072674a9a9e7d8b286a7aa85b7e4e
+SHA1 (patch-xpdf_XPDFViewer.cc) = 0d44bc52b5408885b982d2b376dc0342b030854d
diff --git a/xpopple/patches/patch-configure.ac b/xpopple/patches/patch-configure.ac
new file mode 100644
index 0000000000..7e0cf1830c
--- /dev/null
+++ b/xpopple/patches/patch-configure.ac
@@ -0,0 +1,31 @@
+$NetBSD$
+
+With poppler 22.04.0:
+error: 'class Links' has no member named 'getNumLinks'; did you mean 'getLinks'?
+
+Add check for libXpm.
+
+--- configure.ac.orig	2022-09-28 11:53:00.000000000 +0000
++++ configure.ac
+@@ -57,7 +57,7 @@ PKG_CHECK_EXISTS([poppler >= 22.03.0], [
+   AC_DEFINE([PDFDOC_PASSWORDS_OPTIONAL])
+   AC_DEFINE([PDFDOC_SAVEAS_GOOSTRING])
+ ])
+-PKG_CHECK_EXISTS([poppler >= 22.05.0], [
++PKG_CHECK_EXISTS([poppler >= 22.04.0], [
+   AC_DEFINE([LINKS_GETLINKS])
+ ])
+ 
+@@ -69,6 +69,12 @@ PKG_CHECK_MODULES([XT], [xt x11])
+ CPPFLAGS="$CPPFLAGS $XT_CFLAGS"
+ LIBS="$LIBS $XT_LIBS"
+ 
++PKG_CHECK_MODULES([XPM], [xpm x11], [
++  AC_DEFINE([HAVE_X11_XPM_H])
++])
++CPPFLAGS="$CPPFLAGS $XPM_CFLAGS"
++LIBS="$LIBS $XPM_LIBS"
++
+ AC_SEARCH_LIBS([pthread_mutexattr_settype], [pthread], [], [
+   AC_MSG_ERROR([pthreads is required])
+ ])
diff --git a/xpopple/patches/patch-xpdf_XPDFViewer.cc b/xpopple/patches/patch-xpdf_XPDFViewer.cc
new file mode 100644
index 0000000000..d0e60adf81
--- /dev/null
+++ b/xpopple/patches/patch-xpdf_XPDFViewer.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Include XPM icon. Required for HAVE_X11_XPM_H.
+
+--- xpdf/XPDFViewer.cc.orig	2022-09-28 11:53:00.000000000 +0000
++++ xpdf/XPDFViewer.cc
+@@ -103,6 +103,9 @@
+ // GUI includes
+ //------------------------------------------------------------------------
+ 
++#ifdef HAVE_X11_XPM_H
++#include "xpdfIcon.xpm"
++#endif
+ #include "leftArrow.xbm"
+ #include "leftArrowDis.xbm"
+ #include "dblLeftArrow.xbm"


Home | Main Index | Thread Index | Old Index