blob: 5153868b68144fa711529dbc4d5c1f395be87f76 [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"
Brad Bishope42b3e32020-01-15 22:08:42 -05002HOMEPAGE = "https://poppler.freedesktop.org/"
Brad Bishop19323692019-04-05 15:28:33 -04003LICENSE = "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 \
Brad Bishop19323692019-04-05 15:28:33 -04008 file://basename-include.patch \
9 "
Brad Bishope42b3e32020-01-15 22:08:42 -050010SRC_URI[md5sum] = "e14a8aca8809908ad4364c32c17bcb92"
11SRC_URI[sha256sum] = "c7a130da743b38a548f7a21fe5940506fb1949f4ebdd3209f0e5b302fa139731"
Brad Bishop19323692019-04-05 15:28:33 -040012
13DEPENDS = "fontconfig zlib cairo lcms glib-2.0"
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_CMS=lcms2 \
33 -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
34 -DBUILD_GTK_TESTS=OFF \
35 -DENABLE_ZLIB=ON \
36 -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}' \
Brad Bishop26bdd442019-08-16 17:08:17 -040037 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_GOBJECT_INTROSPECTION=ON', '-DENABLE_GOBJECT_INTROSPECTION=OFF', d)} \
Brad Bishop19323692019-04-05 15:28:33 -040038"
39
40do_configure_append() {
41 # poppler macro uses pkg-config to check for g-ir runtimes. Something
42 # makes them point to /usr/bin. Align them to sysroot - that's where the
43 # gir-wrappers are:
44 sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja
45}
46
Brad Bishop19323692019-04-05 15:28:33 -040047PACKAGES =+ "libpoppler libpoppler-glib"
48FILES_libpoppler = "${libdir}/libpoppler.so.*"
49FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*"
50
51RDEPENDS_libpoppler = "poppler-data"