blob: 22a40d8f05b40f18db9cbec008a0feee9ce1e795 [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
Patrick Williamsf1e5d692016-03-30 15:21:19 -050013inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check
14ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
16# This should be in autotools.bbclass, but until something elses uses it putting
17# it here avoids rebuilding everything.
18export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
19
20do_configure_prepend() {
21 # Do this because the configure script is running ./libtool directly
22 rm -f libtool
23 ln -s ${TARGET_PREFIX}libtool libtool
24}
25
26EXTRA_OECONF += " \
27 --disable-glibtest \
28 --disable-xinerama \
29 --enable-modules \
30 --disable-cups \
31 --disable-introspection \
32"
33
34PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050035 ${@bb.utils.contains("DISTRO_FEATURES", "opengl x11", "glx", "", d)} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036 ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
37
38PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
Patrick Williamsf1e5d692016-03-30 15:21:19 -050039PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa"
41
42do_install_append() {
43 mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
44}
45
46PACKAGES =+ "${PN}-demo"
47LIBV = "3.0.0"
48
49FILES_${PN}-demo = "${bindir}/gtk3-demo \
50 ${bindir}/gtk3-demo-application \
51 ${bindir}/gtk3-icon-browser \
52 ${bindir}/gtk3-widget-factory \
53 ${datadir}/gtk-3.0/demo \
54 ${datadir}/applications/gtk3-demo.desktop \
55 ${datadir}/applications/gtk3-icon-browser.desktop \
56 ${datadir}/applications/gtk3-widget-factory.desktop \
57 ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \
58 ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png"
59
60# The demo uses PNG files and mime type sniffing, so ensure that these
61# dependencies are present.
62RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info"
63
64FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \
65 ${bindir}/gtk-query-immodules-3.0 \
66 ${bindir}/gtk-launch \
67 ${libdir}/lib*${SOLIBS} \
68 ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \
69 ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \
70 ${libdir}/gtk-3.0/modules/*.so"
71
72FILES_${PN}-dev += " \
73 ${datadir}/gtk-3.0/gtkbuilder.rng \
74 ${datadir}/gtk-3.0/include \
75 ${libdir}/gtk-3.0/include \
76 ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \
77 ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \
78 ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \
79 ${libdir}/gtk-3.0/${LIBV}/engines/*.la \
80 ${libdir}/gtk-3.0/modules/*.la \
81 ${bindir}/gtk-builder-convert \
82 ${bindir}/gtk-encode-symbolic-svg"
83
84FILES_${PN}-dbg += " \
85 ${libdir}/gtk-3.0/${LIBV}/loaders/.debug \
86 ${libdir}/gtk-3.0/${LIBV}/immodules/.debug \
87 ${libdir}/gtk-3.0/${LIBV}/engines/.debug \
88 ${libdir}/gtk-3.0/${LIBV}/printbackends/.debug \
89 ${libdir}/gtk-3.0/modules/.debug"
90
91RRECOMMENDS_${PN} = "adwaita-icon-theme-symbolic"
92
93PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*"
94
95ALTERNATIVE_${PN} = "gtk-update-icon-cache"
96ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0"
97
98python populate_packages_prepend () {
99 import os.path
100
101 gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}')
102 immodules_root = os.path.join(gtk_libdir, 'immodules')
103 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
104
105 immodules = do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')
106 if immodules:
107 d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules))
108
109 do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
110
111 if (d.getVar('DEBIAN_NAMES', 1)):
112 d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0')
113}
114