Skip to contentSkip to conversation

gtk+3: Add patch for --disable-opengl

PATCH New Jussi Kukkonen 1 participant 2 messages Jun 17, 2016

lore
Share & tools
lore
#0 lore raw

cover gtk+3: Add patch for --disable-opengl

Objective here is to allow building core-image-sato without OpenGL even though Gtk+3 depends on it.

I'm not proud of the patch:
* It modifies Gtk API (only GdkX11GLContext is removed but still)
* It's a maintenance problem
* It finds all kinds of nasty corner cases in the Gtk build system

but I'm guessing many people expect core-image-sato to work without GL so maybe this i worth it. In the longer term I'd prefer some other solution.

Thanks,
Jussi

The following changes since commit 2a85038dd03463774fb787b655887297ec4f0a04:

directfb: fix client->gfx_state initialisation (2016-06-15 18:13:16 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib jku/gtk3-without-opengl
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/gtk3-without-opengl

Jussi Kukkonen (1):
gtk+3: Add patch for --disable-opengl

 meta/recipes-gnome/gtk+/gtk+3.inc                  |   7 +-
 .../0001-Add-disable-opengl-configure-option.patch | 965 +++++++++++++++++++++
 meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb            |   1 +
 3 files changed, 972 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-gnome/gtk+/gtk+3/0001-Add-disable-opengl-configure-option.patch
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 gtk+3: Add patch for --disable-opengl

Patch is a bit nasty and not maintainer friendly, but it does make Gtk+3 compile without libepoxy (which means without OpenGL dev files).

---
 meta/recipes-gnome/gtk+/gtk+3.inc                  |   7 +-
 .../0001-Add-disable-opengl-configure-option.patch | 965 +++++++++++++++++++++
 meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb            |   1 +
 3 files changed, 972 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-gnome/gtk+/gtk+3/0001-Add-disable-opengl-configure-option.patch
meta/recipes-gnome/gtk+/gtk+3.inc +6 -1
index 12fcaba..959fb44 100644
@@ -6,7 +6,7 @@ BUGTRACKER = "https://bugzilla.gnome.org/"
 SECTION = "libs"
 
 DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
-           docbook-utils-native gdk-pixbuf-native libepoxy"
+           docbook-utils-native gdk-pixbuf-native"
 
 LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
 
@@ -21,6 +21,8 @@ do_configure_prepend() {
     # Do this because the configure script is running ./libtool directly
     rm -f libtool
     ln -s ${TARGET_PREFIX}libtool libtool
+    #delete a file that will get confused with generated one in ${B}
+    rm -f ${S}/gtk/gtktypefuncs.c
 }
 
 EXTRA_OECONF += " \
@@ -36,10 +38,13 @@ do_compile_prepend() {
 }
 
 PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
+                   ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl", "", d)} \
                    ${@bb.utils.contains("DISTRO_FEATURES", "opengl x11", "glx", "", d)} \
                    ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
 
 PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
+# this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build
+PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy"
 PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
 PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa wayland-native"
 
meta/recipes-gnome/gtk+/gtk+3/0001-Add-disable-opengl-configure-option.patch new file +965 -0

965 lines not on this page · raw message

meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb +1 -0
index b76c0cc..d776b6d 100644
@@ -6,6 +6,7 @@ SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar
            file://hardcoded_libtool.patch \
            file://Dont-force-csd.patch \
            file://Do-not-try-to-initialize-GL-without-libGL.patch \
+           file://0001-Add-disable-opengl-configure-option.patch \
           "
 
 SRC_URI[md5sum] = "9671acb41dc13561d19233f1a75cf184"
Signature · 1 line
2.1.4