blob: 8acb356287b2a6409061bbbabda1b92b2aeee739 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
4
5SRC_URI = " \
6 http://poppler.freedesktop.org/${BP}.tar.xz \
7 file://0001-Do-not-overwrite-all-our-build-flags.patch \
8 file://0002-CairoOutputDev.cc-fix-build-error-when-using-fixedpo.patch \
9"
10SRC_URI[md5sum] = "66a54da4896b1408611699feda5c1821"
11SRC_URI[sha256sum] = "27cc8addafc791e1a26ce6acc2b490926ea73a4f89196dd8a7742cff7cf8a111"
12
13DEPENDS = "fontconfig zlib cairo lcms"
14
15inherit cmake pkgconfig gobject-introspection
16
17PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
18PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg"
19PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng"
20PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff"
21PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl"
22PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg"
23PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native"
24PACKAGECONFIG[nss] = "-DWITH_NSS3=ON,-DWITH_NSS3=OFF,nss"
25
26# surprise - did not expect this to work :)
27inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)}
28
29SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
30
31EXTRA_OECMAKE += " \
32 -DENABLE_XPDF_HEADERS=ON \
33 -DBUILD_GTK_TESTS=OFF \
34 -DENABLE_ZLIB=ON \
35"
36
37do_configure_append() {
38 # poppler macro uses pkg-config to check for g-ir runtimes. Something
39 # makes them point to /usr/bin. Align them to sysroot - that's where the
40 # git-wrappers are:
41 sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja
42}
43
44# check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
45def get_poppler_fpu_setting(bb, d):
46 if d.getVar('TARGET_FPU') in [ 'soft' ]:
47 return "-DUSE_FIXEDPOINT=ON"
48 return ""
49
50EXTRA_OECMAKE += "${@get_poppler_fpu_setting(bb, d)}"
51
52PACKAGES =+ "libpoppler libpoppler-glib"
53FILES_libpoppler = "${libdir}/libpoppler.so.*"
54FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*"
55
56RDEPENDS_libpoppler = "poppler-data"