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