blob: d6a27f923b075a46e3b82006974640f5a3b32d1f [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base"
2HOMEPAGE = "https://poppler.freedesktop.org/"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
5
6SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \
7 file://0001-Do-not-overwrite-all-our-build-flags.patch \
8 file://basename-include.patch \
9 "
Andrew Geisslere231d582020-05-05 08:53:09 -050010SRC_URI[md5sum] = "d9aafddce4c079c9ebc7405e42ac25ba"
11SRC_URI[sha256sum] = "b4453804e9a5a519e6ceee0ac8f5efc229e3b0bf70419263c239124474d256c7"
Andrew Geissler82c905d2020-04-13 13:39:40 -050012
13DEPENDS = "fontconfig zlib cairo lcms glib-2.0"
14
15inherit cmake pkgconfig gobject-introspection
16
17PACKAGECONFIG ??= "jpeg openjpeg png tiff nss splash"
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"
25PACKAGECONFIG[splash] = "-DENABLE_SPLASH=ON,-DENABLE_SPLASH=OFF,boost"
26
27# surprise - did not expect this to work :)
28inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)}
29
30SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
31
32EXTRA_OECMAKE += " \
33 -DENABLE_CMS=lcms2 \
34 -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
35 -DBUILD_GTK_TESTS=OFF \
36 -DENABLE_ZLIB=ON \
37 -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}' \
38 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_GOBJECT_INTROSPECTION=ON', '-DENABLE_GOBJECT_INTROSPECTION=OFF', d)} \
39"
40
41do_configure_append() {
42 # poppler macro uses pkg-config to check for g-ir runtimes. Something
43 # makes them point to /usr/bin. Align them to sysroot - that's where the
44 # gir-wrappers are:
45 sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja
46}
47
48PACKAGES =+ "libpoppler libpoppler-glib"
49FILES_libpoppler = "${libdir}/libpoppler.so.*"
50FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*"
51
52RDEPENDS_libpoppler = "poppler-data"