systemd: Enable pam if present in DISTRO_FEATURES
[openembedded.git] / recipes / gtk+ / gtk+.inc
blob42a8febcddf2b6bef9e0eb1dbfc2e8f1058fbe0d
1 DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
2 set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
3 HOMEPAGE = "http://www.gtk.org"
4 SECTION = "libs"
5 LICENSE = "LGPL"
6 PRIORITY = "optional"
7 DEPENDS = "glib-2.0 tiff pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt cups \
8            libxrandr libxdamage libxrender libxcomposite cairo jasper gtk+-native"
9 PROVIDES = "gdk-pixbuf"
11 MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
12 SRC_URI = "http://download.gnome.org/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.bz2;name=gtk \
13         file://hardcoded_libtool.patch \
14         file://run-iconcache.patch \
15         file://toggle-font.diff;striplevel=0 \
16         file://xsettings.patch \
17         "
19 INC_PR = "r10"
21 inherit autotools pkgconfig
23 LEAD_SONAME = "libgtk-x11-2.0.so"
24 LIBV = "2.10.0"
26 PACKAGES =+ "${PN}-demo ${PN}-demo-source"
27 FILES_${PN}-demo = "${bindir}/gtk-demo"
28 FILES_${PN}-demo-source = "${datadir}/gtk-2.0/demo"
30 FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \
31         ${bindir}/gtk-update-icon-cache \
32         ${bindir}/gtk-query-immodules-2.0 \
33         ${libdir}/lib*.so.* \
34         ${datadir}/themes ${sysconfdir} \
35         ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
37 FILES_${PN}-dev += " \
38         ${datadir}/gtk-2.0/include \
39         ${libdir}/gtk-2.0/include \
40         ${bindir}/gdk-pixbuf-csource \
41         ${bindir}/gtk-builder-convert"
43 FILES_${PN}-dbg += " \
44         ${libdir}/gtk-2.0/modules/.debug/* \
45         ${libdir}/gtk-2.0/${LIBV}/loaders/.debug/* \
46         ${libdir}/gtk-2.0/${LIBV}/immodules/.debug/* \
47         ${libdir}/gtk-2.0/${LIBV}/engines/.debug/* \
48         ${libdir}/gtk-2.0/${LIBV}/printbackends/.debug/*"
50 NEATSTUFF = "ttf-dejavu-sans gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm"
51 NEATSTUFF_append_linux = " glibc-gconv-iso8859-1"
52 NEATSTUFF_append_linux-gnueabi = " glibc-gconv-iso8859-1"
54 # Only add runtime dependencies for target recipe
55 RDEPENDS_${PN} += "${@['', 'hicolor-icon-theme']['${PN}' == '${BPN}']}"
56 RRECOMMENDS_${PN} += "${@['', '${NEATSTUFF}']['${PN}' == '${BPN}']}"
58 do_install_append () {
59         mkdir -p ${D}${libdir}/gtk-2.0/include
60         install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h
61         # Copy over all headers, since the maemo stuff needs access to the private api. *sigh*
62         cp gtk/*.h ${D}${includedir}/gtk-2.0/gtk/
64         install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/
66         install -d ${D}${sysconfdir}/gtk-2.0
67         rm -f ${D}${libdir}/gtk-2.0/*/*.la ${D}${libdir}/gtk-2.0/${LIBV}/*/*.la
70 do_install_append_virtclass-native () {
71         ${D}${bindir}/gdk-pixbuf-query-loaders \
72                 ${D}${libdir}/gtk-2.0/${LIBV}/loaders/*.so | \
73                 sed -e's,${D},,' > \
74                         ${D}${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
77 SYSROOT_PREPROCESS_FUNCS_append_virtclass-native = " gdk_pixbuf_fixup"
79 _SYSROOT_DEST = "${SYSROOT_DESTDIR}${STAGING_DIR_HOST}"
80 gdk_pixbuf_fixup () {
81         create_wrapper ${_SYSROOT_DEST}${bindir}/gdk-pixbuf-query-loaders \
82                 LD_LIBRARY_PATH=${STAGING_LIBDIR} \
83                 GDK_PIXBUF_MODULEDIR=${libdir}/gtk-2.0/${LIBV}/loaders
84         ${_SYSROOT_DEST}${bindir}/gdk-pixbuf-query-loaders \
85                 ${_SYSROOT_DEST}${libdir}/gtk-2.0/${LIBV}/loaders/*.so | \
86                 sed -e's,${_SYSROOT_DEST},,' > \
87                         ${_SYSROOT_DEST}${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
88         create_wrapper ${_SYSROOT_DEST}${bindir}/gdk-pixbuf-csource \
89                 GDK_PIXBUF_MODULE_FILE=${sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
92 postinst_prologue() {
93 if [ "x$D" != "x" ]; then
94   exit 1