blob: f29f0d3031fa8cab6ddec8558e9b2712f7ff1215 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Multi-platform toolkit for creating GUIs"
2DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
3set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
4HOMEPAGE = "http://www.gtk.org"
5BUGTRACKER = "https://bugzilla.gnome.org/"
6SECTION = "libs"
7
8DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
9 docbook-utils-native gdk-pixbuf-native libepoxy"
10
11LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
12
13inherit 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.
17export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
18
19do_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
25EXTRA_OECONF += " \
26 --disable-glibtest \
27 --disable-xinerama \
28 --enable-modules \
29 --disable-cups \
30 --disable-introspection \
31"
32
33PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
34 ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
35
36PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
37PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa"
38
39do_install_append() {
40 mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
41}
42
43PACKAGES =+ "${PN}-demo"
44LIBV = "3.0.0"
45
46FILES_${PN}-demo = "${bindir}/gtk3-demo \
47 ${bindir}/gtk3-demo-application \
48 ${bindir}/gtk3-icon-browser \
49 ${bindir}/gtk3-widget-factory \
50 ${datadir}/gtk-3.0/demo \
51 ${datadir}/applications/gtk3-demo.desktop \
52 ${datadir}/applications/gtk3-icon-browser.desktop \
53 ${datadir}/applications/gtk3-widget-factory.desktop \
54 ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \
55 ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png"
56
57# The demo uses PNG files and mime type sniffing, so ensure that these
58# dependencies are present.
59RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info"
60
61FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \
62 ${bindir}/gtk-query-immodules-3.0 \
63 ${bindir}/gtk-launch \
64 ${libdir}/lib*${SOLIBS} \
65 ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \
66 ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \
67 ${libdir}/gtk-3.0/modules/*.so"
68
69FILES_${PN}-dev += " \
70 ${datadir}/gtk-3.0/gtkbuilder.rng \
71 ${datadir}/gtk-3.0/include \
72 ${libdir}/gtk-3.0/include \
73 ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \
74 ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \
75 ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \
76 ${libdir}/gtk-3.0/${LIBV}/engines/*.la \
77 ${libdir}/gtk-3.0/modules/*.la \
78 ${bindir}/gtk-builder-convert \
79 ${bindir}/gtk-encode-symbolic-svg"
80
81FILES_${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
88RRECOMMENDS_${PN} = "adwaita-icon-theme-symbolic"
89
90PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*"
91
92ALTERNATIVE_${PN} = "gtk-update-icon-cache"
93ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0"
94
95python populate_packages_prepend () {
96 import os.path
97
98 gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}')
99 immodules_root = os.path.join(gtk_libdir, 'immodules')
100 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
101
102 immodules = do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')
103 if immodules:
104 d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules))
105
106 do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
107
108 if (d.getVar('DEBIAN_NAMES', 1)):
109 d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0')
110}
111