diff options
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk+3.inc')
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3.inc | 90 |
1 files changed, 37 insertions, 53 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc index 8d5edb7ee8..e1603b43fc 100644 --- a/meta/recipes-gnome/gtk+/gtk+3.inc +++ b/meta/recipes-gnome/gtk+/gtk+3.inc | |||
@@ -6,65 +6,48 @@ HOMEPAGE = "http://www.gtk.org" | |||
6 | BUGTRACKER = "https://bugzilla.gnome.org/" | 6 | BUGTRACKER = "https://bugzilla.gnome.org/" |
7 | SECTION = "libs" | 7 | SECTION = "libs" |
8 | 8 | ||
9 | DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ | 9 | DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf gdk-pixbuf-native" |
10 | gdk-pixbuf-native" | ||
11 | 10 | ||
12 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" | 11 | LICENSE = "LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-or-later" |
13 | 12 | ||
14 | inherit autotools gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection | 13 | inherit meson gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection |
15 | 14 | ||
16 | BBCLASSEXTEND = "native nativesdk" | 15 | BBCLASSEXTEND = "native nativesdk" |
17 | 16 | ||
18 | GSETTINGS_PACKAGE_class-native = "" | 17 | GSETTINGS_PACKAGE:class-native = "" |
19 | 18 | ||
20 | # versions >= 3.90 are development versions, otherwise like upstream-version-is-even | 19 | # versions >= 3.90 are development versions, otherwise like upstream-version-is-even |
21 | UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar" | 20 | UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar" |
22 | 21 | ||
23 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | 22 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
24 | 23 | ||
25 | # This should be in autotools.bbclass, but until something elses uses it putting | 24 | do_configure:prepend() { |
26 | # it here avoids rebuilding everything. | ||
27 | export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" | ||
28 | |||
29 | do_configure_prepend() { | ||
30 | # Do this because the configure script is running ./libtool directly | ||
31 | rm -f libtool | ||
32 | ln -s ${TARGET_PREFIX}libtool libtool | ||
33 | #delete a file that will get confused with generated one in ${B} | ||
34 | rm -f ${S}/gtk/gtktypefuncs.c | ||
35 | |||
36 | # These files are generated by wayland-scanner but will race over modification | 25 | # These files are generated by wayland-scanner but will race over modification |
37 | # time between the copies in the sysroot from wayland-protocols and the copy | 26 | # time between the copies in the sysroot from wayland-protocols and the copy |
38 | # in the source tree. Solve the race by deleting so they need to be regenerated. | 27 | # in the source tree. Solve the race by deleting so they need to be regenerated. |
39 | # 3.24.22 will not be shipping these files so this can be deleted then: | 28 | rm -f ${S}/modules/input/*-text-input-*.[ch] |
40 | # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2183 | ||
41 | rm -f ${S}/modules/input/text-input-unstable-v3*.[ch] | ||
42 | } | 29 | } |
43 | 30 | ||
44 | EXTRA_OECONF += " \ | 31 | GTKDOC_MESON_OPTION = 'gtk_doc' |
45 | --disable-glibtest \ | ||
46 | --disable-xinerama \ | ||
47 | --enable-modules \ | ||
48 | ${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \ | ||
49 | " | ||
50 | 32 | ||
51 | do_compile_prepend() { | 33 | EXTRA_OEMESON = "-Dxinerama=no -Dtests=false" |
52 | export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs" | 34 | EXTRA_OEMESON:append:class-native = " -Ddemos=false -Dexamples=false" |
53 | } | ||
54 | 35 | ||
55 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl wayland x11', d)} \ | 36 | PACKAGECONFIG ??= " \ |
56 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)}" | 37 | ${@bb.utils.filter('DISTRO_FEATURES', 'opengl x11', d)} \ |
57 | PACKAGECONFIG_class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | 38 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'wayland', '', d)} \ |
58 | PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | 39 | " |
40 | PACKAGECONFIG:class-native = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | ||
41 | PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | ||
59 | 42 | ||
60 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" | 43 | PACKAGECONFIG[x11] = "-Dx11_backend=true,-Dx11_backend=false,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" |
61 | # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build | 44 | # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build |
62 | PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy" | 45 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false,libepoxy" |
63 | PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl" | 46 | PACKAGECONFIG[wayland] = "-Dwayland_backend=true,-Dwayland_backend=false,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" |
64 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/libgles2 wayland-native" | 47 | PACKAGECONFIG[cups] = ",,cups,cups gtk3-printbackend-cups" |
65 | PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups" | 48 | PACKAGECONFIG[colord] = "-Dcolord=yes,-Dcolord=no,colord" |
66 | PACKAGECONFIG[cloudprint] = "--enable-cloudprint,--disable-cloudprint,rest json-glib" | 49 | PACKAGECONFIG[cloudproviders] = "-Dcloudproviders=true,-Dcloudproviders=false,libcloudproviders" |
67 | PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" | 50 | PACKAGECONFIG[tracker3] = "-Dtracker3=true,-Dtracker3=false,tracker,tracker-miners" |
68 | 51 | ||
69 | prepare_gtk_scripts() { | 52 | prepare_gtk_scripts() { |
70 | mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 | 53 | mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0 |
@@ -74,15 +57,15 @@ prepare_gtk_scripts() { | |||
74 | ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0 | 57 | ln ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0 |
75 | } | 58 | } |
76 | 59 | ||
77 | do_install_append_class-target() { | 60 | do_install:append:class-target() { |
78 | prepare_gtk_scripts | 61 | prepare_gtk_scripts |
79 | } | 62 | } |
80 | 63 | ||
81 | do_install_append_class-nativesdk() { | 64 | do_install:append:class-nativesdk() { |
82 | prepare_gtk_scripts | 65 | prepare_gtk_scripts |
83 | } | 66 | } |
84 | 67 | ||
85 | do_install_append_class-native() { | 68 | do_install:append:class-native() { |
86 | create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ | 69 | create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ |
87 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache | 70 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache |
88 | create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ | 71 | create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ |
@@ -93,7 +76,7 @@ PROVIDES += "gtk-icon-utils" | |||
93 | PACKAGES =+ "${PN}-demo" | 76 | PACKAGES =+ "${PN}-demo" |
94 | LIBV = "3.0.0" | 77 | LIBV = "3.0.0" |
95 | 78 | ||
96 | FILES_${PN}-demo = "${bindir}/gtk3-demo \ | 79 | FILES:${PN}-demo = "${bindir}/gtk3-demo \ |
97 | ${bindir}/gtk3-demo-application \ | 80 | ${bindir}/gtk3-demo-application \ |
98 | ${bindir}/gtk3-icon-browser \ | 81 | ${bindir}/gtk3-icon-browser \ |
99 | ${bindir}/gtk3-widget-factory \ | 82 | ${bindir}/gtk3-widget-factory \ |
@@ -104,14 +87,15 @@ FILES_${PN}-demo = "${bindir}/gtk3-demo \ | |||
104 | ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \ | 87 | ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \ |
105 | ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png" | 88 | ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png" |
106 | 89 | ||
107 | FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache-3.0 \ | 90 | FILES:${PN}:append = " ${bindir}/gtk-update-icon-cache-3.0 \ |
108 | ${bindir}/gtk-query-immodules-3.0 \ | 91 | ${bindir}/gtk-query-immodules-3.0 \ |
109 | ${bindir}/gtk-launch \ | 92 | ${bindir}/gtk-launch \ |
110 | ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ | 93 | ${datadir}/themes ${datadir}/gtk-3.0/emoji \ |
94 | ${sysconfdir} ${datadir}/glib-2.0/schemas/ \ | ||
111 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ | 95 | ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \ |
112 | ${libdir}/gtk-3.0/modules/*.so" | 96 | ${libdir}/gtk-3.0/modules/*.so" |
113 | 97 | ||
114 | FILES_${PN}-dev += " \ | 98 | FILES:${PN}-dev += " \ |
115 | ${datadir}/gtk-3.0/gtkbuilder.rng \ | 99 | ${datadir}/gtk-3.0/gtkbuilder.rng \ |
116 | ${datadir}/gtk-3.0/include \ | 100 | ${datadir}/gtk-3.0/include \ |
117 | ${datadir}/gtk-3.0/valgrind \ | 101 | ${datadir}/gtk-3.0/valgrind \ |
@@ -137,22 +121,22 @@ GTKBASE_RRECOMMENDS ?= "liberation-fonts \ | |||
137 | adwaita-icon-theme-symbolic \ | 121 | adwaita-icon-theme-symbolic \ |
138 | " | 122 | " |
139 | 123 | ||
140 | GTKBASE_RRECOMMENDS_class-native ?= "\ | 124 | GTKBASE_RRECOMMENDS:class-native ?= "\ |
141 | " | 125 | " |
142 | 126 | ||
143 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" | 127 | GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1" |
144 | 128 | ||
145 | RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}" | 129 | RRECOMMENDS:${PN} = "${GTKBASE_RRECOMMENDS}" |
146 | RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}" | 130 | RRECOMMENDS:${PN}:libc-glibc = "${GTKGLIBC_RRECOMMENDS}" |
147 | RDEPENDS_${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" | 131 | RDEPENDS:${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}" |
148 | 132 | ||
149 | PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" | 133 | PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*" |
150 | 134 | ||
151 | ALTERNATIVE_${PN} = "gtk-update-icon-cache" | 135 | ALTERNATIVE:${PN} = "gtk-update-icon-cache" |
152 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" | 136 | ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0" |
153 | ALTERNATIVE_PRIORITY = "30" | 137 | ALTERNATIVE_PRIORITY = "30" |
154 | 138 | ||
155 | python populate_packages_prepend () { | 139 | python populate_packages:prepend () { |
156 | import os.path | 140 | import os.path |
157 | 141 | ||
158 | gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') | 142 | gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}') |
@@ -166,5 +150,5 @@ python populate_packages_prepend () { | |||
166 | do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') | 150 | do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s') |
167 | 151 | ||
168 | if (d.getVar('DEBIAN_NAMES')): | 152 | if (d.getVar('DEBIAN_NAMES')): |
169 | d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0') | 153 | d.setVar(d.expand('PKG:${PN}'), '${MLPREFIX}libgtk-3.0') |
170 | } | 154 | } |