Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "Poppler is a PDF rendering library based on the xpdf-3.0 code base" |
| 2 | LICENSE = "GPLv2" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 4 | |
| 5 | SRC_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 | " |
| 10 | SRC_URI[md5sum] = "66a54da4896b1408611699feda5c1821" |
| 11 | SRC_URI[sha256sum] = "27cc8addafc791e1a26ce6acc2b490926ea73a4f89196dd8a7742cff7cf8a111" |
| 12 | |
| 13 | DEPENDS = "fontconfig zlib cairo lcms" |
| 14 | |
| 15 | inherit cmake pkgconfig gobject-introspection |
| 16 | |
| 17 | PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}" |
| 18 | PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON -DENABLE_DCTDECODER=libjpeg,-DWITH_JPEG=OFF -DENABLE_DCTDECODER=none,jpeg" |
| 19 | PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng" |
| 20 | PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff" |
| 21 | PACKAGECONFIG[curl] = "-DENABLE_LIBCURL=ON,-DENABLE_LIBCURL=OFF,curl" |
| 22 | PACKAGECONFIG[openjpeg] = "-DENABLE_LIBOPENJPEG=openjpeg2,-DENABLE_LIBOPENJPEG=none,openjpeg" |
| 23 | PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON,-DENABLE_QT5=OFF,qtbase qttools-native" |
| 24 | PACKAGECONFIG[nss] = "-DWITH_NSS3=ON,-DWITH_NSS3=OFF,nss" |
| 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_XPDF_HEADERS=ON \ |
| 33 | -DBUILD_GTK_TESTS=OFF \ |
| 34 | -DENABLE_ZLIB=ON \ |
| 35 | " |
| 36 | |
| 37 | do_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 |
| 45 | def get_poppler_fpu_setting(bb, d): |
| 46 | if d.getVar('TARGET_FPU') in [ 'soft' ]: |
| 47 | return "-DUSE_FIXEDPOINT=ON" |
| 48 | return "" |
| 49 | |
| 50 | EXTRA_OECMAKE += "${@get_poppler_fpu_setting(bb, d)}" |
| 51 | |
| 52 | PACKAGES =+ "libpoppler libpoppler-glib" |
| 53 | FILES_libpoppler = "${libdir}/libpoppler.so.*" |
| 54 | FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*" |
| 55 | |
| 56 | RDEPENDS_libpoppler = "poppler-data" |