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 | |
| 8 | LICENSE = "LGPLv2.1" |
| 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" |
| 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 \ |
| 22 | file://0001-Work-around-thumbnailer-cross-compile-failure.patch \ |
| 23 | file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \ |
| 24 | file://0004-Do-not-run-tests-when-building.patch \ |
| 25 | file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \ |
| 26 | file://missing-test-data.patch \ |
| 27 | " |
| 28 | |
| 29 | SRC_URI_append_class-target = " \ |
| 30 | file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ |
| 31 | " |
| 32 | SRC_URI_append_class-nativesdk = " \ |
| 33 | file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ |
| 34 | " |
| 35 | |
| 36 | SRC_URI[md5sum] = "05eb1ebc258ba905f1c8644ef49de064" |
| 37 | SRC_URI[sha256sum] = "1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6" |
| 38 | |
| 39 | inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package |
| 40 | |
| 41 | GIR_MESON_OPTION = 'gir' |
| 42 | |
| 43 | EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" |
| 44 | |
| 45 | LIBV = "2.10.0" |
| 46 | |
| 47 | GDK_PIXBUF_LOADERS ?= "png jpeg" |
| 48 | |
| 49 | PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}" |
| 50 | PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" |
| 51 | |
| 52 | PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" |
| 53 | PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" |
| 54 | PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" |
| 55 | PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper" |
| 56 | |
| 57 | PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11" |
| 58 | |
| 59 | PACKAGES =+ "${PN}-xlib" |
| 60 | |
| 61 | # For GIO image type sniffing |
| 62 | RDEPENDS_${PN} = "shared-mime-info" |
| 63 | |
| 64 | FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" |
| 65 | ALLOW_EMPTY_${PN}-xlib = "1" |
| 66 | |
| 67 | FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" |
| 68 | |
| 69 | FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" |
| 70 | |
| 71 | FILES_${PN}-dev += " \ |
| 72 | ${bindir}/gdk-pixbuf-csource \ |
| 73 | ${bindir}/gdk-pixbuf-pixdata \ |
| 74 | ${bindir}/gdk-pixbuf-print-mime-types \ |
| 75 | ${includedir}/* \ |
| 76 | ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ |
| 77 | " |
| 78 | |
| 79 | PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" |
| 80 | PACKAGES_DYNAMIC_class-native = "" |
| 81 | |
| 82 | python populate_packages_prepend () { |
| 83 | postinst_pixbufloader = d.getVar("postinst_pixbufloader") |
| 84 | |
| 85 | loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') |
| 86 | |
| 87 | packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) |
| 88 | d.setVar('PIXBUF_PACKAGES', packages) |
| 89 | |
| 90 | # The test suite exercises all the loaders, so ensure they are all |
| 91 | # dependencies of the ptest package. |
| 92 | d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) |
| 93 | } |
| 94 | |
| 95 | do_install_append() { |
| 96 | # Copy gdk-pixbuf-query-loaders into libdir so it is always available |
| 97 | # in multilib builds. |
| 98 | cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ |
| 99 | |
| 100 | } |
| 101 | |
| 102 | # Remove a bad fuzzing attempt that sporadically fails without a way to reproduce |
| 103 | do_install_ptest() { |
| 104 | rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-randomly-modified.test |
| 105 | } |
| 106 | |
| 107 | do_install_append_class-native() { |
| 108 | find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; |
| 109 | |
| 110 | create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ |
| 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-pixdata \ |
| 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}/${bindir}/gdk-pixbuf-print-mime-types \ |
| 119 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 120 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 121 | |
| 122 | create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ |
| 123 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 124 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 125 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 126 | |
| 127 | create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ |
| 128 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 129 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 130 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 131 | } |
| 132 | BBCLASSEXTEND = "native nativesdk" |