Skip to contentSkip to conversation

package/webkit: Fix OpenGL-related dependencies

PATCH New Bernd Kuhls 2 participants 2 messages May 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/webkit: Fix OpenGL-related dependencies

fixes
http://autobuild.buildroot.net/results/27a/27a674c6a19a729fae5cc33de0360b2a061930c1/

This patch indeed fixes several problems based on the autobuilder-defconfig used.

1) Add missing dependencies when opengl is detected by webkit to satisfy autobuilder:

checking which GPU acceleration backend to use... opengl checking for XCOMPOSITE... yes
checking for XDAMAGE... no
configure: error: Package requirements (xdamage) were not met:

2) ... but opengl should not have been detected with the used defconfig:

$ grep MESA .config
BR2_PACKAGE_MESA3D=y

which will lead to a link error although webkit configure found all dependencies:

/home/br2/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/4.7.3/../../../../mips-linux-gnu/bin/ld: cannot find -lGL

3) same is valid for glx, having GL/glx.h means nothing

4) add some configure options for gles/egl as well, just to make sure ;)

---
v2: - rework dependencies (Peter)
- more compile fixes

 package/webkit/Config.in |    2 ++
 package/webkit/webkit.mk |   21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)
package/webkit/Config.in +2 -0
index 21da2b2..c86eb94 100644
@@ -31,6 +31,8 @@ config BR2_PACKAGE_WEBKIT
 	select BR2_PACKAGE_SQLITE
 	select BR2_PACKAGE_WEBP
 	select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_HAS_LIBGL
 	help
 	  WebKit is an open source, standards compliant web browser engine.
 
package/webkit/webkit.mk +21 -0
index 21b535f..63740c2 100644
@@ -11,6 +11,10 @@ WEBKIT_INSTALL_STAGING = YES
 WEBKIT_DEPENDENCIES = host-ruby host-flex host-bison host-gperf enchant harfbuzz \
 	icu jpeg libcurl libgail libsecret libsoup libxml2 libxslt libgtk2 sqlite webp
 
+WEBKIT_DEPENDENCIES += \
+	$(if $(BR_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite) \
+	$(if $(BR_PACKAGE_XLIB_LIBXDAMAGE),xlib_libXdamage)
+
 # webkit-disable-tests.patch changes configure.ac therefore autoreconf required
 WEBKIT_AUTORECONF = YES
 WEBKIT_AUTORECONF_OPT = -I $(@D)/Source/autotools
@@ -48,4 +52,21 @@ WEBKIT_CONF_OPT += \
 WEBKIT_CONF_OPT += --with-target=x11
 WEBKIT_DEPENDENCIES += xlib_libXt
 
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yy)
+WEBKIT_CONF_OPT += --enable-gles2
+WEBKIT_DEPENDENCIES += libegl libgles
+else
+WEBKIT_CONF_OPT += --disable-gles2
+endif
+
+# gles/egl support is prefered over opengl by webkit configure
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+WEBKIT_CONF_OPT += --with-acceleration-backend=opengl
+WEBKIT_DEPENDENCIES += libgl
+else
+# OpenGL/glx is auto-detected due to the presence of gl.h/glx.h, which is not
+# enough, so disable glx and the use of the OpenGL acceleration backend here
+WEBKIT_CONF_OPT += --disable-glx --with-acceleration-backend=none
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/1 package/webkit: Fix OpenGL-related dependencies

Bernd, All,

On 2014-05-19 22:51 +0200, Bernd Kuhls spake thusly:

Quoted 51 lines

fixes
http://autobuild.buildroot.net/results/27a/27a674c6a19a729fae5cc33de0360b2a061930c1/

This patch indeed fixes several problems based on the autobuilder-defconfig used.

1) Add missing dependencies when opengl is detected by webkit to satisfy autobuilder:

checking which GPU acceleration backend to use... opengl checking for XCOMPOSITE... yes
checking for XDAMAGE... no
configure: error: Package requirements (xdamage) were not met:

2) ... but opengl should not have been detected with the used defconfig:

$ grep MESA .config
BR2_PACKAGE_MESA3D=y

which will lead to a link error although webkit configure found all dependencies:

/home/br2/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/4.7.3/../../../../mips-linux-gnu/bin/ld: cannot find -lGL

3) same is valid for glx, having GL/glx.h means nothing

4) add some configure options for gles/egl as well, just to make sure ;)

---
v2: - rework dependencies (Peter)
- more compile fixes

 package/webkit/Config.in |    2 ++
 package/webkit/webkit.mk |   21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)
package/webkit/Config.in +2 -0
index 21da2b2..c86eb94 100644
@@ -31,6 +31,8 @@ config BR2_PACKAGE_WEBKIT
 	select BR2_PACKAGE_SQLITE
 	select BR2_PACKAGE_WEBP
 	select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_HAS_LIBGL
 	help
 	  WebKit is an open source, standards compliant web browser engine.
 
package/webkit/webkit.mk +0 -0
index 21b535f..63740c2 100644

package/webkit/webkit.mk WEBKIT_INSTALL_STAGING = YES · line 16

Quoted 6 lines
package/webkit/webkit.mk +3 -0
@@ -11,6 +11,10 @@ WEBKIT_INSTALL_STAGING = YES
 WEBKIT_DEPENDENCIES = host-ruby host-flex host-bison host-gperf enchant harfbuzz \
 	icu jpeg libcurl libgail libsecret libsoup libxml2 libxslt libgtk2 sqlite webp
 
+WEBKIT_DEPENDENCIES += \
+	$(if $(BR_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite) \
+	$(if $(BR_PACKAGE_XLIB_LIBXDAMAGE),xlib_libXdamage)

As I replied to Peter, I reply to you the same: un the manual, we explicitly state that we prefer multi-line syntax over single-line syntax (with the proper URL, this time):
http://buildroot.net/downloads/manual/manual.html#writing-rules-mk

(Note: I do not dislike the single-line syntax, but let's just respect our own rules, please. ;-) )

Regards,
Yann E. MORIN.

Quoted 32 lines
package/webkit/webkit.mk +17 -0
 # webkit-disable-tests.patch changes configure.ac therefore autoreconf required
 WEBKIT_AUTORECONF = YES
 WEBKIT_AUTORECONF_OPT = -I $(@D)/Source/autotools
@@ -48,4 +52,21 @@ WEBKIT_CONF_OPT += \
 WEBKIT_CONF_OPT += --with-target=x11
 WEBKIT_DEPENDENCIES += xlib_libXt
 
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yy)
+WEBKIT_CONF_OPT += --enable-gles2
+WEBKIT_DEPENDENCIES += libegl libgles
+else
+WEBKIT_CONF_OPT += --disable-gles2
+endif
+
+# gles/egl support is prefered over opengl by webkit configure
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+WEBKIT_CONF_OPT += --with-acceleration-backend=opengl
+WEBKIT_DEPENDENCIES += libgl
+else
+# OpenGL/glx is auto-detected due to the presence of gl.h/glx.h, which is not
+# enough, so disable glx and the use of the OpenGL acceleration backend here
+WEBKIT_CONF_OPT += --disable-glx --with-acceleration-backend=none
+endif
+
 $(eval $(autotools-package))
Signature · 6 lines
1.7.10.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'