Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Image loading library for GTK+" |
| 2 | HOMEPAGE = "http://www.gtk.org/" |
| 3 | BUGTRACKER = "https://bugzilla.gnome.org/" |
| 4 | |
| 5 | LICENSE = "LGPLv2.1" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ |
| 7 | file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \ |
| 8 | " |
| 9 | |
| 10 | SECTION = "libs" |
| 11 | |
| 12 | DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info" |
| 13 | |
| 14 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 15 | |
| 16 | SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ |
| 17 | file://run-ptest \ |
| 18 | file://fatal-loader.patch \ |
| 19 | file://0001-Work-around-thumbnailer-cross-compile-failure.patch \ |
| 20 | file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \ |
| 21 | file://0001-loaders.cache-depend-on-loaders-being-fully-build.patch \ |
| 22 | file://0004-Do-not-run-tests-when-building.patch \ |
| 23 | " |
| 24 | |
| 25 | SRC_URI_append_class-target = " \ |
| 26 | file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ |
| 27 | " |
| 28 | SRC_URI_append_class-nativesdk = " \ |
| 29 | file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ |
| 30 | " |
| 31 | |
| 32 | SRC_URI[md5sum] = "77765f24496dc8c90c6e0cbe10fd8f0e" |
| 33 | SRC_URI[sha256sum] = "dd50973c7757bcde15de6bcd3a6d462a445efd552604ae6435a0532fbbadae47" |
| 34 | |
| 35 | inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package |
| 36 | |
| 37 | GTKDOC_ENABLE_FLAG = "-Ddocs=true" |
| 38 | GTKDOC_DISABLE_FLAG = "-Ddocs=false" |
| 39 | |
| 40 | GI_ENABLE_FLAG = "-Dgir=true" |
| 41 | GI_DISABLE_FLAG = "-Dgir=false" |
| 42 | |
| 43 | EXTRA_OEMESON_append_class-nativesdk = " ${GI_DISABLE_FLAG}" |
| 44 | |
| 45 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \ |
| 46 | '${GI_DISABLE_FLAG}', d)} " |
| 47 | |
| 48 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ |
| 49 | '${GTKDOC_DISABLE_FLAG}', d)} " |
| 50 | |
| 51 | EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" |
| 52 | |
| 53 | LIBV = "2.10.0" |
| 54 | |
| 55 | GDK_PIXBUF_LOADERS ?= "png jpeg" |
| 56 | |
| 57 | PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}" |
| 58 | PACKAGECONFIG_linuxstdbase = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}" |
| 59 | PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" |
| 60 | |
| 61 | PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" |
| 62 | PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" |
| 63 | PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" |
| 64 | PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper" |
| 65 | |
| 66 | PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11" |
| 67 | |
| 68 | PACKAGES =+ "${PN}-xlib" |
| 69 | |
| 70 | # For GIO image type sniffing |
| 71 | RDEPENDS_${PN} = "shared-mime-info" |
| 72 | |
| 73 | FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" |
| 74 | ALLOW_EMPTY_${PN}-xlib = "1" |
| 75 | |
| 76 | FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" |
| 77 | |
| 78 | FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" |
| 79 | |
| 80 | FILES_${PN}-dev += " \ |
| 81 | ${bindir}/gdk-pixbuf-csource \ |
| 82 | ${bindir}/gdk-pixbuf-pixdata \ |
| 83 | ${bindir}/gdk-pixbuf-print-mime-types \ |
| 84 | ${includedir}/* \ |
| 85 | ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \ |
| 86 | " |
| 87 | |
| 88 | PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" |
| 89 | PACKAGES_DYNAMIC_class-native = "" |
| 90 | |
| 91 | python populate_packages_prepend () { |
| 92 | postinst_pixbufloader = d.getVar("postinst_pixbufloader") |
| 93 | |
| 94 | loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') |
| 95 | |
| 96 | packages = ' '.join(do_split_packages(d, loaders_root, r'^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s')) |
| 97 | d.setVar('PIXBUF_PACKAGES', packages) |
| 98 | |
| 99 | # The test suite exercises all the loaders, so ensure they are all |
| 100 | # dependencies of the ptest package. |
| 101 | d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) |
| 102 | } |
| 103 | |
| 104 | do_install_append() { |
| 105 | # Copy gdk-pixbuf-query-loaders into libdir so it is always available |
| 106 | # in multilib builds. |
| 107 | cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ |
| 108 | |
| 109 | } |
| 110 | |
| 111 | do_install_append_class-native() { |
| 112 | find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; |
| 113 | |
| 114 | create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ |
| 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-pixdata \ |
| 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}/${bindir}/gdk-pixbuf-print-mime-types \ |
| 123 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 124 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache |
| 125 | |
| 126 | create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ |
| 127 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 128 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 129 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 130 | |
| 131 | create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \ |
| 132 | XDG_DATA_DIRS=${STAGING_DATADIR} \ |
| 133 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |
| 134 | GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders |
| 135 | } |
| 136 | BBCLASSEXTEND = "native nativesdk" |