blob: c99510609cf3f22e0ec607fb5a0c8d0693743efe [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Image loading library for GTK+"
Brad Bishop64c979e2019-11-04 13:55:29 -05002DESCRIPTION = "The GDK Pixbuf library provides: Image loading and saving \
3facilities, fast scaling and compositing of pixbufs and Simple animation \
4loading (ie. animated GIFs)"
5HOMEPAGE = "https://wiki.gnome.org/Projects/GdkPixbuf"
6BUGTRACKER = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues"
Brad Bishop19323692019-04-05 15:28:33 -04007
8LICENSE = "LGPLv2.1"
9LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
10 file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \
11 "
12
13SECTION = "libs"
14
15DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
16
17MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
18
19SRC_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 Bishop19323692019-04-05 15:28:33 -040024 file://0004-Do-not-run-tests-when-building.patch \
Brad Bishop15ae2502019-06-18 21:44:24 -040025 file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \
Brad Bishop19323692019-04-05 15:28:33 -040026 "
27
28SRC_URI_append_class-target = " \
29 file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \
30 "
31SRC_URI_append_class-nativesdk = " \
32 file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \
33 "
34
Brad Bishopa34c0302019-09-23 22:34:48 -040035SRC_URI[md5sum] = "cc1d712a1643b92ff0904d589963971f"
36SRC_URI[sha256sum] = "73fa651ec0d89d73dd3070b129ce2203a66171dfc0bd2caa3570a9c93d2d0781"
Brad Bishop19323692019-04-05 15:28:33 -040037
38inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
39
Brad Bishopc342db32019-05-15 21:57:59 -040040GIR_MESON_OPTION = 'gir'
Brad Bishop19323692019-04-05 15:28:33 -040041
42EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}"
43
44LIBV = "2.10.0"
45
46GDK_PIXBUF_LOADERS ?= "png jpeg"
47
Brad Bishop08902b02019-08-20 09:16:51 -040048PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
Brad Bishop19323692019-04-05 15:28:33 -040049PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
50
51PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng"
52PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg"
53PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff"
54PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper"
55
56PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11"
57
58PACKAGES =+ "${PN}-xlib"
59
60# For GIO image type sniffing
61RDEPENDS_${PN} = "shared-mime-info"
62
63FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
64ALLOW_EMPTY_${PN}-xlib = "1"
65
66FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
67
68FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
69
70FILES_${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
78PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
79PACKAGES_DYNAMIC_class-native = ""
80
81python 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
94do_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
101do_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}
126BBCLASSEXTEND = "native nativesdk"