Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [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-add-manadatory-options-to-find-qt4-qt5-moc.patch \ |
| 8 | file://0001-Compile-with-C-11-compilers-that-don-t-define-isinfi.patch \ |
| 9 | " |
| 10 | SRC_URI[md5sum] = "849a8bd6af5794efb961b70418414e5a" |
| 11 | SRC_URI[sha256sum] = "420abaab63caed9e1ee28964a0ba216d1979506726164bc99ad5ade289192a1b" |
| 12 | |
| 13 | DEPENDS = "fontconfig zlib cairo lcms" |
| 14 | |
| 15 | inherit autotools pkgconfig gtk-doc gobject-introspection |
| 16 | |
| 17 | PACKAGECONFIG ??= "jpeg openjpeg png tiff ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}" |
| 18 | PACKAGECONFIG[jpeg] = "--enable-libjpeg,--disable-libjpeg,jpeg" |
| 19 | PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng" |
| 20 | PACKAGECONFIG[tiff] = "--enable-libtiff,--disable-libtiff,tiff" |
| 21 | PACKAGECONFIG[curl] = "--enable-libcurl,--disable-libcurl,curl" |
| 22 | PACKAGECONFIG[openjpeg] = "--enable-libopenjpeg=openjpeg2,--disable-libopenjpeg,openjpeg" |
| 23 | PACKAGECONFIG[qt5] = "--enable-poppler-qt5 --with-moc-qt5=${STAGING_BINDIR_NATIVE}/qt5/moc,--disable-poppler-qt5,qtbase" |
| 24 | PACKAGECONFIG[qt4e] = "--enable-poppler-qt4 --with-moc-qt4=${STAGING_BINDIR_NATIVE}/moc4,--disable-poppler-qt4,qt4-embedded" |
| 25 | |
| 26 | # Needed for qt5 |
| 27 | CXXFLAGS += "--std=c++11" |
| 28 | |
| 29 | EXTRA_OECONF = "\ |
| 30 | --enable-xpdf-headers \ |
| 31 | --disable-gtk-test \ |
| 32 | --enable-zlib \ |
| 33 | " |
| 34 | |
| 35 | do_compile_prepend() { |
| 36 | export GIR_EXTRA_LIBS_PATH="${B}/poppler/.libs" |
| 37 | } |
| 38 | |
| 39 | # Adjust library names when building for QT4e |
| 40 | QT4E_PATCHES = "${@bb.utils.contains('PACKAGECONFIG', 'qt4e', 'file://fix-qt4e-library-dependencies.patch', '', d)}" |
| 41 | SRC_URI_append = "${QT4E_PATCHES}" |
| 42 | |
| 43 | # check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points |
| 44 | def get_poppler_fpu_setting(bb, d): |
| 45 | if d.getVar('TARGET_FPU', 1) in [ 'soft' ]: |
| 46 | return "--enable-fixedpoint" |
| 47 | return "" |
| 48 | |
| 49 | EXTRA_OECONF += "${@get_poppler_fpu_setting(bb, d)}" |
| 50 | |
| 51 | PACKAGES =+ "libpoppler libpoppler-glib" |
| 52 | FILES_libpoppler = "${libdir}/libpoppler.so.*" |
| 53 | FILES_libpoppler-glib = "${libdir}/libpoppler-glib.so.*" |
| 54 | |
| 55 | RDEPENDS_libpoppler = "poppler-data" |