diff options
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk+3.inc')
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3.inc | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc new file mode 100644 index 0000000000..3e36676ac4 --- /dev/null +++ b/meta/recipes-gnome/gtk+/gtk+3.inc | |||
@@ -0,0 +1,110 @@ | |||
1 | SUMMARY = "Multi-platform toolkit for creating GUIs" | ||
2 | DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \ | ||
3 | set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites." | ||
4 | HOMEPAGE = "http://www.gtk.org" | ||
5 | BUGTRACKER = "https://bugzilla.gnome.org/" | ||
6 | SECTION = "libs" | ||
7 | |||
8 | DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ | ||
9 | docbook-utils-native gdk-pixbuf-native" | ||
10 | |||
11 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" | ||
12 | |||
13 | inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings | ||
14 | |||
15 | # This should be in autotools.bbclass, but until something elses uses it putting | ||
16 | # it here avoids rebuilding everything. | ||
17 | export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" | ||
18 | |||
19 | do_configure_prepend() { | ||
20 | # Do this because the configure script is running ./libtool directly | ||
21 | rm -f libtool | ||
22 | ln -s ${TARGET_PREFIX}libtool libtool | ||
23 | } | ||
24 | |||
25 | # Forcibly disable the GTK+ 2 dependency as we don't want to natively build the | ||
26 | # entire GTK+ stack, or need GTK+ 2 for gtk-update-icon-cache. | ||
27 | EXTRA_OECONF += " \ | ||
28 | --disable-gtk2-dependency \ | ||
29 | --disable-glibtest \ | ||
30 | --disable-xinerama \ | ||
31 | --enable-modules \ | ||
32 | --disable-cups \ | ||
33 | --disable-introspection \ | ||
34 | " | ||
35 | |||
36 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ | ||
37 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}" | ||
38 | |||
39 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" | ||
40 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon" | ||
41 | |||
42 | do_install_append() { | ||
43 | mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 | ||
44 | } | ||
45 | |||
46 | PACKAGES =+ "${PN}-demo" | ||
47 | LIBV = "3.0.0" | ||
48 | |||
49 | FILES_${PN}-demo = "${bindir}/gtk3-demo \ | ||
50 | ${bindir}/gtk3-demo-application \ | ||
51 | ${bindir}/gtk3-widget-factory \ | ||
52 | ${datadir}/gtk-3.0/demo \ | ||
53 | ${datadir}/applications/gtk3-demo.desktop \ | ||
54 | ${datadir}/applications/gtk3-widget-factory.desktop \ | ||
55 | ${datadir}/icons/hicolor/*/apps/gtk3-demo.png \ | ||
56 | ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory.png" | ||
57 | |||
58 | # The demo uses PNG files and mime type sniffing, so ensure that these | ||
59 | # dependencies are present. | ||
60 | RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info" | ||
61 | |||
62 | FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \ | ||
63 | ${bindir}/gtk-query-immodules-3.0 \ | ||
64 | ${bindir}/gtk-launch \ | ||
65 | ${libdir}/lib*${SOLIBS} \ | ||
66 | ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ | ||
67 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ | ||
68 | ${libdir}/gtk-3.0/modules/*.so" | ||
69 | |||
70 | FILES_${PN}-dev += " \ | ||
71 | ${datadir}/gtk-3.0/gtkbuilder.rng \ | ||
72 | ${datadir}/gtk-3.0/include \ | ||
73 | ${libdir}/gtk-3.0/include \ | ||
74 | ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \ | ||
75 | ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \ | ||
76 | ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \ | ||
77 | ${libdir}/gtk-3.0/${LIBV}/engines/*.la \ | ||
78 | ${libdir}/gtk-3.0/modules/*.la \ | ||
79 | ${bindir}/gtk-builder-convert" | ||
80 | |||
81 | FILES_${PN}-dbg += " \ | ||
82 | ${libdir}/gtk-3.0/${LIBV}/loaders/.debug \ | ||
83 | ${libdir}/gtk-3.0/${LIBV}/immodules/.debug \ | ||
84 | ${libdir}/gtk-3.0/${LIBV}/engines/.debug \ | ||
85 | ${libdir}/gtk-3.0/${LIBV}/printbackends/.debug \ | ||
86 | ${libdir}/gtk-3.0/modules/.debug" | ||
87 | |||
88 | |||
89 | PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" | ||
90 | |||
91 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" | ||
92 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" | ||
93 | |||
94 | python populate_packages_prepend () { | ||
95 | import os.path | ||
96 | |||
97 | gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') | ||
98 | immodules_root = os.path.join(gtk_libdir, 'immodules') | ||
99 | printmodules_root = os.path.join(gtk_libdir, 'printbackends'); | ||
100 | |||
101 | immodules = do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s') | ||
102 | if immodules: | ||
103 | d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules)) | ||
104 | |||
105 | do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') | ||
106 | |||
107 | if (d.getVar('DEBIAN_NAMES', 1)): | ||
108 | d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0') | ||
109 | } | ||
110 | |||