Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Image loading library for GTK+" |
| 2 | DESCRIPTION = "The GDK Pixbuf library provides: Image loading and saving \ |
| 3 | facilities, fast scaling and compositing of pixbufs and Simple animation \ |
| 4 | loading (ie. animated GIFs)" |
| 5 | HOMEPAGE = "https://wiki.gnome.org/Projects/GdkPixbuf" |
| 6 | BUGTRACKER = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues" |
| 7 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 8 | LICENSE = "LGPLv2.1+" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ |
| 10 | file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \ |
| 11 | " |
| 12 | |
| 13 | SECTION = "libs" |
| 14 | |
| 15 | DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 16 | DEPENDS_remove_class-native = "gdk-pixbuf-native" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 17 | |
| 18 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 19 | |
| 20 | SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ |
| 21 | file://run-ptest \ |
| 22 | file://fatal-loader.patch \ |
| 23 | file://0001-Work-around-thumbnailer-cross-compile-failure.patch \ |
| 24 | file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \ |
| 25 | file://0004-Do-not-run-tests-when-building.patch \ |
| 26 | file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \ |
| 27 | file://missing-test-data.patch \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 28 | file://CVE-2020-29385.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | " |
| 30 | |
| 31 | SRC_URI_append_class-target = " \ |
| 32 | file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ |
| 33 | " |
| 34 | SRC_URI_append_class-nativesdk = " \ |
| 35 | file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ |
| 36 | " |
| 37 | |
| 38 | SRC_URI[md5sum] = "05eb1ebc258ba905f1c8644ef49de064" |
| 39 | SRC_URI[sha256sum] = "1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6" |
| 40 | |
| 41 | inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package |
| 42 | |
| 43 | GIR_MESON_OPTION = 'gir' |
| 44 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 45 | LIBV = "2.10.0" |
| 46 | |
| 47 | GDK_PIXBUF_LOADERS ?= "png jpeg" |
| 48 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 49 | PACKAGECONFIG = "${GDK_PIXBUF_LOADERS} \ |
| 50 | ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \ |
| 51 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 52 | PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" |
| 53 | |
| 54 | PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" |
| 55 | PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" |
| 56 | PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" |
| 57 | PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 58 | PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 59 | PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11" |
| 60 | |
| 61 | PACKAGES =+ "${PN}-xlib" |
| 62 | |
| 63 | # For GIO image type sniffing |
| 64 | RDEPENDS_${PN} = "shared-mime-info" |
| 65 | |
| 66 | FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" |
| 67 | ALLOW_EMPTY_${PN}-xlib = "1" |
| 68 | |
| 69 | FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" |
| 70 | |
| 71 | FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" |
| 72 | |
| 73 | FILES_${PN}-dev += " \ |
| 74 | ${bindir}/gdk-pixbuf-csource \ |
| 75 | ${bindir}/gdk-pixbuf-pixdata \ |
| 76 | ${bindir}/gdk-pixbuf-print-mime-types \ |
| 77 | ${includedir}/* \ |
| 78 | ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ |
| 79 | " |
| 80 | |
| 81 | PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" |
| 82 | PACKAGES_DYNAMIC_class-native = "" |
| 83 | |
| 84 | python populate_packages_prepend () { |
| 85 | postinst_pixbufloader = d.getVar("postinst_pixbufloader") |
| 86 | |
| 87 | loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') |
| 88 | |
| 89 | packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) |
| 90 | d.setVar('PIXBUF_PACKAGES', packages) |
| 91 | |
| 92 | # The test suite exercises all the loaders, so ensure they are all |
| 93 | # dependencies of the ptest package. |
| 94 | d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) |
| 95 | } |
| 96 | |
| 97 | do_install_append() { |
| 98 | # Copy gdk-pixbuf-query-loaders into libdir so it is always available |
| 99 | # in multilib builds. |
| 100 | cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ |
| 101 | |
| 102 | } |
| 103 | |
| 104 | # Remove a bad fuzzing attempt that sporadically fails without a way to reproduce |
| 105 | do_install_ptest() { |
| 106 | rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-randomly-modified.test |
| 107 | } |
| 108 | |
| 109 | do_install_append_class-native() { |
| 110 | find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; |
| 111 | |
| 112 | create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ |
| 113 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 114 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 115 | |
| 116 | create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ |
| 117 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 118 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 119 | |
| 120 | create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \ |
| 121 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 122 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 123 | |
| 124 | create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ |
| 125 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 126 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 127 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 128 | |
| 129 | create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ |
| 130 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 131 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 132 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 133 | } |
| 134 | BBCLASSEXTEND = "native nativesdk" |