Hi,
On Thu, Mar 23, 2017 at 09:04:19PM +0100, Matthias Kilian wrote:
> > Updated diff below, which also kills a stray tab that emacs warns about.
>
> I'll try it this evening in a dpb -uR run.
That didn't went well, because it breaks editors/texmaker,
editors/texworks, graphics/pdf2djvu, and print/texlive/base.
I really don't want even try to switch those to ports gcc now.
Instead, I'll try to patch away the c++11 changes to poppler, but
first I'd like to get rid of the qt subpackages (that's qt3). Or
backport the bugfixess from poppler-0.53 to 0.52 (which is pretty
much the same).
Diff below (including the stray tabs removal from jca). Any objections?
Ciao,
Kili
Index: Makefile
===================================================================
RCS file: /cvs/ports/print/poppler/Makefile,v
retrieving revision 1.119
diff -u -p -r1.119 Makefile
--- Makefile 19 Feb 2017 20:53:26 -0000 1.119
+++ Makefile 25 Mar 2017 22:13:47 -0000
@@ -1,7 +1,6 @@
# $OpenBSD: Makefile,v 1.119 2017/02/19 20:53:26 kili Exp $
COMMENT-main= PDF rendering library
-COMMENT-qt= qt interface to PDF rendering library
COMMENT-qt4= qt4 interface to PDF rendering library
COMMENT-qt5= Qt5 interface to PDF rendering library
COMMENT-utils= PDF conversion tools and utilities
@@ -11,20 +10,17 @@ DISTNAME= poppler-$V
CATEGORIES= print
PKGNAME-main= poppler-$V
PKGNAME-utils= poppler-utils-$V
-PKGNAME-qt= poppler-qt-$V
PKGNAME-qt4= poppler-qt4-$V
PKGNAME-qt5= poppler-qt5-$V
-OLDSHIT = poppler-0.16.7
+
+EXTRACT_SUFX= .tar.xz
SHARED_LIBS += poppler 43.1 # 66.0
SHARED_LIBS += poppler-glib 16.0 # 16.0
-SHARED_LIBS += poppler-qt 12.0 # 3.0
SHARED_LIBS += poppler-qt4 20.1 # 15.0
SHARED_LIBS += poppler-qt5 3.1 # 10.0
SHARED_LIBS += poppler-cpp 8.0 # 3.0
-DISTFILES = ${DISTNAME}.tar.xz ${OLDSHIT}.tar.gz
-
HOMEPAGE= http://poppler.freedesktop.org/
MAINTAINER= Matthias Kilian <[email protected]>
@@ -34,25 +30,19 @@ PERMIT_PACKAGE_CDROM= Yes
MASTER_SITES= ${HOMEPAGE}
-PSEUDO_FLAVORS=no_qt no_qt4 no_qt5 bootstrap
+PSEUDO_FLAVORS=no_qt4 no_qt5 bootstrap
# XXX not strictly a bootstrap loop, but on the critical path for libreoffice
-FLAVOR?=no_qt no_qt4 no_qt5 bootstrap
+FLAVOR?=no_qt4 no_qt5 bootstrap
NOT_FOR_ARCHS-qt4 = arm
NOT_FOR_ARCHS-qt5 = arm
-MULTI_PACKAGES=-main -qt -qt4 -qt5 -utils
+MULTI_PACKAGES=-main -qt4 -qt5 -utils
.include <bsd.port.arch.mk>
cWANTLIB= expat freetype fontconfig jpeg m pthread tiff z
-.if ${BUILD_PACKAGES:M-qt}
-MODULES+= x11/qt3
-.else
-CONFIGURE_ARGS+= --disable-poppler-qt
-.endif
-
.if ${BUILD_PACKAGES:M-qt4}
MODULES+= x11/qt4
.else
@@ -80,9 +70,6 @@ LIB_DEPENDS-main= \
graphics/png \
graphics/tiff
-LIB_DEPENDS-qt= ${MODQT3_LIB_DEPENDS} \
- print/poppler
-
LIB_DEPENDS-qt4=${MODQT4_LIB_DEPENDS} \
print/poppler
@@ -96,12 +83,6 @@ WANTLIB-main= ${cWANTLIB} Xext ffi gio-2
png pthread-stubs xcb xcb-render lcms2 xcb-shm \
iconv intl stdc++
-WANTLIB-qt= ${cWANTLIB} ${MODQT3_WANTLIB} lcms2 openjp2 poppler png \
- pthread-stubs stdc++ \
- GL ICE SM X11 X11-xcb Xcursor Xdamage Xext Xfixes Xft \
- Xi Xinerama Xmu Xrandr Xrender Xt Xxf86vm drm glapi \
- lcms mng xcb xcb-dri2 xcb-glx
-
WANTLIB-qt4= ${cWANTLIB} ${MODQT4_WANTLIB} ICE QtCore QtGui QtXml \
SM X11 Xext Xi Xinerama Xrender ffi glib-2.0 \
gobject-2.0 gthread-2.0 iconv intl lcms2 openjp2 \
@@ -113,7 +94,7 @@ WANTLIB-qt5= ${cWANTLIB} estdc++ \
glib-2.0 gobject-2.0 graphite2 gthread-2.0 harfbuzz \
iconv icudata icui18n icuuc intl lcms2 openjp2 pcre \
pcre16 png poppler pthread-stubs xcb xcb-dri2 xcb-glx
-
+
WANTLIB-utils= X11 Xext Xrender c cairo fontconfig lcms2 m pixman-1 \
png pthread-stubs stdc++ xcb xcb-render xcb-shm openjp2 \
poppler z ${cWANTLIB}
@@ -130,7 +111,6 @@ CONFIGURE_ARGS+=--enable-xpdf-headers \
CONFIGURE_ENV+= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
LIBJPEG_CFLAGS="-I${LOCALBASE}/include" \
- POPPLER_QT_LIBS="-L${LOCALBASE}/lib/qt3 -lqt-mt" \
ac_cv_prog_MOCQT4=${MODQT4_MOC}
USE_GMAKE= Yes
@@ -141,15 +121,6 @@ MAIN_CXX= /usr/bin/c++
MAIN_CC:= ccache ${MAIN_CC}
MAIN_CXX:= ccache ${MAIN_CXX}
.endif
-
-post-extract:
- cd ${WRKDIST} && \
- for i in poppler-qt-uninstalled.pc.in poppler-qt.pc.cmake \
- poppler-qt.pc.in; do \
- ln -sf ../${OLDSHIT}/$$i $$i; \
- done; \
- ln -sf ../../${OLDSHIT}/m4/qt.m4 m4/qt.m4
- cd ${WRKDIST} && cp -R ../${OLDSHIT}/qt qt
post-configure:
find ${WRKBUILD} -name Makefile \! -path '*/qt5/*' -print0 | xargs -0 \
Index: distinfo
===================================================================
RCS file: /cvs/ports/print/poppler/distinfo,v
retrieving revision 1.62
diff -u -p -r1.62 distinfo
--- distinfo 19 Feb 2017 20:53:26 -0000 1.62
+++ distinfo 25 Mar 2017 22:13:47 -0000
@@ -1,4 +1,2 @@
-SHA256 (poppler-0.16.7.tar.gz) = +rTory001BQqcYgZ/XR9QJMLce9SDuDmvMlOLETyK80=
SHA256 (poppler-0.52.0.tar.xz) = UotmFziDn5ol9uWA/NLV2wB+ChlIWAxkifAGJ5jKGZI=
-SIZE (poppler-0.16.7.tar.gz) = 1952179
SIZE (poppler-0.52.0.tar.xz) = 1692144
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 23 Mar 2016 20:09:34 -0000 1.13
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.13 2016/03/23 20:09:34 kili Exp $
---- Makefile.in.orig Wed Mar 16 23:22:12 2016
-+++ Makefile.in Mon Mar 21 11:04:17 2016
-@@ -389,6 +389,8 @@ POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
- POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
- POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
- POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
-+POPPLER_QT_CXXFLAGS = @POPPLER_QT_CXXFLAGS@
-+POPPLER_QT_LIBS = @POPPLER_QT_LIBS@
- POPPLER_QT5_CFLAGS = @POPPLER_QT5_CFLAGS@
- POPPLER_QT5_CXXFLAGS = @POPPLER_QT5_CXXFLAGS@
- POPPLER_QT5_LIBS = @POPPLER_QT5_LIBS@
-@@ -451,6 +453,8 @@ infodir = @infodir@
- install_sh = @install_sh@
- libdir = @libdir@
- libexecdir = @libexecdir@
-+libqt3_CFLAGS = @libqt3_CFLAGS@
-+libqt3_LIBS = @libqt3_LIBS@
- localedir = @localedir@
- localstatedir = @localstatedir@
- mandir = @mandir@
-@@ -477,13 +481,15 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --with-te
- @BUILD_CAIRO_OUTPUT_TRUE@cairo_pc_file = poppler-cairo.pc
- @BUILD_POPPLER_GLIB_TRUE@glib_subdir = glib
- @BUILD_POPPLER_GLIB_TRUE@glib_pc_file = poppler-glib.pc
-+@BUILD_POPPLER_QT_TRUE@qt_subdir = qt
-+@BUILD_POPPLER_QT_TRUE@qt_pc_file = poppler-qt.pc
- @BUILD_POPPLER_QT5_TRUE@qt5_subdir = qt5
- @BUILD_POPPLER_QT5_TRUE@qt5_pc_file = poppler-qt5.pc
- @BUILD_POPPLER_QT4_TRUE@qt4_subdir = qt4
- @BUILD_POPPLER_QT4_TRUE@qt4_pc_file = poppler-qt4.pc
- @BUILD_POPPLER_CPP_TRUE@cpp_subdir = cpp
- @BUILD_POPPLER_CPP_TRUE@cpp_pc_file = poppler-cpp.pc
--SUBDIRS = goo fofi $(splash_subdir) poppler utils $(glib_subdir) test
$(qt4_subdir) $(qt5_subdir) $(cpp_subdir)
-+SUBDIRS = goo fofi $(splash_subdir) poppler utils $(glib_subdir) test
$(qt_subdir) $(qt4_subdir) $(qt5_subdir) $(cpp_subdir)
-
- # Add CMake buildsystem files here so they get added on make dist
- EXTRA_DIST = README-XPDF poppler.pc.in poppler-uninstalled.pc.in \
-@@ -528,6 +534,7 @@ pkgconfig_DATA = \
- $(cairo_pc_file) \
- $(splash_pc_file) \
- $(glib_pc_file) \
-+ $(qt_pc_file) \
- $(qt4_pc_file) \
- $(qt5_pc_file) \
- $(cpp_pc_file)
-@@ -599,6 +606,10 @@ poppler-splash-uninstalled.pc: $(top_builddir)/config.
- poppler-glib.pc: $(top_builddir)/config.status $(srcdir)/poppler-glib.pc.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
- poppler-glib-uninstalled.pc: $(top_builddir)/config.status
$(srcdir)/poppler-glib-uninstalled.pc.in
-+ cd $(top_builddir) && $(SHELL) ./config.status $@
-+poppler-qt.pc: $(top_builddir)/config.status $(srcdir)/poppler-qt.pc.in
-+ cd $(top_builddir) && $(SHELL) ./config.status $@
-+poppler-qt-uninstalled.pc: $(top_builddir)/config.status
$(srcdir)/poppler-qt-uninstalled.pc.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
- poppler-qt4.pc: $(top_builddir)/config.status $(srcdir)/poppler-qt4.pc.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
Index: patches/patch-aclocal_m4
===================================================================
RCS file: patches/patch-aclocal_m4
diff -N patches/patch-aclocal_m4
--- patches/patch-aclocal_m4 18 Dec 2015 22:40:56 -0000 1.10
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-aclocal_m4,v 1.10 2015/12/18 22:40:56 kili Exp $
---- aclocal.m4.orig Thu Dec 17 00:10:12 2015
-+++ aclocal.m4 Thu Dec 17 20:12:20 2015
-@@ -2434,6 +2434,7 @@ m4_include([m4/define-dir.m4])
- m4_include([m4/gtk-doc.m4])
- m4_include([m4/iconv.m4])
- m4_include([m4/introspection.m4])
-+m4_include([m4/qt.m4])
- m4_include([m4/libjpeg.m4])
- m4_include([m4/libtool.m4])
- m4_include([m4/ltoptions.m4])
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- patches/patch-configure_ac 17 Dec 2016 01:20:10 -0000 1.22
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-$OpenBSD: patch-configure_ac,v 1.22 2016/12/17 01:20:10 kili Exp $
---- configure.ac.orig Thu Dec 15 22:30:56 2016
-+++ configure.ac Fri Dec 16 14:16:48 2016
-@@ -681,6 +681,24 @@ AC_SUBST(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
-
- GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
-
-+AC_ARG_ENABLE(poppler-qt,
-+ AC_HELP_STRING([--disable-poppler-qt],
-+ [Don't compile poppler qt wrapper.]),
-+ enable_poppler_qt=$enableval,
-+ enable_poppler_qt="try")
-+
-+if test x$enable_poppler_qt = xyes; then
-+ POPPLER_FIND_QT(POPPLER_QT,,)
-+elif test x$enable_poppler_qt = xtry; then
-+ POPPLER_FIND_QT(POPPLER_QT,
-+ [enable_poppler_qt="yes"],
-+ [enable_poppler_qt="no"])
-+fi
-+AC_SUBST(POPPLER_QT_CXXFLAGS)
-+AC_SUBST(POPPLER_QT_LIBS)
-+
-+AM_CONDITIONAL(BUILD_POPPLER_QT, test "x$enable_poppler_qt" = "xyes")
-+
- dnl
- dnl Try Qt4
- dnl
-@@ -998,6 +1016,9 @@ glib/reference/Makefile
- glib/reference/version.xml
- glib/demo/Makefile
- test/Makefile
-+poppler-qt.pc
-+poppler-qt-uninstalled.pc
-+qt/Makefile
- qt4/Makefile
- qt4/src/Makefile
- qt4/tests/Makefile
-@@ -1033,6 +1054,7 @@ if test x$enable_cmyk = xyes;then
- echo " with CMYK support"
- fi
- echo " cairo output: $use_cairo"
-+echo " qt wrapper: $enable_poppler_qt"
- echo " qt4 wrapper: $enable_poppler_qt4"
- echo " qt5 wrapper: $enable_poppler_qt5"
- echo " glib wrapper: $use_glib"
Index: patches/patch-qt_poppler-document_cc
===================================================================
RCS file: patches/patch-qt_poppler-document_cc
diff -N patches/patch-qt_poppler-document_cc
--- patches/patch-qt_poppler-document_cc 7 Jan 2015 14:53:01 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-qt_poppler-document_cc,v 1.2 2015/01/07 14:53:01 kili Exp $
---- qt/poppler-document.cc.orig Mon Jan 5 14:53:48 2015
-+++ qt/poppler-document.cc Mon Jan 5 15:02:20 2015
-@@ -326,7 +326,11 @@ bool Document::print(const QString &fileName, QValueLi
-
- bool Document::print(const QString &file, QValueList<int> pageList, double
hDPI, double vDPI, int rotate, int paperWidth, int paperHeight)
- {
-- PSOutputDev *psOut = new PSOutputDev(file.latin1(), &(data->doc),
data->doc.getXRef(), data->doc.getCatalog(), NULL, 1, data->doc.getNumPages(),
psModePS, paperWidth, paperHeight);
-+ std::vector<int> pages;
-+ for (int i = 1; i <= data->doc.getNumPages(); ++i) {
-+ pages.push_back(i);
-+ }
-+ PSOutputDev *psOut = new PSOutputDev(file.latin1(), &(data->doc), NULL,
pages, psModePS, paperWidth, paperHeight);
-
- if (psOut->isOk()) {
- QValueList<int>::iterator it;
Index: patches/patch-qt_poppler-page_cc
===================================================================
RCS file: patches/patch-qt_poppler-page_cc
diff -N patches/patch-qt_poppler-page_cc
--- patches/patch-qt_poppler-page_cc 15 Aug 2013 18:40:20 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
-$OpenBSD: patch-qt_poppler-page_cc,v 1.3 2013/08/15 18:40:20 kili Exp $
---- qt/poppler-page.cc.orig Sat Aug 3 22:54:43 2013
-+++ qt/poppler-page.cc Sun Aug 4 23:07:10 2013
-@@ -74,7 +74,10 @@ QImage Page::renderToImage(double xres, double yres, b
- SplashOutputDev *output_dev;
- SplashBitmap *bitmap;
- SplashColorPtr color_ptr;
-+ XRef *xref;
-+
- output_dev = data->doc->data->getOutputDev();
-+ xref = data->doc->data->doc.getXRef(); // OMFG
-
- data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, xres,
yres,
- 0, false, true, false, -1, -1, -1, -1);
-@@ -104,7 +107,7 @@ QImage Page::renderToImage(double xres, double yres, b
- QImage img( dataPtr, bw, bh, 32, 0, 0, QImage::IgnoreEndian );
- img = img.copy();
- // unload underlying xpdf bitmap
-- output_dev->startPage( 0, NULL );
-+ output_dev->startPage( 0, NULL, xref);
-
- return img;
- #else
-@@ -124,7 +127,7 @@ QString Page::getText(const Rectangle &r) const
- QString result;
- ::Page *p;
-
-- output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
-+ output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse);
- data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, 72, 72,
- 0, false, false, false, -1, -1, -1, -1);
- p = data->page;
-@@ -155,7 +158,7 @@ QValueList<TextBox*> Page::textList() const
-
- QValueList<TextBox*> output_list;
-
-- output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
-+ output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse);
-
- data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, 72, 72,
- 0, false, false, false, -1, -1, -1, -1);
-@@ -239,7 +242,7 @@ QValueList<Link*> Page::links() const
- Links *xpdfLinks = data->doc->data->doc.getLinks(data->index + 1);
- for (int i = 0; i < xpdfLinks->getNumLinks(); ++i)
- {
-- ::Link *xpdfLink = xpdfLinks->getLink(i);
-+ ::AnnotLink *xpdfLink = xpdfLinks->getLink(i);
-
- double left, top, right, bottom;
- int leftAux, topAux, rightAux, bottomAux;
Index: patches/patch-qt_poppler-private_h
===================================================================
RCS file: patches/patch-qt_poppler-private_h
diff -N patches/patch-qt_poppler-private_h
--- patches/patch-qt_poppler-private_h 13 Jul 2012 15:04:46 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-qt_poppler-private_h,v 1.1 2012/07/13 15:04:46 kili Exp $
---- qt/poppler-private.h.orig Mon Jul 9 19:01:04 2012
-+++ qt/poppler-private.h Mon Jul 9 19:53:26 2012
-@@ -77,7 +77,7 @@ class DocumentData {
- white[1] = 255;
- white[2] = 255;
- m_outputDev = new SplashOutputDev(splashModeXBGR8, 4, gFalse,
white);
-- m_outputDev->startDoc(doc.getXRef());
-+ m_outputDev->startDoc(&doc);
- }
- #endif
- return m_outputDev;
Index: pkg/DESCR-qt
===================================================================
RCS file: pkg/DESCR-qt
diff -N pkg/DESCR-qt
--- pkg/DESCR-qt 6 Jun 2012 18:27:34 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-Poppler-qt is a wrapper for poppler for use with the qt library.
Index: pkg/PLIST-qt
===================================================================
RCS file: pkg/PLIST-qt
diff -N pkg/PLIST-qt
--- pkg/PLIST-qt 1 Oct 2014 21:44:48 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
-@comment $OpenBSD: PLIST-qt,v 1.6 2014/10/01 21:44:48 ajacoutot Exp $
-@conflict poppler-<0.5.4p0
-include/poppler/qt3/
-include/poppler/qt3/poppler-link-qt3.h
-include/poppler/qt3/poppler-page-transition.h
-include/poppler/qt3/poppler-qt.h
-lib/libpoppler-qt.a
-lib/libpoppler-qt.la
-@lib lib/libpoppler-qt.so.${LIBpoppler-qt_VERSION}
-lib/pkgconfig/poppler-qt.pc