Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -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 | |
| 8 | LICENSE = "LGPL-2.1-or-later" |
| 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 | |
Patrick Williams | b9af875 | 2023-01-30 13:28:01 -0600 | [diff] [blame^] | 15 | DEPENDS = "glib-2.0 shared-mime-info" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 16 | |
| 17 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 18 | |
| 19 | SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ |
| 20 | file://run-ptest \ |
| 21 | file://fatal-loader.patch \ |
Patrick Williams | b9af875 | 2023-01-30 13:28:01 -0600 | [diff] [blame^] | 22 | file://0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 23 | " |
| 24 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 25 | SRC_URI[sha256sum] = "ee9b6c75d13ba096907a2e3c6b27b61bcd17f5c7ebeab5a5b439d2f2e39fe44b" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 26 | |
| 27 | inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gi-docgen lib_package |
| 28 | |
| 29 | GIR_MESON_OPTION = 'introspection' |
| 30 | GIR_MESON_ENABLE_FLAG = "enabled" |
| 31 | GIR_MESON_DISABLE_FLAG = "disabled" |
| 32 | |
| 33 | LIBV = "2.10.0" |
| 34 | |
| 35 | GDK_PIXBUF_LOADERS ?= "png jpeg" |
| 36 | |
| 37 | PACKAGECONFIG = "${GDK_PIXBUF_LOADERS} \ |
| 38 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" |
| 39 | PACKAGECONFIG:class-native = "${GDK_PIXBUF_LOADERS}" |
| 40 | |
| 41 | PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng" |
| 42 | PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" |
| 43 | PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,tiff" |
| 44 | PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" |
| 45 | |
| 46 | EXTRA_OEMESON = "-Dman=false" |
| 47 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 48 | PACKAGES =+ "${PN}-xlib" |
| 49 | |
| 50 | # For GIO image type sniffing |
| 51 | RDEPENDS:${PN} = "shared-mime-info" |
| 52 | |
| 53 | FILES:${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" |
| 54 | ALLOW_EMPTY:${PN}-xlib = "1" |
| 55 | |
| 56 | FILES:${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" |
| 57 | |
| 58 | FILES:${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" |
| 59 | |
| 60 | FILES:${PN}-dev += " \ |
| 61 | ${bindir}/gdk-pixbuf-csource \ |
| 62 | ${bindir}/gdk-pixbuf-pixdata \ |
| 63 | ${bindir}/gdk-pixbuf-print-mime-types \ |
| 64 | ${includedir}/* \ |
| 65 | ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ |
| 66 | " |
| 67 | |
| 68 | PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" |
| 69 | PACKAGES_DYNAMIC:class-native = "" |
| 70 | |
| 71 | python populate_packages:prepend () { |
| 72 | postinst_pixbufloader = d.getVar("postinst_pixbufloader") |
| 73 | |
| 74 | loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') |
| 75 | |
| 76 | packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) |
| 77 | d.setVar('PIXBUF_PACKAGES', packages) |
| 78 | |
| 79 | # The test suite exercises all the loaders, so ensure they are all |
| 80 | # dependencies of the ptest package. |
| 81 | d.appendVar("RDEPENDS:%s-ptest" % d.getVar('PN'), " " + packages) |
| 82 | } |
| 83 | |
| 84 | do_install:append() { |
| 85 | # Copy gdk-pixbuf-query-loaders into libdir so it is always available |
| 86 | # in multilib builds. |
| 87 | cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ |
| 88 | |
| 89 | } |
| 90 | |
| 91 | do_install_ptest() { |
| 92 | # Remove a bad fuzzing attempt that sporadically fails without a way to reproduce |
| 93 | rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-randomly-modified.test |
| 94 | # https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/215 |
| 95 | rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-jpeg.test |
| 96 | } |
| 97 | |
| 98 | do_install:append:class-native() { |
| 99 | find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; |
| 100 | |
| 101 | create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ |
| 102 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 103 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 104 | |
| 105 | create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \ |
| 106 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 107 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 108 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 109 | create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ |
| 110 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 111 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 112 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 113 | |
| 114 | create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ |
| 115 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 116 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 117 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 118 | } |
| 119 | BBCLASSEXTEND = "native nativesdk" |