Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [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 = " \ |
| 9 | sassc-native \ |
| 10 | glib-2.0 \ |
| 11 | libepoxy \ |
| 12 | graphene \ |
| 13 | cairo \ |
| 14 | pango \ |
| 15 | atk \ |
| 16 | jpeg \ |
| 17 | libpng \ |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 18 | librsvg \ |
| 19 | tiff \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 20 | gdk-pixbuf-native gdk-pixbuf \ |
| 21 | " |
| 22 | |
| 23 | LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" |
| 24 | LIC_FILES_CHKSUM = " \ |
| 25 | file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ |
| 26 | file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ |
| 27 | file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ |
| 28 | file://tests/testgtk.c;endline=25;md5=49d06770681b8322466b52ed19d29fb2 \ |
| 29 | " |
| 30 | |
| 31 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 32 | |
| 33 | UPSTREAM_CHECK_REGEX = "gtk-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)\.tar.xz" |
| 34 | |
| 35 | SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk/${MAJ_VER}/gtk-${PV}.tar.xz" |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 36 | SRC_URI[sha256sum] = "7bbfe4d13569f7c297ed49834ac7263e318b7bf102d3271cb466d5971f59ae70" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 37 | |
| 38 | S = "${WORKDIR}/gtk-${PV}" |
| 39 | |
| 40 | inherit meson gettext pkgconfig gtk-doc update-alternatives gsettings features_check gobject-introspection |
| 41 | |
| 42 | # TBD: nativesdk |
| 43 | # gobject-introspection.bbclass pins introspection off for nativesk. As long as |
| 44 | # we do not remove this wisdom or hack gtk4, it is not possible to build |
| 45 | # nativesdk-gtk4 |
| 46 | BBCLASSEXTEND = "native" |
| 47 | |
| 48 | GSETTINGS_PACKAGE:class-native = "" |
| 49 | |
| 50 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
| 51 | REQUIRED_DISTRO_FEATURES = "opengl" |
| 52 | |
| 53 | GIR_MESON_ENABLE_FLAG = 'enabled' |
| 54 | GIR_MESON_DISABLE_FLAG = 'disabled' |
| 55 | GTKDOC_MESON_OPTION = 'gtk_doc' |
| 56 | |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 57 | EXTRA_OEMESON = " -Dbuild-tests=false" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 58 | |
| 59 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" |
| 60 | PACKAGECONFIG:class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
| 61 | PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
| 62 | |
| 63 | PACKAGECONFIG[x11] = "-Dx11-backend=true,-Dx11-backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes xinerama" |
| 64 | PACKAGECONFIG[wayland] = "-Dwayland-backend=true,-Dwayland-backend=false,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" |
| 65 | PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups" |
| 66 | PACKAGECONFIG[colord] = "-Dcolord=enabled,-Dcolord=disabled,colord" |
| 67 | # gtk4 wants gstreamer-player-1.0 -> gstreamer1.0-plugins-bad |
| 68 | PACKAGECONFIG[gstreamer] = "-Dmedia-gstreamer=enabled,-Dmedia-gstreamer=disabled,gstreamer1.0-plugins-bad" |
| 69 | PACKAGECONFIG[tracker] = "-Dtracker=enabled,-Dtracker=disabled,tracker" |
| 70 | |
| 71 | |
| 72 | do_compile:prepend() { |
| 73 | export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs" |
| 74 | } |
| 75 | |
| 76 | |
| 77 | PACKAGES =+ "${PN}-demo" |
| 78 | LIBV = "4.0.0" |
| 79 | |
| 80 | FILES:${PN}-demo = " \ |
| 81 | ${datadir}/applications/org.gtk.Demo4.desktop \ |
| 82 | ${datadir}/applications/org.gtk.IconBrowser4.desktop \ |
| 83 | ${datadir}/applications/org.gtk.WidgetFactory4.desktop \ |
| 84 | ${datadir}/icons/hicolor/*/apps/org.gtk.Demo4*.* \ |
| 85 | ${datadir}/icons/hicolor/*/apps/org.gtk.IconBrowser4*.* \ |
| 86 | ${datadir}/icons/hicolor/*/apps/org.gtk.WidgetFactory4*.* \ |
| 87 | ${bindir}/gtk4-demo \ |
| 88 | ${bindir}/gtk4-demo-application \ |
| 89 | ${bindir}/gtk4-icon-browser \ |
| 90 | ${bindir}/gtk4-widget-factory \ |
| 91 | " |
| 92 | |
| 93 | FILES:${PN}:append = " \ |
| 94 | ${datadir}/glib-2.0/schemas/ \ |
| 95 | ${datadir}/gtk-4.0/emoji/ \ |
| 96 | ${datadir}/metainfo/ \ |
| 97 | ${datadir}/icons/hicolor/*/apps/org.gtk.PrintEditor4*.* \ |
| 98 | ${libdir}/gtk-4.0/${LIBV}/printbackends \ |
| 99 | ${bindir}/gtk4-update-icon-cache \ |
| 100 | ${bindir}/gtk4-launch \ |
| 101 | " |
| 102 | |
| 103 | FILES:${PN}-dev += " \ |
| 104 | ${datadir}/gtk-4.0/gtk4builder.rng \ |
| 105 | ${datadir}/gtk-4.0/include \ |
| 106 | ${datadir}/gtk-4.0/valgrind \ |
| 107 | ${datadir}/gettext/its \ |
| 108 | ${bindir}/gtk4-builder-tool \ |
| 109 | ${bindir}/gtk4-encode-symbolic-svg \ |
| 110 | ${bindir}/gtk4-query-settings \ |
| 111 | " |
| 112 | |
| 113 | GTKBASE_RRECOMMENDS ?= " \ |
| 114 | liberation-fonts \ |
| 115 | gdk-pixbuf-loader-png \ |
| 116 | gdk-pixbuf-loader-jpeg \ |
| 117 | gdk-pixbuf-loader-gif \ |
| 118 | gdk-pixbuf-loader-xpm \ |
| 119 | shared-mime-info \ |
| 120 | adwaita-icon-theme-symbolic \ |
| 121 | " |
| 122 | |
| 123 | GTKBASE_RRECOMMENDS:class-native ?= "" |
| 124 | |
| 125 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" |
| 126 | |
| 127 | RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" |
| 128 | RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" |
| 129 | RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" |
| 130 | |
| 131 | PACKAGES_DYNAMIC += "^gtk4-printbackend-.*" |
| 132 | python populate_packages:prepend () { |
| 133 | import os.path |
| 134 | |
| 135 | gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') |
| 136 | printmodules_root = os.path.join(gtk_libdir, 'printbackends'); |
| 137 | |
| 138 | do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk4-printbackend-%s', 'GTK printbackend module for %s') |
| 139 | |
| 140 | if (d.getVar('DEBIAN_NAMES')): |
| 141 | d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-4.0') |
| 142 | } |