diff options
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3.inc | 4 | ||||
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch | 60 | ||||
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb | 1 |
3 files changed, 64 insertions, 1 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc index 54f84fcbd2..22a40d8f05 100644 --- a/meta/recipes-gnome/gtk+/gtk+3.inc +++ b/meta/recipes-gnome/gtk+/gtk+3.inc | |||
@@ -32,9 +32,11 @@ EXTRA_OECONF += " \ | |||
32 | " | 32 | " |
33 | 33 | ||
34 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ | 34 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ |
35 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl x11", "glx", "", d)} \ | ||
35 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}" | 36 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}" |
36 | 37 | ||
37 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" | 38 | PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes" |
39 | PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl" | ||
38 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa" | 40 | PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa" |
39 | 41 | ||
40 | do_install_append() { | 42 | do_install_append() { |
@@ -57,7 +59,7 @@ FILES_${PN}-demo = "${bindir}/gtk3-demo \ | |||
57 | 59 | ||
58 | # The demo uses PNG files and mime type sniffing, so ensure that these | 60 | # The demo uses PNG files and mime type sniffing, so ensure that these |
59 | # dependencies are present. | 61 | # dependencies are present. |
60 | RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info libgl" | 62 | RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info" |
61 | 63 | ||
62 | FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \ | 64 | FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \ |
63 | ${bindir}/gtk-query-immodules-3.0 \ | 65 | ${bindir}/gtk-query-immodules-3.0 \ |
diff --git a/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch b/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch new file mode 100644 index 0000000000..c8c480c5eb --- /dev/null +++ b/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From fc22058a10db913534f11348f86681fe9e1838e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Fri, 16 Oct 2015 16:35:16 +0300 | ||
4 | Subject: [PATCH] Do not try to initialize GL without libGL | ||
5 | |||
6 | _gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys | ||
7 | GLX api which will exit() if libGL.so.1 is not present. We do not | ||
8 | want that to happen and we don't want every app to have to set | ||
9 | "GDK_GL=disabled" environment variable: so use #ifdef set based on | ||
10 | opengl distro feature. | ||
11 | |||
12 | Upstream is not interested in the fix as it is: Either epoxy should be | ||
13 | fixed (to not exit) or GTK+ possibly could do some additional probing | ||
14 | before calling epoxy APIs. | ||
15 | |||
16 | Upstream-Status: Denied | ||
17 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
18 | --- | ||
19 | configure.ac | 7 +++++++ | ||
20 | gdk/x11/gdkvisual-x11.c | 5 +++++ | ||
21 | 2 files changed, 12 insertions(+) | ||
22 | |||
23 | diff --git a/configure.ac b/configure.ac | ||
24 | index 729a62e..58cc1ac 100644 | ||
25 | --- a/configure.ac | ||
26 | +++ b/configure.ac | ||
27 | @@ -328,6 +328,13 @@ AC_ARG_ENABLE(mir-backend, | ||
28 | [enable the Mir gdk backend])], | ||
29 | [backend_set=yes]) | ||
30 | |||
31 | +AC_ARG_ENABLE(glx, | ||
32 | + [AS_HELP_STRING([--enable-glx], | ||
33 | + [When enabled Gdk will try to initialize GLX])]) | ||
34 | +AS_IF([test "x$enable_glx" != "xno"], [ | ||
35 | + AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime]) | ||
36 | +]) | ||
37 | + | ||
38 | if test -z "$backend_set"; then | ||
39 | if test "$platform_win32" = yes; then | ||
40 | enable_win32_backend=yes | ||
41 | diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c | ||
42 | index f3b062d..c8243f4 100644 | ||
43 | --- a/gdk/x11/gdkvisual-x11.c | ||
44 | +++ b/gdk/x11/gdkvisual-x11.c | ||
45 | @@ -345,7 +345,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen) | ||
46 | /* If GL is available we want to pick better default/rgba visuals, | ||
47 | as we care about glx details such as alpha/depth/stencil depth, | ||
48 | stereo and double buffering */ | ||
49 | + /* update_visuals_for_gl() will end up calling epoxy GLX api which | ||
50 | + will exit if libgl is not there: so only do this if we know GL | ||
51 | + is available */ | ||
52 | +#ifdef HAVE_GLX | ||
53 | _gdk_x11_screen_update_visuals_for_gl (screen); | ||
54 | +#endif | ||
55 | } | ||
56 | |||
57 | gint | ||
58 | -- | ||
59 | 2.1.4 | ||
60 | |||
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb b/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb index 1d736a4326..381e60750b 100644 --- a/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb +++ b/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb | |||
@@ -5,6 +5,7 @@ MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" | |||
5 | SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ | 5 | SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ |
6 | file://hardcoded_libtool.patch \ | 6 | file://hardcoded_libtool.patch \ |
7 | file://Dont-force-csd.patch \ | 7 | file://Dont-force-csd.patch \ |
8 | file://Do-not-try-to-initialize-GL-without-libGL.patch \ | ||
8 | " | 9 | " |
9 | 10 | ||
10 | SRC_URI[md5sum] = "fc59e5c8b5a4585b60623dd708df400b" | 11 | SRC_URI[md5sum] = "fc59e5c8b5a4585b60623dd708df400b" |