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