All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support
@ 2017-02-25 13:35 Romain Naour
  2017-02-25 13:35 ` [Buildroot] [PATCH v2 2/3] package/sdl2: enable OpenGL ES support Romain Naour
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Romain Naour @ 2017-02-25 13:35 UTC (permalink / raw)
  To: buildroot

OpenGl support mean GLX so it require X11 support.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: no change
---
 package/sdl2/Config.in | 8 ++++++++
 package/sdl2/sdl2.mk   | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/package/sdl2/Config.in b/package/sdl2/Config.in
index 8fc14ee..25704f3 100644
--- a/package/sdl2/Config.in
+++ b/package/sdl2/Config.in
@@ -29,6 +29,14 @@ comment "X11 video driver needs X.org"
 	depends on !BR2_PACKAGE_XORG7
 	depends on BR2_USE_MMU
 
+config BR2_PACKAGE_SDL2_OPENGL
+	bool "OpenGL (GLX)"
+	depends on BR2_PACKAGE_HAS_LIBGL
+	depends on BR2_PACKAGE_XORG7
+
+comment "OpenGL support needs X11 and an OpenGL provider"
+	depends on !BR2_PACKAGE_HAS_LIBGL || !BR2_PACKAGE_XORG7
+
 endif
 
 comment "sdl2 needs a toolchain w/ dynamic library"
diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
index 2ec12e6..3f210f8 100644
--- a/package/sdl2/sdl2.mk
+++ b/package/sdl2/sdl2.mk
@@ -18,7 +18,6 @@ SDL2_CONF_OPTS += \
 	--disable-esd \
 	--disable-dbus \
 	--disable-pulseaudio \
-	--disable-video-opengl \
 	--disable-video-opengles \
 	--disable-video-wayland
 
@@ -99,6 +98,13 @@ else
 SDL2_CONF_OPTS += --disable-video-x11 --without-x
 endif
 
+ifeq ($(BR2_PACKAGE_SDL2_OPENGL),y)
+SDL2_CONF_OPTS += --enable-video-opengl
+SDL2_DEPENDENCIES += libgl
+else
+SDL2_CONF_OPTS += --disable-video-opengl
+endif
+
 ifeq ($(BR2_PACKAGE_TSLIB),y)
 SDL2_DEPENDENCIES += tslib
 SDL2_CONF_OPTS += --enable-input-tslib
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 2/3] package/sdl2: enable OpenGL ES support
  2017-02-25 13:35 [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Romain Naour
@ 2017-02-25 13:35 ` Romain Naour
  2017-02-25 13:36 ` [Buildroot] [PATCH v2 3/3] package/lugaru: new package Romain Naour
  2017-02-26 13:57 ` [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Thomas Petazzoni
  2 siblings, 0 replies; 9+ messages in thread
From: Romain Naour @ 2017-02-25 13:35 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: no change
---
 package/sdl2/Config.in | 7 +++++++
 package/sdl2/sdl2.mk   | 8 +++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/package/sdl2/Config.in b/package/sdl2/Config.in
index 25704f3..66a77a1 100644
--- a/package/sdl2/Config.in
+++ b/package/sdl2/Config.in
@@ -37,6 +37,13 @@ config BR2_PACKAGE_SDL2_OPENGL
 comment "OpenGL support needs X11 and an OpenGL provider"
 	depends on !BR2_PACKAGE_HAS_LIBGL || !BR2_PACKAGE_XORG7
 
+config BR2_PACKAGE_SDL2_OPENGLES
+	bool "OpenGL ES"
+	depends on BR2_PACKAGE_HAS_LIBGLES
+
+comment "OpenGL ES support needs an OpenGL ES provider"
+	depends on !BR2_PACKAGE_HAS_LIBGLES
+
 endif
 
 comment "sdl2 needs a toolchain w/ dynamic library"
diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
index 3f210f8..d2ee50d 100644
--- a/package/sdl2/sdl2.mk
+++ b/package/sdl2/sdl2.mk
@@ -18,7 +18,6 @@ SDL2_CONF_OPTS += \
 	--disable-esd \
 	--disable-dbus \
 	--disable-pulseaudio \
-	--disable-video-opengles \
 	--disable-video-wayland
 
 # We must enable static build to get compilation successful.
@@ -105,6 +104,13 @@ else
 SDL2_CONF_OPTS += --disable-video-opengl
 endif
 
+ifeq ($(BR2_PACKAGE_SDL2_OPENGLES),y)
+SDL2_CONF_OPTS += --enable-video-opengles
+SDL2_DEPENDENCIES += libgles
+else
+SDL2_CONF_OPTS += --disable-video-opengles
+endif
+
 ifeq ($(BR2_PACKAGE_TSLIB),y)
 SDL2_DEPENDENCIES += tslib
 SDL2_CONF_OPTS += --enable-input-tslib
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/lugaru: new package
  2017-02-25 13:35 [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Romain Naour
  2017-02-25 13:35 ` [Buildroot] [PATCH v2 2/3] package/sdl2: enable OpenGL ES support Romain Naour
@ 2017-02-25 13:36 ` Romain Naour
  2017-02-26 13:59   ` Thomas Petazzoni
  2017-02-26 13:57 ` [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Thomas Petazzoni
  2 siblings, 1 reply; 9+ messages in thread
From: Romain Naour @ 2017-02-25 13:36 UTC (permalink / raw)
  To: buildroot

Lugaru needs SDL2 library with OpenGL support which require X11 support.
Otherwise Lugaru error out with "No dynamic GL support in video driver"
message.

https://osslugaru.gitlab.io/

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: bump to v1.2
    fix build issue due an invalid conversion
    fix musl issue on x86 x86_64 with incompatible posix_memalign
    declaration (pkg-test).
    Build tested with pkg-test and coding style verified by
    check-package (v1).
---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 .../0001-ImageIO-fix-invalid-conversion.patch      | 35 +++++++++++++++++++++
 package/lugaru/Config.in                           | 36 ++++++++++++++++++++++
 package/lugaru/lugaru.hash                         |  2 ++
 package/lugaru/lugaru.mk                           | 32 +++++++++++++++++++
 6 files changed, 107 insertions(+)
 create mode 100644 package/lugaru/0001-ImageIO-fix-invalid-conversion.patch
 create mode 100644 package/lugaru/Config.in
 create mode 100644 package/lugaru/lugaru.hash
 create mode 100644 package/lugaru/lugaru.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 09a0a6e..c80fdb4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1282,6 +1282,7 @@ F:	package/expedite/
 F:	package/iqvlinux/
 F:	package/liblinear/
 F:	package/linux-syscall-support/
+F:	package/lugaru/
 F:	package/mcelog/
 F:	package/openpowerlink/
 F:	package/stress-ng/
diff --git a/package/Config.in b/package/Config.in
index deff0fe..aad0842 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -222,6 +222,7 @@ menu "Games"
 	source "package/gnuchess/Config.in"
 	source "package/lbreakout2/Config.in"
 	source "package/ltris/Config.in"
+	source "package/lugaru/Config.in"
 	source "package/opentyrian/Config.in"
 	source "package/opentyrian-data/Config.in"
 	source "package/prboom/Config.in"
diff --git a/package/lugaru/0001-ImageIO-fix-invalid-conversion.patch b/package/lugaru/0001-ImageIO-fix-invalid-conversion.patch
new file mode 100644
index 0000000..6096477
--- /dev/null
+++ b/package/lugaru/0001-ImageIO-fix-invalid-conversion.patch
@@ -0,0 +1,35 @@
+From 73e56ba8e91b6bae59220e6f25c1b7c15817edb5 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sun, 12 Feb 2017 21:17:44 +0100
+Subject: [PATCH] ImageIO: fix invalid conversion
+
+Fixes:
+Source/Utils/ImageIO.cpp:125:27: error: invalid conversion from 'int' to 'boolean' [-fpermissive]
+     cinfo.quantize_colors = 0;
+                           ^
+
+quantize_colors type is bool, so it must be initialized to TRUE or FALSE.
+
+Patch status: upsteam
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ Source/Utils/ImageIO.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/Utils/ImageIO.cpp b/Source/Utils/ImageIO.cpp
+index 706c201..c19a63e 100644
+--- a/Source/Utils/ImageIO.cpp
++++ b/Source/Utils/ImageIO.cpp
+@@ -122,7 +122,7 @@ static bool load_jpg(const char* file_name, ImageRec& tex)
+     (void)jpeg_read_header(&cinfo, TRUE);
+ 
+     cinfo.out_color_space = JCS_RGB;
+-    cinfo.quantize_colors = 0;
++    cinfo.quantize_colors = FALSE;
+     (void)jpeg_calc_output_dimensions(&cinfo);
+     (void)jpeg_start_decompress(&cinfo);
+ 
+-- 
+2.9.3
+
diff --git a/package/lugaru/Config.in b/package/lugaru/Config.in
new file mode 100644
index 0000000..6da8601
--- /dev/null
+++ b/package/lugaru/Config.in
@@ -0,0 +1,36 @@
+config BR2_PACKAGE_LUGARU
+	bool "lugaru"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_HAS_LIBGL # libglu
+	depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_XORG7 # SDL2 OpenGL (GLX)
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
+	depends on !BR2_STATIC_LIBS # SDL2
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBGLU # GL/glu.h
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBVORBIS
+	select BR2_PACKAGE_OPENAL
+	select BR2_PACKAGE_SDL2
+	select BR2_PACKAGE_SDL2_OPENGL
+	select BR2_PACKAGE_ZLIB
+	help
+	  Lugaru (pronounced Loo-GAH-roo) is a cross-platform
+	  third-person action game. The main character, Turner, is an
+	  anthropomorphic rebel bunny rabbit with impressive combat
+	  skills. In his quest to find those responsible for
+	  slaughtering his village, he uncovers a far-reaching
+	  conspiracy involving the corrupt leaders of the rabbit
+	  republic and the starving wolves from a nearby den. Turner
+	  takes it upon himself to fight against their plot and save
+	  his fellow rabbits from slavery.
+
+	  https://osslugaru.gitlab.io/
+
+comment "lugaru needs X11 and a toolchain w/ C++, OpenGL backend, gcc >= 4.7, NPTL, dynamic library"
+	depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_XORG7
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_LIBGL || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
+		BR2_STATIC_LIBS
diff --git a/package/lugaru/lugaru.hash b/package/lugaru/lugaru.hash
new file mode 100644
index 0000000..6ba2bca
--- /dev/null
+++ b/package/lugaru/lugaru.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 f3ea477caf78911c69939fbdc163f9f6517c7ef2267e716a0e050be1a166ef97 lugaru-1.2.tar.xz
diff --git a/package/lugaru/lugaru.mk b/package/lugaru/lugaru.mk
new file mode 100644
index 0000000..d2b18fb
--- /dev/null
+++ b/package/lugaru/lugaru.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# lugaru
+#
+################################################################################
+
+LUGARU_VERSION = 1.2
+LUGARU_SITE = https://bitbucket.org/osslugaru/lugaru/downloads
+LUGARU_SOURCE = lugaru-$(LUGARU_VERSION).tar.xz
+
+LUGARU_LICENSE = GPLv2+, CC-BY-SA-3.0 (Wolfire and Slib assets), \
+	CC-BY-SA-4.0 (OSS Lugaru, Jendraz and Philtron R. assets)
+LUGARU_LICENSE_FILES = COPYING.txt CONTENT-LICENSE.txt
+
+LUGARU_DEPENDENCIES = host-pkgconf jpeg libgl libglu libpng libvorbis \
+	openal sdl2 zlib
+
+# Avoid incompatible posix_memalign declaration on x86 and x86_64 with
+# musl.
+# https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_i386)$(BR2_x86_64),y:y)
+define LUGARU_REMOVE_PEDANTIC
+	$(SED) 's% -pedantic%%' $(@D)/CMakeLists.txt
+endef
+LUGARU_POST_PATCH_HOOKS += LUGARU_REMOVE_PEDANTIC
+endif
+
+LUGARU_CONF_OPTS = -DSYSTEM_INSTALL=ON \
+	-DCMAKE_INSTALL_BINDIR=games \
+	-DCMAKE_INSTALL_DATADIR=share/games
+
+$(eval $(cmake-package))
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support
  2017-02-25 13:35 [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Romain Naour
  2017-02-25 13:35 ` [Buildroot] [PATCH v2 2/3] package/sdl2: enable OpenGL ES support Romain Naour
  2017-02-25 13:36 ` [Buildroot] [PATCH v2 3/3] package/lugaru: new package Romain Naour
@ 2017-02-26 13:57 ` Thomas Petazzoni
  2017-02-26 15:32   ` Romain Naour
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-02-26 13:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Feb 2017 14:35:58 +0100, Romain Naour wrote:

> +config BR2_PACKAGE_SDL2_OPENGL
> +	bool "OpenGL (GLX)"
> +	depends on BR2_PACKAGE_HAS_LIBGL
> +	depends on BR2_PACKAGE_XORG7

Are you sure this doesn't need BR2_PACKAGE_SDL2_X11 ? I.e what happens
if you build SDL2 with BR2_PACKAGE_SDL2_OPENGL=y but
BR2_PACKAGE_SDL2_X11 disabled ?

> +ifeq ($(BR2_PACKAGE_SDL2_OPENGL),y)
> +SDL2_CONF_OPTS += --enable-video-opengl
> +SDL2_DEPENDENCIES += libgl

Also, is libgl sufficient here? What happens if you select
nvidia-driver as the OpenGL provider for example? It doesn't depend on
any X.org package, so are you sure by the time SDL2 runs its configure
script, enough things have been built?

Can you verify by enabling nvidia-driver, and then running "make sdl2" ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/lugaru: new package
  2017-02-25 13:36 ` [Buildroot] [PATCH v2 3/3] package/lugaru: new package Romain Naour
@ 2017-02-26 13:59   ` Thomas Petazzoni
  2017-02-26 16:22     ` Romain Naour
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-02-26 13:59 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Feb 2017 14:36:00 +0100, Romain Naour wrote:

> +LUGARU_CONF_OPTS = -DSYSTEM_INSTALL=ON \
> +	-DCMAKE_INSTALL_BINDIR=games \
> +	-DCMAKE_INSTALL_DATADIR=share/games

Why are we passing custom CMAKE_INSTALL_<foo>DIR here?

The rest of the patch looks good to me.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support
  2017-02-26 13:57 ` [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Thomas Petazzoni
@ 2017-02-26 15:32   ` Romain Naour
  2017-02-26 15:54     ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Romain Naour @ 2017-02-26 15:32 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

Le 26/02/2017 ? 14:57, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Sat, 25 Feb 2017 14:35:58 +0100, Romain Naour wrote:
> 
>> +config BR2_PACKAGE_SDL2_OPENGL
>> +	bool "OpenGL (GLX)"
>> +	depends on BR2_PACKAGE_HAS_LIBGL
>> +	depends on BR2_PACKAGE_XORG7
> 
> Are you sure this doesn't need BR2_PACKAGE_SDL2_X11 ? I.e what happens
> if you build SDL2 with BR2_PACKAGE_SDL2_OPENGL=y but
> BR2_PACKAGE_SDL2_X11 disabled ?

OpenGL (GLX) option only check for the following headers:
#include <GL/gl.h>
#include <GL/glx.h>

So, SDL2 build fine even without BR2_PACKAGE_SDL2_X11.
However you're probably right since GLX mean OpenGL with X11 support and
selecting BR2_PACKAGE_SDL2_X11 allow to enable additional X11 libraries support.
I'll add a select BR2_PACKAGE_SDL2_X11 since it was enabled for my runtime test.

> 
>> +ifeq ($(BR2_PACKAGE_SDL2_OPENGL),y)
>> +SDL2_CONF_OPTS += --enable-video-opengl
>> +SDL2_DEPENDENCIES += libgl
> 
> Also, is libgl sufficient here? What happens if you select
> nvidia-driver as the OpenGL provider for example? It doesn't depend on
> any X.org package, so are you sure by the time SDL2 runs its configure
> script, enough things have been built?

nvidia-driver is an libgl provider only if BR2_PACKAGE_NVIDIA_DRIVER_XORG=y,
so the libgl provider select a minimal set of X11 libraries that are already
build when sdl2 build start.
This is also the case when mesa3d is used as libgl provider.

> 
> Can you verify by enabling nvidia-driver, and then running "make sdl2" ?

I tried with this deconfig fragment a sdl2 build fine.

BR2_PACKAGE_SDL2=y
BR2_PACKAGE_SDL2_OPENGL=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_NVIDIA_DRIVER=y

Best regards,
Romain

> 
> Thanks,
> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support
  2017-02-26 15:32   ` Romain Naour
@ 2017-02-26 15:54     ` Thomas Petazzoni
  2017-02-26 16:29       ` Romain Naour
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2017-02-26 15:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 26 Feb 2017 16:32:40 +0100, Romain Naour wrote:

> So, SDL2 build fine even without BR2_PACKAGE_SDL2_X11.
> However you're probably right since GLX mean OpenGL with X11 support and
> selecting BR2_PACKAGE_SDL2_X11 allow to enable additional X11 libraries support.
> I'll add a select BR2_PACKAGE_SDL2_X11 since it was enabled for my runtime test.

OK.

> > Also, is libgl sufficient here? What happens if you select
> > nvidia-driver as the OpenGL provider for example? It doesn't depend on
> > any X.org package, so are you sure by the time SDL2 runs its configure
> > script, enough things have been built?  
> 
> nvidia-driver is an libgl provider only if BR2_PACKAGE_NVIDIA_DRIVER_XORG=y,
> so the libgl provider select a minimal set of X11 libraries that are already
> build when sdl2 build start.

Selects yes, but it doesn't not have a <pkg>_DEPENDENCIES on them, so
you are not guaranteed they are available before sdl2 is built.

Obvisouly, if BR2_PACKAGE_SDL2_X11 is now selected by
BR2_PACKAGE_SDL2_OPENGL, then you're sure the X11 libs will be built
before sdl2.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/lugaru: new package
  2017-02-26 13:59   ` Thomas Petazzoni
@ 2017-02-26 16:22     ` Romain Naour
  0 siblings, 0 replies; 9+ messages in thread
From: Romain Naour @ 2017-02-26 16:22 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

Le 26/02/2017 ? 14:59, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Sat, 25 Feb 2017 14:36:00 +0100, Romain Naour wrote:
> 
>> +LUGARU_CONF_OPTS = -DSYSTEM_INSTALL=ON \
>> +	-DCMAKE_INSTALL_BINDIR=games \
>> +	-DCMAKE_INSTALL_DATADIR=share/games
> 
> Why are we passing custom CMAKE_INSTALL_<foo>DIR here?

We have to set SYSTEM_INSTALL otherwise the application "will default to looking
for the data in the 'Data' directory next to the binary"

But I've keep the custom CMAKE_INSTALL_<foo>DIR from the example in COMPILING.md
file... We can remove them.

Thanks for the review.

Best regards,
Romain

> 
> The rest of the patch looks good to me.
> 
> Thanks!
> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support
  2017-02-26 15:54     ` Thomas Petazzoni
@ 2017-02-26 16:29       ` Romain Naour
  0 siblings, 0 replies; 9+ messages in thread
From: Romain Naour @ 2017-02-26 16:29 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

Le 26/02/2017 ? 16:54, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Sun, 26 Feb 2017 16:32:40 +0100, Romain Naour wrote:
> 
>> So, SDL2 build fine even without BR2_PACKAGE_SDL2_X11.
>> However you're probably right since GLX mean OpenGL with X11 support and
>> selecting BR2_PACKAGE_SDL2_X11 allow to enable additional X11 libraries support.
>> I'll add a select BR2_PACKAGE_SDL2_X11 since it was enabled for my runtime test.
> 
> OK.
> 
>>> Also, is libgl sufficient here? What happens if you select
>>> nvidia-driver as the OpenGL provider for example? It doesn't depend on
>>> any X.org package, so are you sure by the time SDL2 runs its configure
>>> script, enough things have been built?  
>>
>> nvidia-driver is an libgl provider only if BR2_PACKAGE_NVIDIA_DRIVER_XORG=y,
>> so the libgl provider select a minimal set of X11 libraries that are already
>> build when sdl2 build start.
> 
> Selects yes, but it doesn't not have a <pkg>_DEPENDENCIES on them, so
> you are not guaranteed they are available before sdl2 is built.

Haa indeed...

For mesa3d case, we can this minimal set of x11 libraries ...

MESA3D_DEPENDENCIES += \
	xproto_xf86driproto \
	xproto_dri2proto \
	xproto_glproto \
	xlib_libX11 \
	xlib_libXext \
	xlib_libXdamage \
	xlib_libXfixes \
	libxcb

... but for nvidia there is none.
However, it doesn't seems to be a problem for sdl2 (at least at build time).

I'll resend the series.

Best regards,
Romain

> 
> Obvisouly, if BR2_PACKAGE_SDL2_X11 is now selected by
> BR2_PACKAGE_SDL2_OPENGL, then you're sure the X11 libs will be built
> before sdl2.
> 
> Thanks!
> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-02-26 16:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-25 13:35 [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Romain Naour
2017-02-25 13:35 ` [Buildroot] [PATCH v2 2/3] package/sdl2: enable OpenGL ES support Romain Naour
2017-02-25 13:36 ` [Buildroot] [PATCH v2 3/3] package/lugaru: new package Romain Naour
2017-02-26 13:59   ` Thomas Petazzoni
2017-02-26 16:22     ` Romain Naour
2017-02-26 13:57 ` [Buildroot] [PATCH v2 1/3] package/sdl2: enable opengl support Thomas Petazzoni
2017-02-26 15:32   ` Romain Naour
2017-02-26 15:54     ` Thomas Petazzoni
2017-02-26 16:29       ` Romain Naour

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.