summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/poppler
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/poppler')
-rw-r--r--meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.8.bb36
-rw-r--r--meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch38
-rw-r--r--meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch100
-rw-r--r--meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.63.0.bb56
4 files changed, 230 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.8.bb b/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.8.bb
new file mode 100644
index 000000000..343b6db81
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/poppler/poppler-data_0.4.8.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Encoding files for Poppler"
+DESCRIPTION = "Encoding files for use with poppler that enable poppler to \
+ correctly render CJK and Cyrrilic."
+LICENSE = "BSD & GPLv2 & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4870b98343f0bbb25fa43b9d2ba59448 \
+ file://COPYING.adobe;md5=63c6a8a9df204c00461fa5f163d8a663 \
+ file://COPYING.gpl2;md5=751419260aa954499f7abaabaa882bbe \
+"
+
+inherit allarch
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+CMAP_RESOURCES_BASE = "https://github.com/adobe-type-tools/cmap-resources/raw/0561ebca035813ed04c3485bca636a0aa7abdc1d/cmapresources_identity-0/CMap"
+
+SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.gz \
+ ${CMAP_RESOURCES_BASE}/Identity-H;name=idh \
+ ${CMAP_RESOURCES_BASE}/Identity-V;name=idv"
+
+SRC_URI[md5sum] = "00f8989c804de84af0ba2ea629949980"
+SRC_URI[sha256sum] = "1096a18161f263cccdc6d8a2eb5548c41ff8fcf9a3609243f1b6296abdf72872"
+SRC_URI[idh.md5sum] = "009c93cf0141ab7bd6acb7eea14306cc"
+SRC_URI[idh.sha256sum] = "ae702c203a82ea124e9b96590f821db6fbf8754e2c4547a9dba0e82f94739e95"
+SRC_URI[idv.md5sum] = "2f32a45d43d001c26eeac6b878855fbf"
+SRC_URI[idv.sha256sum] = "89a85daf7031e93c883e76b9168a226dfd585bf5506e9e1956772163f15cb082"
+
+do_compile() {
+}
+
+do_install() {
+ oe_runmake install DESTDIR=${D} prefix=${prefix} datadir=${datadir}
+ install -d ${D}${datadir}/poppler/cMap
+ install -m644 ${WORKDIR}/Identity-* ${D}${datadir}/poppler/cMap/
+}
+
+FILES_${PN} += "${datadir}"
diff --git a/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch b/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch
new file mode 100644
index 000000000..18f508519
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch
@@ -0,0 +1,38 @@
+From b6fc6c36d359a50503138cd87d7147faf6dff893 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sat, 17 Mar 2018 20:52:10 +0100
+Subject: [PATCH] Do not overwrite all our build flags
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ cmake/modules/PopplerMacros.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
+index ccb2790..0f392cb 100644
+--- a/cmake/modules/PopplerMacros.cmake
++++ b/cmake/modules/PopplerMacros.cmake
+@@ -125,14 +125,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
+
+ set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
+- set(CMAKE_CXX_FLAGS "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE")
++ set(CMAKE_CXX_FLAGS "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE ${_save_cxxflags}")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cxxflags}")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}")
+ set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline ${_save_cxxflags}")
+ set(CMAKE_CXX_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}")
+ set(_save_cflags "${CMAKE_C_FLAGS}")
+- set(CMAKE_C_FLAGS "-std=c99 -D_DEFAULT_SOURCE")
++ set(CMAKE_C_FLAGS "-std=c99 -D_DEFAULT_SOURCE ${_save_cflags}")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cflags}")
+ set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cflags}")
+ set(CMAKE_C_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}")
+--
+2.14.3
diff --git a/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch b/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch
new file mode 100644
index 000000000..3c231fe93
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/poppler/poppler/0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch
@@ -0,0 +1,100 @@
+From 6287663e7db04df7e6dec58a1fc5bb5d510e8bde Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 9 Apr 2018 19:11:20 +0200
+Subject: [PATCH] CairoOutputDev.cc: fix build error when using fixedpoint
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc: In function 'int splashRound(SplashCoord)':
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:1604:28: error: call of overloaded 'floor(FixedPoint)' is ambiguous
+| return (int)floor(x + 0.5);
+| ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/features.h:428:0,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/os_defines.h:39,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/c++config.h:533,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdint:38,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:44:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/bits/mathcalls.h:165:1: note: candidate: double floor(double)
+| __MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
+| ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/math.h:36:0,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:46:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:260:3: note: candidate: constexpr float std::floor(float)
+| floor(float __x)
+| ^~~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:264:3: note: candidate: constexpr long double std::floor(long double)
+| floor(long double __x)
+| ^~~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc: In function 'int splashCeil(SplashCoord)':
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:1608:21: error: call of overloaded 'ceil(SplashCoord&)' is ambiguous
+| return (int)ceil(x);
+| ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/features.h:428:0,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/os_defines.h:39,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/c++config.h:533,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdint:38,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:44:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/bits/mathcalls.h:159:1: note: candidate: double ceil(double)
+| __MATHCALLX (ceil,, (_Mdouble_ __x), (__const__));
+| ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/math.h:36:0,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:46:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:165:3: note: candidate: constexpr float std::ceil(float)
+| ceil(float __x)
+| ^~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:169:3: note: candidate: constexpr long double std::ceil(long double)
+| ceil(long double __x)
+| ^~~~
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc: In function 'int splashFloor(SplashCoord)':
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:1612:22: error: call of overloaded 'floor(SplashCoord&)' is ambiguous
+| return (int)floor(x);
+| ^
+| In file included from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/features.h:428:0,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/os_defines.h:39,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/arm-oe-linux-gnueabi/bits/c++config.h:533,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/c++/7.3.0/cstdint:38,
+| from <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/poppler-0.63.0/poppler/CairoOutputDev.cc:44:
+| <tmpdir>/oe-core-glibc/work/armv5te-oe-linux-gnueabi/poppler/0.63.0-r0/recipe-sysroot/usr/include/bits/mathcalls.h:165:1: note: candidate: double floor(double)
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ poppler/CairoOutputDev.cc | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
+index 18124b8f..4c85ad65 100644
+--- a/poppler/CairoOutputDev.cc
++++ b/poppler/CairoOutputDev.cc
+@@ -1602,15 +1602,27 @@ void CairoOutputDev::endActualText(GfxState *state)
+ }
+
+ static inline int splashRound(SplashCoord x) {
++#if defined(USE_FIXEDPOINT)
++ return FixedPoint::floor(x + 0.5);
++#else
+ return (int)floor(x + 0.5);
++#endif
+ }
+
+ static inline int splashCeil(SplashCoord x) {
++#if defined(USE_FIXEDPOINT)
++ return FixedPoint::ceil(x);
++#else
+ return (int)ceil(x);
++#endif
+ }
+
+ static inline int splashFloor(SplashCoord x) {
++#if defined(USE_FIXEDPOINT)
++ return FixedPoint::floor(x);
++#else
+ return (int)floor(x);
++#endif
+ }
+
+ static
+--
+2.14.3
+
diff --git a/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.63.0.bb b/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.63.0.bb
new file mode 100644
index 000000000..8acb35628
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.63.0.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = " \
+ http://poppler.freedesktop.org/${BP}.tar.xz \
+ file://0001-Do-not-overwrite-all-our-build-flags.patch \
+ file://0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch \
+"
+SRC_URI[md5sum] = "66a54da4896b1408611699feda5c1821"
+SRC_URI[sha256sum] = "27cc8addafc791e1a26ce6acc2b490926ea73a4f89196dd8a7742cff7cf8a111"
+
+DEPENDS = "fontconfig zlib cairo lcms"
+
+inherit cmake pkgconfig gobject-introspection
+
+PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
+PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg"
+PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng"
+PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff"
+PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl"
+PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg"
+PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native"
+PACKAGECONFIG[nss] = "-DWITH_NSS3=ON,-DWITH_NSS3=OFF,nss"
+
+# surprise - did not expect this to work :)
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)}
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+EXTRA_OECMAKE += " \
+ -DENABLE_XPDF_HEADERS=ON \
+ -DBUILD_GTK_TESTS=OFF \
+ -DENABLE_ZLIB=ON \
+"
+
+do_configure_append() {
+ # poppler macro uses pkg-config to check for g-ir runtimes. Something
+ # makes them point to /usr/bin. Align them to sysroot - that's where the
+ # git-wrappers are:
+ sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja
+}
+
+# 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') in [ 'soft' ]:
+ return "-DUSE_FIXEDPOINT=ON"
+ return ""
+
+EXTRA_OECMAKE += "${@get_poppler_fpu_setting(bb, d)}"
+
+PACKAGES =+ "libpoppler libpoppler-glib"
+FILES_libpoppler = "${libdir}/libpoppler.so.*"
+FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*"
+
+RDEPENDS_libpoppler = "poppler-data"
OpenPOWER on IntegriCloud