Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base" |
| 2 | HOMEPAGE = "https://poppler.freedesktop.org/" |
| 3 | LICENSE = "GPL-2.0-only" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 5 | |
| 6 | SRC_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 | " |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 10 | SRC_URI[sha256sum] = "04e40fad924a6de62e63017a6fd4c04696c1f526dedc2ba5ef275cedf646292a" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 11 | |
| 12 | DEPENDS = "fontconfig zlib cairo lcms glib-2.0" |
| 13 | |
| 14 | inherit cmake pkgconfig gobject-introspection |
| 15 | |
| 16 | PACKAGECONFIG ??= "jpeg openjpeg png tiff nss splash" |
| 17 | PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg" |
| 18 | PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng" |
| 19 | PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff" |
| 20 | PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl" |
| 21 | PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg" |
| 22 | PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native" |
| 23 | PACKAGECONFIG[nss] = "-DWITH_NSS3=ON,-DWITH_NSS3=OFF,nss" |
| 24 | PACKAGECONFIG[splash] = "-DENABLE_SPLASH=ON -DENABLE_BOOST=ON,-DENABLE_SPLASH=OFF -DENABLE_BOOST=OFF,boost" |
| 25 | |
| 26 | # surprise - did not expect this to work :) |
| 27 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)} |
| 28 | |
| 29 | SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" |
| 30 | |
| 31 | EXTRA_OECMAKE += " \ |
| 32 | -DENABLE_CMS=lcms2 \ |
| 33 | -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ |
| 34 | -DBUILD_GTK_TESTS=OFF \ |
| 35 | -DENABLE_ZLIB=ON \ |
| 36 | -DRUN_GPERF_IF_PRESENT=OFF \ |
| 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 | EXTRA_OECMAKE:append:class-native = " -DENABLE_CPP=OFF" |
| 41 | |
| 42 | do_configure:append() { |
| 43 | # poppler macro uses pkg-config to check for g-ir runtimes. Something |
| 44 | # makes them point to /usr/bin. Align them to sysroot - that's where the |
| 45 | # gir-wrappers are: |
| 46 | sed -i 's: ${bindir}/g-ir: ${STAGING_BINDIR}/g-ir:' ${B}/build.ninja |
| 47 | } |
| 48 | |
| 49 | PACKAGES =+ "libpoppler libpoppler-glib" |
| 50 | FILES:libpoppler = "${libdir}/libpoppler.so.*" |
| 51 | FILES:libpoppler-glib = "${libdir}/libpoppler-glib.so.*" |
| 52 | |
| 53 | RDEPENDS:libpoppler = "poppler-data" |
| 54 | |
| 55 | BBCLASSEXTEND = "native" |