summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk+/gtk4_4.16.12.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk4_4.16.12.bb')
-rw-r--r--meta/recipes-gnome/gtk+/gtk4_4.16.12.bb135
1 files changed, 135 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk4_4.16.12.bb b/meta/recipes-gnome/gtk+/gtk4_4.16.12.bb
new file mode 100644
index 0000000000..d8d37a526d
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk4_4.16.12.bb
@@ -0,0 +1,135 @@
1SUMMARY = "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 = " \
9 atk \
10 cairo \
11 fribidi \
12 gdk-pixbuf \
13 gdk-pixbuf-native \
14 glib-2.0 \
15 graphene \
16 harfbuzz \
17 jpeg \
18 libdrm \
19 libepoxy \
20 libpng \
21 librsvg \
22 libxkbcommon \
23 pango \
24 python3-docutils-native \
25 tiff \
26"
27
28LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later"
29LIC_FILES_CHKSUM = " \
30 file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
31 file://gtk/gtk.h;endline=25;md5=61900d77e8d5bc67cf15ad93de9a3490 \
32 file://gdk/gdk.h;endline=25;md5=a0fb26c1f6b94e66d148279e192c333f \
33 file://tests/testgtk.c;endline=25;md5=49d06770681b8322466b52ed19d29fb2 \
34"
35
36MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
37
38UPSTREAM_CHECK_REGEX = "gtk-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)\.tar.xz"
39
40SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk/${MAJ_VER}/gtk-${PV}.tar.xz"
41SRC_URI[sha256sum] = "ef31bdbd6f082c4401634a20c850b0050c9bf252ef1e079764ee95a2a0c4c95a"
42
43S = "${WORKDIR}/gtk-${PV}"
44
45CVE_PRODUCT = "gnome:gtk"
46
47inherit meson gettext pkgconfig gi-docgen update-alternatives gsettings features_check gobject-introspection
48
49# TBD: nativesdk
50# gobject-introspection.bbclass pins introspection off for nativesk. As long as
51# we do not remove this wisdom or hack gtk4, it is not possible to build
52# nativesdk-gtk4
53BBCLASSEXTEND = "native"
54
55GSETTINGS_PACKAGE:class-native = ""
56
57ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
58REQUIRED_DISTRO_FEATURES = "opengl"
59GIDOCGEN_MESON_OPTION = "documentation"
60GIR_MESON_ENABLE_FLAG = 'enabled'
61GIR_MESON_DISABLE_FLAG = 'disabled'
62
63EXTRA_OEMESON = " -Dbuild-tests=false -Dbuild-testsuite=false -Dbuild-demos=false"
64
65PACKAGECONFIG ??= "gstreamer ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11 vulkan', d)}"
66PACKAGECONFIG:class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
67PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
68
69PACKAGECONFIG[x11] = "-Dx11-backend=true,-Dx11-backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes xinerama"
70PACKAGECONFIG[wayland] = "-Dwayland-backend=true,-Dwayland-backend=false,wayland wayland-protocols virtual/egl virtual/libgles2 wayland-native"
71PACKAGECONFIG[cloudproviders] = "-Dcloudproviders=enabled,-Dcloudproviders=disabled,libcloudproviders"
72PACKAGECONFIG[cups] = "-Dprint-cups=enabled,-Dprint-cups=disabled,cups,cups gtk4-printbackend-cups"
73PACKAGECONFIG[colord] = "-Dcolord=enabled,-Dcolord=disabled,colord"
74PACKAGECONFIG[iso-codes] = ",,iso-codes,iso-codes"
75# gtk4 wants gstreamer-player-1.0 -> gstreamer1.0-plugins-bad
76PACKAGECONFIG[gstreamer] = "-Dmedia-gstreamer=enabled,-Dmedia-gstreamer=disabled,gstreamer1.0-plugins-bad"
77PACKAGECONFIG[tracker] = "-Dtracker=enabled,-Dtracker=disabled,tinysparql,localsearch"
78PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled, vulkan-loader vulkan-headers shaderc-native"
79
80# Disable int-conversion warning as error until [1] is fixed
81# [1] https://gitlab.gnome.org/GNOME/gtk/-/issues/6033
82CFLAGS += "-Wno-error=int-conversion"
83
84LIBV = "4.0.0"
85
86FILES:${PN}:append = " \
87 ${datadir}/glib-2.0/schemas/ \
88 ${datadir}/gtk-4.0/emoji/ \
89 ${datadir}/metainfo/ \
90 ${datadir}/icons/hicolor/*/apps/org.gtk.PrintEditor4*.* \
91 ${libdir}/gtk-4.0/${LIBV}/media \
92 ${bindir}/gtk4-update-icon-cache \
93 ${bindir}/gtk4-launch \
94"
95
96FILES:${PN}-dev += " \
97 ${datadir}/gtk-4.0/gtk4builder.rng \
98 ${datadir}/gtk-4.0/include \
99 ${datadir}/gtk-4.0/valgrind \
100 ${datadir}/gettext/its \
101 ${bindir}/gtk4-builder-tool \
102 ${bindir}/gtk4-encode-symbolic-svg \
103 ${bindir}/gtk4-query-settings \
104"
105
106GTKBASE_RRECOMMENDS ?= " \
107 liberation-fonts \
108 gdk-pixbuf-loader-png \
109 gdk-pixbuf-loader-jpeg \
110 gdk-pixbuf-loader-gif \
111 gdk-pixbuf-loader-xpm \
112 shared-mime-info \
113 adwaita-icon-theme-symbolic \
114"
115
116GTKBASE_RRECOMMENDS:class-native ?= ""
117
118GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
119
120RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}"
121RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
122RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}"
123
124PACKAGES_DYNAMIC += "^gtk4-printbackend-.*"
125python populate_packages:prepend () {
126 import os.path
127
128 gtk_libdir = d.expand('${libdir}/gtk-4.0/${LIBV}')
129 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
130
131 do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk4-printbackend-%s', 'GTK printbackend module for %s')
132
133 if (d.getVar('DEBIAN_NAMES')):
134 d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-4.0')
135}