blob: 37f859353d59981bb9d7489fd7e97deb407f522c [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -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 = "http://poppler.freedesktop.org/${BP}.tar.xz \
6 file://0001-Do-not-overwrite-all-our-build-flags.patch \
Brad Bishop19323692019-04-05 15:28:33 -04007 file://basename-include.patch \
8 "
Brad Bishop868407c2019-11-04 13:24:47 -05009SRC_URI[md5sum] = "4d6106c2382c5e66072e0b355acc3640"
10SRC_URI[sha256sum] = "234f8e573ea57fb6a008e7c1e56bfae1af5d1adf0e65f47555e1ae103874e4df"
Brad Bishop19323692019-04-05 15:28:33 -040011
12DEPENDS = "fontconfig zlib cairo lcms glib-2.0"
13
14inherit cmake pkgconfig gobject-introspection
15
16PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
17PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg"
18PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng"
19PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff"
20PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl"
21PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg"
22PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native"
23PACKAGECONFIG[nss] = "-DWITH_NSS3=ON,-DWITH_NSS3=OFF,nss"
24
25# surprise - did not expect this to work :)
26inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)}
27
28SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
29
30EXTRA_OECMAKE += " \
31 -DENABLE_CMS=lcms2 \
32 -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
33 -DBUILD_GTK_TESTS=OFF \
34 -DENABLE_ZLIB=ON \
35 -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}' \
Brad Bishop26bdd442019-08-16 17:08:17 -040036 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_GOBJECT_INTROSPECTION=ON', '-DENABLE_GOBJECT_INTROSPECTION=OFF', d)} \
Brad Bishop19323692019-04-05 15:28:33 -040037"
38
39do_configure_append() {
40 # poppler macro uses pkg-config to check for g-ir runtimes. Something
41 # makes them point to /usr/bin. Align them to sysroot - that's where the
42 # gir-wrappers are:
43 sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja
44}
45
Brad Bishop19323692019-04-05 15:28:33 -040046PACKAGES =+ "libpoppler libpoppler-glib"
47FILES_libpoppler = "${libdir}/libpoppler.so.*"
48FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*"
49
50RDEPENDS_libpoppler = "poppler-data"