Add Qt5 support for poppler.
Tested by kili@ (maintainer) and sthen@; also aja@ tested and okayed some support patches. This doesn't fix all "libstdc++ overwrites libestdc++ at runtime" issues, but at least allows for sthen@ to proceed. Expect more some ugly tweak proposals on ports@ soon.
This commit is contained in:
parent
b1d48579ab
commit
f3fb154af2
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.99 2015/11/20 07:47:44 kili Exp $
|
||||
# $OpenBSD: Makefile,v 1.100 2015/12/14 14:25:47 zhuk 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
|
||||
|
||||
V= 0.38.0
|
||||
@ -12,12 +13,14 @@ 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
|
||||
|
||||
SHARED_LIBS += poppler 33.0 # 57.0
|
||||
SHARED_LIBS += poppler-glib 14.0 # 15.0
|
||||
SHARED_LIBS += poppler-qt 12.0 # 3.0
|
||||
SHARED_LIBS += poppler-qt4 18.0 # 13.0
|
||||
SHARED_LIBS += poppler-qt5 0.0 # 7.0
|
||||
SHARED_LIBS += poppler-cpp 6.1 # 2.1
|
||||
|
||||
DISTFILES = ${DISTNAME}.tar.xz ${OLDSHIT}.tar.gz
|
||||
@ -31,13 +34,14 @@ PERMIT_PACKAGE_CDROM= Yes
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}
|
||||
|
||||
PSEUDO_FLAVORS=no_qt no_qt4 bootstrap
|
||||
PSEUDO_FLAVORS=no_qt no_qt4 no_qt5 bootstrap
|
||||
# XXX not strictly a bootstrap loop, but on the critical path for libreoffice
|
||||
FLAVOR?=no_qt no_qt4 bootstrap
|
||||
FLAVOR?=no_qt no_qt4 no_qt5 bootstrap
|
||||
|
||||
NOT_FOR_ARCHS-qt4 = arm
|
||||
NOT_FOR_ARCHS-qt5 = arm
|
||||
|
||||
MULTI_PACKAGES=-main -qt -qt4 -utils
|
||||
MULTI_PACKAGES=-main -qt -qt4 -qt5 -utils
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
|
||||
@ -55,8 +59,11 @@ MODULES+= x11/qt4
|
||||
CONFIGURE_ARGS+= --disable-poppler-qt4
|
||||
.endif
|
||||
|
||||
# until Qt5 is enabled
|
||||
.if ${BUILD_PACKAGES:M-qt5}
|
||||
MODULES+= x11/qt5
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-poppler-qt5
|
||||
.endif
|
||||
|
||||
MODULES+= devel/gettext
|
||||
|
||||
@ -79,6 +86,9 @@ LIB_DEPENDS-qt= ${MODQT3_LIB_DEPENDS} \
|
||||
LIB_DEPENDS-qt4=${MODQT4_LIB_DEPENDS} \
|
||||
print/poppler
|
||||
|
||||
LIB_DEPENDS-qt5=${MODQT5_LIB_DEPENDS} \
|
||||
print/poppler
|
||||
|
||||
LIB_DEPENDS-utils= print/poppler
|
||||
|
||||
WANTLIB-main= ${cWANTLIB} Xext ffi gio-2.0 glib-2.0 gmodule-2.0 \
|
||||
@ -91,6 +101,12 @@ 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 openjpeg \
|
||||
png poppler pcre pthread-stubs xcb
|
||||
WANTLIB-qt5= ${cWANTLIB} ${MODQT5_WANTLIB} ${MODGCC4_CPPWANTLIB} \
|
||||
GL Qt5Core Qt5Gui Qt5Widgets Qt5Xml X11 X11-xcb Xau \
|
||||
Xdamage Xdmcp Xext Xfixes Xxf86vm drm execinfo ffi glapi \
|
||||
glib-2.0 gobject-2.0 gthread-2.0 iconv icudata icui18n \
|
||||
icuuc intl lcms2 openjpeg 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 xcb xcb-render xcb-shm openjpeg \
|
||||
poppler z ${cWANTLIB}
|
||||
@ -105,10 +121,19 @@ CONFIGURE_ARGS+=--enable-xpdf-headers \
|
||||
|
||||
CONFIGURE_ENV+= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
LIBJPEG_CFLAGS="-I${LOCALBASE}/include"
|
||||
LIBJPEG_CFLAGS="-I${LOCALBASE}/include" \
|
||||
ac_cv_prog_MOCQT4=${MODQT4_MOC} \
|
||||
ac_cv_prog_MOCQT5=${MODQT5_MOC}
|
||||
|
||||
USE_GMAKE= Yes
|
||||
|
||||
MAIN_CC= /usr/bin/cc
|
||||
MAIN_CXX= /usr/bin/c++
|
||||
.if "${USE_CCACHE:L}" == "yes"
|
||||
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 \
|
||||
@ -118,4 +143,11 @@ post-extract:
|
||||
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 \
|
||||
perl -pi -e 's,^CC = \S+,CC = ${MAIN_CC},;' \
|
||||
-e 's,^CPP = \S+,CPP = ${MAIN_CC},;' \
|
||||
-e 's,^CXX = \S+,CXX = ${MAIN_CXX},;' \
|
||||
-e 's,^CXXCPP = \S+,CXXCPP = ${MAIN_CXX},;'
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.14 2015/08/14 07:58:25 kili Exp $
|
||||
$OpenBSD: patch-configure_ac,v 1.15 2015/12/14 14:25:47 zhuk Exp $
|
||||
--- configure.ac.orig Sun Aug 9 18:28:07 2015
|
||||
+++ configure.ac Thu Aug 13 20:03:50 2015
|
||||
@@ -643,6 +643,24 @@ AC_SUBST(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
|
||||
@ -26,16 +26,56 @@ $OpenBSD: patch-configure_ac,v 1.14 2015/08/14 07:58:25 kili Exp $
|
||||
dnl
|
||||
dnl Try Qt4
|
||||
dnl
|
||||
@@ -675,7 +693,7 @@ AC_SUBST(POPPLER_QT4_LIBS)
|
||||
AC_SUBST(POPPLER_QT4_TEST_LIBS)
|
||||
|
||||
if test x$enable_poppler_qt4 = xyes; then
|
||||
- AC_CHECK_TOOL(MOCQT4, moc)
|
||||
+ AC_CHECK_TOOL(MOCQT4, moc4)
|
||||
AC_MSG_CHECKING([for Qt4 moc])
|
||||
mocversion=`$MOCQT4 -v 2>&1`
|
||||
mocversiongrep=`echo $mocversion | grep "Qt 4"`
|
||||
@@ -960,6 +978,9 @@ glib/reference/Makefile
|
||||
@@ -682,31 +700,35 @@ if test x$enable_poppler_qt5 = xyes; then
|
||||
AC_CHECK_TOOL(MOCQT5, moc)
|
||||
AC_MSG_CHECKING([for Qt5 moc])
|
||||
mocversion=`$MOCQT5 -v 2>&1`
|
||||
- mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"`
|
||||
- if test x"$mocversiongrep" != x"$mocversion"; then
|
||||
+ case $mocversion in
|
||||
+ *Qt\ 5*|*moc\ 5*)
|
||||
+ ;;
|
||||
+ *)
|
||||
AC_MSG_RESULT([no])
|
||||
# moc was not the qt5 one, try with moc-qt5
|
||||
AC_CHECK_TOOL(MOCQT52, moc-qt5)
|
||||
AC_MSG_CHECKING([for Qt5 moc-qt5])
|
||||
mocversion=`$MOCQT52 -v 2>&1`
|
||||
- mocversiongrep=`echo $mocversion | grep "Qt 5\|moc-qt5 5\|moc 5"`
|
||||
- if test x"$mocversiongrep" != x"$mocversion"; then
|
||||
+ case $mocversion in
|
||||
+ *Qt\ 5*|*moc\ 5*|*moc-qt5\ 5*)
|
||||
+ MOCQT5=$MOCQT52
|
||||
+ ;;
|
||||
+ *)
|
||||
AC_CHECK_TOOL(QTCHOOSER, qtchooser)
|
||||
AC_MSG_CHECKING([for qtchooser])
|
||||
qt5tooldir=`QT_SELECT=qt5 qtchooser -print-env | grep QTTOOLDIR | cut -d '=' -f 2 | cut -d \" -f 2`
|
||||
mocversion=`$qt5tooldir/moc -v 2>&1`
|
||||
- mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"`
|
||||
- if test x"$mocversiongrep" != x"$mocversion"; then
|
||||
+ case $mocversion in
|
||||
+ *Qt\ 5*|*moc\ 5*)
|
||||
+ MOCQT5=$qt5tooldir/moc
|
||||
+ ;;
|
||||
+ *)
|
||||
# no valid moc found
|
||||
enable_poppler_qt5=no;
|
||||
MOCQT5="not found"
|
||||
- else
|
||||
- MOCQT5=$qt5tooldir/moc
|
||||
- fi
|
||||
- else
|
||||
- MOCQT5=$MOCQT52
|
||||
- fi
|
||||
- fi
|
||||
+ esac
|
||||
+ esac
|
||||
+ esac
|
||||
AC_SUBST(MOCQT5)
|
||||
AC_MSG_RESULT([$MOCQT5])
|
||||
fi
|
||||
@@ -907,6 +929,9 @@ glib/reference/Makefile
|
||||
glib/reference/version.xml
|
||||
glib/demo/Makefile
|
||||
test/Makefile
|
||||
|
15
print/poppler/patches/patch-qt5_src_Makefile_in
Normal file
15
print/poppler/patches/patch-qt5_src_Makefile_in
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-qt5_src_Makefile_in,v 1.1 2015/12/14 14:25:47 zhuk Exp $
|
||||
Reorder linking to make sure libestdc++ is picked up earlier than libstdc++.
|
||||
--- qt5/src/Makefile.in.orig Fri Dec 11 20:57:08 2015
|
||||
+++ qt5/src/Makefile.in Fri Dec 11 20:57:51 2015
|
||||
@@ -517,8 +517,8 @@ libpoppler_qt5_la_CXXFLAGS = \
|
||||
-Dpoppler_qt5_EXPORTS
|
||||
|
||||
libpoppler_qt5_la_LIBADD = \
|
||||
- $(top_builddir)/poppler/libpoppler.la \
|
||||
- $(POPPLER_QT5_LIBS)
|
||||
+ $(POPPLER_QT5_LIBS) \
|
||||
+ $(top_builddir)/poppler/libpoppler.la
|
||||
|
||||
libpoppler_qt5_la_LDFLAGS = \
|
||||
-version-info 7:0:6 \
|
1
print/poppler/pkg/DESCR-qt5
Normal file
1
print/poppler/pkg/DESCR-qt5
Normal file
@ -0,0 +1 @@
|
||||
Poppler-qt5 is a wrapper for poppler for use with the Qt5 library.
|
14
print/poppler/pkg/PLIST-qt5
Normal file
14
print/poppler/pkg/PLIST-qt5
Normal file
@ -0,0 +1,14 @@
|
||||
@comment $OpenBSD: PLIST-qt5,v 1.1 2015/12/14 14:25:47 zhuk Exp $
|
||||
include/poppler/qt5/
|
||||
include/poppler/qt5/poppler-annotation.h
|
||||
include/poppler/qt5/poppler-export.h
|
||||
include/poppler/qt5/poppler-form.h
|
||||
include/poppler/qt5/poppler-link.h
|
||||
include/poppler/qt5/poppler-media.h
|
||||
include/poppler/qt5/poppler-optcontent.h
|
||||
include/poppler/qt5/poppler-page-transition.h
|
||||
include/poppler/qt5/poppler-qt5.h
|
||||
lib/libpoppler-qt5.a
|
||||
lib/libpoppler-qt5.la
|
||||
@lib lib/libpoppler-qt5.so.${LIBpoppler-qt5_VERSION}
|
||||
lib/pkgconfig/poppler-qt5.pc
|
Loading…
Reference in New Issue
Block a user