blob: 99c84c6dda405750fbf108d08f6524ff99058ad5 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Image loading library for GTK+"
2HOMEPAGE = "http://www.gtk.org/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
7 file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
8
9SECTION = "libs"
10
11DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info"
12
13MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
14
15SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
16 file://hardcoded_libtool.patch \
17 file://extending-libinstall-dependencies.patch \
18 file://run-ptest \
19 file://fatal-loader.patch \
20 file://0001-Work-around-thumbnailer-cross-compile-failure.patch \
21 file://0001-Fix-without-libtiff-not-having-an-effect.patch \
22 "
23
24SRC_URI[md5sum] = "6e84e5485c17ce7c25df77fe76eb2d6a"
25SRC_URI[sha256sum] = "ae62ab87250413156ed72ef756347b10208c00e76b222d82d9ed361ed9dde2f3"
26
27inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
28
29LIBV = "2.10.0"
30
31GDK_PIXBUF_LOADERS ?= "png jpeg"
32
33PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
34PACKAGECONFIG_linuxstdbase = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}"
35PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
36
37PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
38PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
39PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
40PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
41
42PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
43
44PACKAGES =+ "${PN}-xlib"
45
46# For GIO image type sniffing
47RDEPENDS_${PN} = "shared-mime-info"
48
49FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
50ALLOW_EMPTY_${PN}-xlib = "1"
51
52FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
53
54FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
55
56FILES_${PN}-dev += " \
57 ${bindir}/gdk-pixbuf-csource \
58 ${bindir}/gdk-pixbuf-pixdata \
59 ${bindir}/gdk-pixbuf-print-mime-types \
60 ${includedir}/* \
61 ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
62"
63
64PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
65PACKAGES_DYNAMIC_class-native = ""
66
67python populate_packages_prepend () {
68 postinst_pixbufloader = d.getVar("postinst_pixbufloader")
69
70 loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
71
72 packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
73 d.setVar('PIXBUF_PACKAGES', packages)
74
75 # The test suite exercises all the loaders, so ensure they are all
76 # dependencies of the ptest package.
77 d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages)
78}
79
80do_install_append() {
81 # Move gdk-pixbuf-query-loaders into libdir so it is always available
82 # in multilib builds.
83 mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
84}
85
86do_install_append_class-native() {
87 find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
88
89 create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
90 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
91
92 create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
93 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
94
95 create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \
96 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
97
98 create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
99 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
100 GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
101}
102BBCLASSEXTEND = "native"