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 | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 8 | LICENSE = "LGPL-2.1-or-later" |
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" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [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 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 26 | SRC_URI[sha256sum] = "84acea3acb2411b29134b32015a5b1aaa62844b19c4b1ef8b8971c6b0759f4c6" |
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)}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | PACKAGECONFIG:class-native = "${GDK_PIXBUF_LOADERS}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 41 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 42 | PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng" |
| 43 | PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" |
| 44 | PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | EXTRA_OEMESON:class-target = " \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 48 | -Duse_prebuilt_tools=true \ |
| 49 | " |
| 50 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | EXTRA_OEMESON:class-nativesdk = " \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 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 |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 58 | RDEPENDS:${PN} = "shared-mime-info" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 59 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | FILES:${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" |
| 61 | ALLOW_EMPTY:${PN}-xlib = "1" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | FILES:${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | FILES:${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 66 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 67 | FILES:${PN}-dev += " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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-.*" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | PACKAGES_DYNAMIC:class-native = "" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 77 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | python populate_packages:prepend () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 88 | d.appendVar("RDEPENDS:%s-ptest" % d.getVar('PN'), " " + packages) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 89 | } |
| 90 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 91 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 103 | do_install:append:class-native() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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" |