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 \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 23 | file://0001-Add-use_prebuilt_tools-option.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | " |
| 25 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 26 | SRC_URI[sha256sum] = "c4a6b75b7ed8f58ca48da830b9fa00ed96d668d3ab4b1f723dcf902f78bde77f" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 28 | inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gi-docgen lib_package |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 30 | GIR_MESON_OPTION = 'introspection' |
| 31 | GIR_MESON_ENABLE_FLAG = "enabled" |
| 32 | GIR_MESON_DISABLE_FLAG = "disabled" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 33 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 34 | LIBV = "2.10.0" |
| 35 | |
| 36 | GDK_PIXBUF_LOADERS ?= "png jpeg" |
| 37 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 38 | PACKAGECONFIG = "${GDK_PIXBUF_LOADERS} \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 39 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 40 | PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" |
| 41 | |
| 42 | PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" |
| 43 | PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" |
| 44 | PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 45 | PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 46 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 47 | EXTRA_OEMESON_class-target = " \ |
| 48 | -Duse_prebuilt_tools=true \ |
| 49 | " |
| 50 | |
| 51 | EXTRA_OEMESON_class-nativesdk = " \ |
| 52 | -Duse_prebuilt_tools=true \ |
| 53 | " |
| 54 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 55 | PACKAGES =+ "${PN}-xlib" |
| 56 | |
| 57 | # For GIO image type sniffing |
| 58 | RDEPENDS_${PN} = "shared-mime-info" |
| 59 | |
| 60 | FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" |
| 61 | ALLOW_EMPTY_${PN}-xlib = "1" |
| 62 | |
| 63 | FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" |
| 64 | |
| 65 | FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" |
| 66 | |
| 67 | FILES_${PN}-dev += " \ |
| 68 | ${bindir}/gdk-pixbuf-csource \ |
| 69 | ${bindir}/gdk-pixbuf-pixdata \ |
| 70 | ${bindir}/gdk-pixbuf-print-mime-types \ |
| 71 | ${includedir}/* \ |
| 72 | ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ |
| 73 | " |
| 74 | |
| 75 | PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" |
| 76 | PACKAGES_DYNAMIC_class-native = "" |
| 77 | |
| 78 | python populate_packages_prepend () { |
| 79 | postinst_pixbufloader = d.getVar("postinst_pixbufloader") |
| 80 | |
| 81 | loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') |
| 82 | |
| 83 | packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) |
| 84 | d.setVar('PIXBUF_PACKAGES', packages) |
| 85 | |
| 86 | # The test suite exercises all the loaders, so ensure they are all |
| 87 | # dependencies of the ptest package. |
| 88 | d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) |
| 89 | } |
| 90 | |
| 91 | do_install_append() { |
| 92 | # Copy gdk-pixbuf-query-loaders into libdir so it is always available |
| 93 | # in multilib builds. |
| 94 | cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ |
| 95 | |
| 96 | } |
| 97 | |
| 98 | # Remove a bad fuzzing attempt that sporadically fails without a way to reproduce |
| 99 | do_install_ptest() { |
| 100 | rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-randomly-modified.test |
| 101 | } |
| 102 | |
| 103 | do_install_append_class-native() { |
| 104 | find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; |
| 105 | |
| 106 | create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ |
| 107 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 108 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 109 | |
| 110 | create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ |
| 111 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 112 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 113 | |
| 114 | create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \ |
| 115 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 116 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 117 | |
| 118 | create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ |
| 119 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 120 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 121 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 122 | |
| 123 | create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ |
| 124 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 125 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 126 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 127 | } |
| 128 | BBCLASSEXTEND = "native nativesdk" |