Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Image loading library for GTK+" |
| 2 | HOMEPAGE = "http://www.gtk.org/" |
| 3 | BUGTRACKER = "https://bugzilla.gnome.org/" |
| 4 | |
| 5 | LICENSE = "LGPLv2" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ |
| 7 | file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b" |
| 8 | |
| 9 | SECTION = "libs" |
| 10 | |
| 11 | DEPENDS = "glib-2.0" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
| 13 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 14 | |
| 15 | SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ |
| 16 | file://hardcoded_libtool.patch \ |
| 17 | file://extending-libinstall-dependencies.patch \ |
| 18 | file://run-ptest \ |
| 19 | file://fatal-loader.patch \ |
| 20 | file://0001-pixops-Be-more-careful-about-integer-overflow.patch \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 21 | file://CVE-2015-7674.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | " |
| 23 | |
| 24 | SRC_URI[md5sum] = "4fed0d54432f1b69fc6e66e608bd5542" |
| 25 | SRC_URI[sha256sum] = "4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be" |
| 26 | |
| 27 | inherit autotools pkgconfig gettext pixbufcache ptest-gnome |
| 28 | |
| 29 | LIBV = "2.10.0" |
| 30 | |
| 31 | GDK_PIXBUF_LOADERS ?= "png jpeg" |
| 32 | |
| 33 | PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}" |
| 34 | PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}" |
| 35 | PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" |
| 36 | |
| 37 | PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng" |
| 38 | PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg" |
| 39 | PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff" |
| 40 | PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper" |
| 41 | |
| 42 | # Use GIO to sniff image format instead of trying all loaders |
| 43 | PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info" |
| 44 | PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11" |
| 45 | |
| 46 | EXTRA_OECONF = "--disable-introspection" |
| 47 | |
| 48 | PACKAGES =+ "${PN}-xlib" |
| 49 | |
| 50 | FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" |
| 51 | ALLOW_EMPTY_${PN}-xlib = "1" |
| 52 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 53 | FILES_${PN} = "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 54 | ${libdir}/lib*.so.*" |
| 55 | |
| 56 | FILES_${PN}-dev += " \ |
| 57 | ${bindir}/gdk-pixbuf-csource \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 58 | ${bindir}/gdk-pixbuf-pixdata \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | ${includedir}/* \ |
| 60 | ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ |
| 61 | " |
| 62 | |
| 63 | FILES_${PN}-dbg += " \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 64 | ${libdir}/.debug/* \ |
| 65 | ${libdir}/gdk-pixbuf-2.0/.debug/* \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 66 | ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \ |
| 67 | " |
| 68 | |
| 69 | PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" |
| 70 | PACKAGES_DYNAMIC_class-native = "" |
| 71 | |
| 72 | python populate_packages_prepend () { |
| 73 | postinst_pixbufloader = d.getVar("postinst_pixbufloader", True) |
| 74 | |
| 75 | loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') |
| 76 | |
| 77 | packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) |
| 78 | d.setVar('PIXBUF_PACKAGES', packages) |
| 79 | |
| 80 | # The test suite exercises all the loaders, so ensure they are all |
| 81 | # dependencies of the ptest package. |
| 82 | d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages) |
| 83 | } |
| 84 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 85 | do_install_append() { |
| 86 | # Move gdk-pixbuf-query-loaders into libdir so it is always available |
| 87 | # in multilib builds. |
| 88 | mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ |
| 89 | } |
| 90 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 91 | do_install_append_class-native() { |
| 92 | find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; |
| 93 | |
| 94 | create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ |
| 95 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 96 | |
| 97 | create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ |
| 98 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 99 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 100 | create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 101 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 102 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 103 | } |
| 104 | BBCLASSEXTEND = "native" |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 105 | |
| 106 | SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst" |
| 107 | SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst" |
| 108 | |
| 109 | gdkpixbuf_sstate_preinst() { |
| 110 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then |
| 111 | rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/* |
| 112 | fi |
| 113 | } |