[oe] [meta-oe][PATCH] poppler: Support building against QT4-embedded

Gary Thomas gary at mlbassoc.com
Fri Oct 9 12:55:01 UTC 2015


These changes allow the poppler package to build using qt4e.
To enable them, add this line to local.conf
  PACKAGECONFIG_append_pn-poppler = " qt4e"

Signed-off-by: Gary Thomas <gary at mlbassoc.com>
Upstream-status: Innapropriate [OE configuration]
---
 .../fix-qt4e-library-dependencies.patch            | 28 ++++++++++++++++++++++
 meta-oe/recipes-support/poppler/poppler_0.35.0.bb  |  6 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/poppler/poppler-0.35.0/fix-qt4e-library-dependencies.patch

diff --git a/meta-oe/recipes-support/poppler/poppler-0.35.0/fix-qt4e-library-dependencies.patch b/meta-oe/recipes-support/poppler/poppler-0.35.0/fix-qt4e-library-dependencies.patch
new file mode 100644
index 0000000..f67e1f5
--- /dev/null
+++ b/meta-oe/recipes-support/poppler/poppler-0.35.0/fix-qt4e-library-dependencies.patch
@@ -0,0 +1,28 @@
+Configuration changes needed to allow building with QT4-embedded
+
+Index: poppler-0.35.0/configure.ac
+===================================================================
+--- poppler-0.35.0.orig/configure.ac
++++ poppler-0.35.0/configure.ac
+@@ -654,17 +654,17 @@ AC_ARG_ENABLE(poppler-qt4,
+               enable_poppler_qt4="try")
+ if test x$enable_poppler_qt4 = xyes; then
+   PKG_CHECK_MODULES(POPPLER_QT4, 
+-	            QtCore >= 4.7.0 QtGui >= 4.7.0 QtXml >= 4.7.0)
++	            QtCoreE >= 4.7.0 QtGuiE >= 4.7.0 QtXmlE >= 4.7.0)
+   PKG_CHECK_MODULES(POPPLER_QT4_TEST, 
+-	            QtTest >= 4.7.0)
++	            QtTestE >= 4.7.0)
+ elif test x$enable_poppler_qt4 = xtry; then
+   PKG_CHECK_MODULES(POPPLER_QT4,
+-                    QtCore >= 4.7.0 QtGui >= 4.7.0 QtXml >= 4.7.0,
++                    QtCoreE >= 4.7.0 QtGuiE >= 4.7.0 QtXmlE >= 4.7.0,
+                     [enable_poppler_qt4="yes"],
+                     [enable_poppler_qt4="no"])
+   if test x$enable_poppler_qt4 = xyes; then
+     PKG_CHECK_MODULES(POPPLER_QT4_TEST,
+-                    QtTest >= 4.7.0,
++                    QtTestE >= 4.7.0,
+                     [enable_poppler_qt4="yes"],
+                     [enable_poppler_qt4="no"])
+   fi
diff --git a/meta-oe/recipes-support/poppler/poppler_0.35.0.bb b/meta-oe/recipes-support/poppler/poppler_0.35.0.bb
index 520aa6b..efb7241 100644
--- a/meta-oe/recipes-support/poppler/poppler_0.35.0.bb
+++ b/meta-oe/recipes-support/poppler/poppler_0.35.0.bb
@@ -20,14 +20,18 @@ PACKAGECONFIG[tiff] = "--enable-libtiff,--disable-libtiff,tiff"
 PACKAGECONFIG[curl] = "--enable-libcurl,--disable-libcurl,curl"
 PACKAGECONFIG[openjpeg] = "--enable-libopenjpeg=openjpeg2,--disable-libopenjpeg,openjpeg"
 PACKAGECONFIG[qt5] = "--enable-poppler-qt5 --with-moc-qt5=${STAGING_BINDIR_NATIVE}/qt5/moc,--disable-poppler-qt5,qtbase"
+PACKAGECONFIG[qt4e] = "--enable-poppler-qt4 --with-moc-qt4=${STAGING_BINDIR_NATIVE}/moc4,--disable-poppler-qt4,qt4-embedded"
 
 EXTRA_OECONF = "\
     --enable-xpdf-headers \
     --disable-gtk-test \
-    --disable-poppler-qt4 \
     --enable-zlib \
 "
 
+# Adjust library names when building for QT4e
+QT4E_PATCHES = "${@bb.utils.contains('PACKAGECONFIG', 'qt4e', 'file://fix-qt4e-library-dependencies.patch', '', d)}"
+SRC_URI_append = "${QT4E_PATCHES}"
+
 # check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
 def get_poppler_fpu_setting(bb, d):
     if d.getVar('TARGET_FPU', 1) in [ 'soft' ]:
-- 
1.9.1




More information about the Openembedded-devel mailing list