Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 libepoxy" |
| 10 | |
| 11 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" |
| 12 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 13 | inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check |
| 14 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
| 16 | # This should be in autotools.bbclass, but until something elses uses it putting |
| 17 | # it here avoids rebuilding everything. |
| 18 | export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" |
| 19 | |
| 20 | do_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 | |
| 26 | EXTRA_OECONF += " \ |
| 27 | --disable-glibtest \ |
| 28 | --disable-xinerama \ |
| 29 | --enable-modules \ |
| 30 | --disable-cups \ |
| 31 | --disable-introspection \ |
| 32 | " |
| 33 | |
| 34 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 35 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl x11", "glx", "", d)} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}" |
| 37 | |
| 38 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 39 | PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa" |
| 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-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. |
| 62 | RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info" |
| 63 | |
| 64 | FILES_${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 | |
| 72 | FILES_${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 | |
| 84 | FILES_${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 | |
| 91 | RRECOMMENDS_${PN} = "adwaita-icon-theme-symbolic" |
| 92 | |
| 93 | PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" |
| 94 | |
| 95 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" |
| 96 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" |
| 97 | |
| 98 | python 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 | |