package/sdl2: be more explicit in disabling optional features
PATCH 1/3 package/sdl2: be more explicit in disabling optional features
Add many more explicit --disable-<foo>, as we have for example seen video-vivante being autodetected when not needed.
--- package/sdl2/sdl2.mk | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
package/sdl2/sdl2.mk +18 -1
@@ -20,7 +20,24 @@ SDL2_CONF_OPTS += \ --disable-esd \ --disable-dbus \ --disable-pulseaudio \ - --disable-video-wayland + --disable-video-vivante \ + --disable-video-cocoa \ + --disable-video-metal \ + --disable-video-wayland \ + --disable-video-dummy \ + --disable-video-offscreen \ + --disable-video-vulkan \ + --disable-ime \ + --disable-ibus \ + --disable-fcitx \ + --disable-joystick-mfi \ + --disable-directx \ + --disable-xinput \ + --disable-wasapi \ + --disable-hidapi-joystick \ + --disable-hidapi-libusb \ + --disable-joystick-virtual \ + --disable-render-d3d # We are using autotools build system for sdl2, so the sdl2-config.cmake # include path are not resolved like for sdl2-config script.
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/3 package/sdl2: be explicit about OpenGL ES options
In addition to --enable-video-opengles, SDL2 configure script also looks at --enable-video-opengles1 and --enable-video-opengles2. Since all OpenGL ES providers in Buildroot provide at least up to OpenGL ES 2, enable both options when BR2_PACKAGE_SDL2_OPENGLES=y.
--- package/sdl2/sdl2.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/sdl2/sdl2.mk +2 -2
@@ -155,10 +155,10 @@ SDL2_CONF_OPTS += --disable-video-opengl endif ifeq ($(BR2_PACKAGE_SDL2_OPENGLES),y) -SDL2_CONF_OPTS += --enable-video-opengles +SDL2_CONF_OPTS += --enable-video-opengles --enable-video-opengles1 --enable-video-opengles2 SDL2_DEPENDENCIES += libgles else -SDL2_CONF_OPTS += --disable-video-opengles +SDL2_CONF_OPTS += --disable-video-opengles --disable-video-opengles1 --disable-video-opengles2 endif ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH 2/3] package/sdl2: be explicit about OpenGL ES options
Thomas, All,
On 2022-08-05 00:15 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 6 lines
In addition to --enable-video-opengles, SDL2 configure script also looks at --enable-video-opengles1 and --enable-video-opengles2. Since all OpenGL ES providers in Buildroot provide at least up to OpenGL ES 2, enable both options when BR2_PACKAGE_SDL2_OPENGLES=y.
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 28 lines
--- package/sdl2/sdl2.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/sdl2/sdl2.mk +2
-2@@ -155,10 +155,10 @@ SDL2_CONF_OPTS += --disable-video-opengl endif ifeq ($(BR2_PACKAGE_SDL2_OPENGLES),y) -SDL2_CONF_OPTS += --enable-video-opengles +SDL2_CONF_OPTS += --enable-video-opengles --enable-video-opengles1 --enable-video-opengles2 SDL2_DEPENDENCIES += libgles else -SDL2_CONF_OPTS += --disable-video-opengles +SDL2_CONF_OPTS += --disable-video-opengles --disable-video-opengles1 --disable-video-opengles2 endif ifeq ($(BR2_PACKAGE_ALSA_LIB),y)Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/3 package/sdl2: rework KMS/DRM video driver dependencies
In reply to Thomas Petazzoni via buildrootThe KMS/DRM video driver of SDL2 can currently only be enabled when mesa3d is the OpenGL provider, as the option has a dependency on BR2_PACKAGE_MESA3D_GBM. Now that we have a libgbm virtual package and BR2_PACKAGE_HAS_LIBGBM, we can do better.
However, this has uncovered a number of additional related issues that are resolved at the same time. Here are some details:
* the 'depends on BR2_PACKAGE_LIBDRM' is changed to a select, as we normally do for library dependencies. Due to this, we inherit a BR2_TOOLCHAIN_HAS_THREADS dependency.
* the 'depends on BR2_PACKAGE_MESA3D_GBM' is changed to 'depends on BR2_PACKAGE_HAS_LIBGBM', and the 'mesa3d' dependency is changed to 'libgbm'.
* the KMS/DRM video driver in SDL2 needs EGL (hence the additional 'depends on BR2_PACKAGE_HAS_LIBEGL' and the libegbl dependency is added in the .mk file). But in turn, EGL support is only checked when either OpenGL or OpenGLES support is enabled in SDL2, which is why we add logic to select the appropriate options.
--- package/sdl2/Config.in | 17 ++++++++++------- package/sdl2/sdl2.mk | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-)
package/sdl2/Config.in +10 -7
@@ -31,14 +31,17 @@ comment "X11 video driver needs X.org" config BR2_PACKAGE_SDL2_KMSDRM bool "KMS/DRM video driver" - depends on BR2_PACKAGE_LIBDRM - depends on BR2_PACKAGE_MESA3D_GBM + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_SDL2_OPENGL || BR2_PACKAGE_SDL2_OPENGLES + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBDRM -comment "KMS/DRM video driver needs libdrm" - depends on !BR2_PACKAGE_LIBDRM - -comment "KMS/DRM video driver needs mesa3d w/ GBM" - depends on !BR2_PACKAGE_MESA3D_GBM +comment "KMS/DRM video driver needs a GBM provider, OpenGL or OpenGLES support, toolchain w/threads" + depends on !BR2_PACKAGE_HAS_LIBGBM || \ + !(BR2_PACKAGE_SDL2_OPENGL || BR2_PACKAGE_SDL2_OPENGLES) || \ + BR2_PACKAGE_HAS_LIBEGL || \ + BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_SDL2_OPENGL bool "OpenGL (GLX)"
package/sdl2/sdl2.mk +1 -1
@@ -169,7 +169,7 @@ SDL2_CONF_OPTS += --disable-alsa endif ifeq ($(BR2_PACKAGE_SDL2_KMSDRM),y) -SDL2_DEPENDENCIES += libdrm mesa3d +SDL2_DEPENDENCIES += libdrm libgbm libegl SDL2_CONF_OPTS += --enable-video-kmsdrm else SDL2_CONF_OPTS += --disable-video-kmsdrm
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/3] package/sdl2: rework KMS/DRM video driver dependencies
Thomas, All,
On 2022-08-05 00:15 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 4 lines
The KMS/DRM video driver of SDL2 can currently only be enabled when mesa3d is the OpenGL provider, as the option has a dependency on
BR2_PACKAGE_MESA3D_GBM. Now that we have a libgbm virtual package andBR2_PACKAGE_HAS_LIBGBM, we can do better.
I think this is a feature change, so this does not fit master. However, it can't be applied to next either as it requires the previous tw patches.
Do, I've left this pending for later (either after we merge next back into master, or after we merge the next -rc into next).
Regards,
Yann E. MORIN.
Quoted 72 lines
However, this has uncovered a number of additional related issues that are resolved at the same time. Here are some details:
* the 'depends on
BR2_PACKAGE_LIBDRM' is changed to a select, as we normally do for library dependencies. Due to this, we inherit aBR2_TOOLCHAIN_HAS_THREADSdependency.* the 'depends on
BR2_PACKAGE_MESA3D_GBM' is changed to 'depends onBR2_PACKAGE_HAS_LIBGBM', and the 'mesa3d' dependency is changed to 'libgbm'.* the KMS/DRM video driver in SDL2 needs EGL (hence the additional 'depends on
BR2_PACKAGE_HAS_LIBEGL' and the libegbl dependency is added in the .mk file). But in turn, EGL support is only checked when either OpenGL or OpenGLES support is enabled in SDL2, which is why we add logic to select the appropriate options.Signed-off-by Thomas Petazzoni <[email protected]>--- package/sdl2/Config.in | 17 ++++++++++------- package/sdl2/sdl2.mk | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-)package/sdl2/Config.in +10
-7@@ -31,14 +31,17 @@ comment "X11 video driver needs X.org" config BR2_PACKAGE_SDL2_KMSDRM bool "KMS/DRM video driver" - depends on BR2_PACKAGE_LIBDRM - depends on BR2_PACKAGE_MESA3D_GBM + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_SDL2_OPENGL || BR2_PACKAGE_SDL2_OPENGLES + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBDRM -comment "KMS/DRM video driver needs libdrm" - depends on !BR2_PACKAGE_LIBDRM - -comment "KMS/DRM video driver needs mesa3d w/ GBM" - depends on !BR2_PACKAGE_MESA3D_GBM +comment "KMS/DRM video driver needs a GBM provider, OpenGL or OpenGLES support, toolchain w/threads" + depends on !BR2_PACKAGE_HAS_LIBGBM || \ + !(BR2_PACKAGE_SDL2_OPENGL || BR2_PACKAGE_SDL2_OPENGLES) || \ + BR2_PACKAGE_HAS_LIBEGL || \ + BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_SDL2_OPENGL bool "OpenGL (GLX)"package/sdl2/sdl2.mk +1
-1@@ -169,7 +169,7 @@ SDL2_CONF_OPTS += --disable-alsa endif ifeq ($(BR2_PACKAGE_SDL2_KMSDRM),y) -SDL2_DEPENDENCIES += libdrm mesa3d +SDL2_DEPENDENCIES += libdrm libgbm libegl SDL2_CONF_OPTS += --enable-video-kmsdrm else SDL2_CONF_OPTS += --disable-video-kmsdrmSignature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/3] package/sdl2: rework KMS/DRM video driver dependencies
In reply to Thomas Petazzoni via buildrootThomas, All,
On 2022-08-05 00:15 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 16 lines
The KMS/DRM video driver of SDL2 can currently only be enabled when mesa3d is the OpenGL provider, as the option has a dependency on
BR2_PACKAGE_MESA3D_GBM. Now that we have a libgbm virtual package andBR2_PACKAGE_HAS_LIBGBM, we can do better.However, this has uncovered a number of additional related issues that are resolved at the same time. Here are some details:
* the 'depends on
BR2_PACKAGE_LIBDRM' is changed to a select, as we normally do for library dependencies. Due to this, we inherit aBR2_TOOLCHAIN_HAS_THREADSdependency.* the 'depends on
BR2_PACKAGE_MESA3D_GBM' is changed to 'depends onBR2_PACKAGE_HAS_LIBGBM', and the 'mesa3d' dependency is changed to 'libgbm'.
Quoted 7 lines
* the KMS/DRM video driver in SDL2 needs EGL (hence the additional 'depends on
BR2_PACKAGE_HAS_LIBEGL' and the libegbl dependency is added in the .mk file). But in turn, EGL support is only checked when either OpenGL or OpenGLES support is enabled in SDL2, which is why we add logic to select the appropriate options.Signed-off-by Thomas Petazzoni <[email protected]>
I've forward-ported the tzo other patches to thhe next bracnh, fixed the dependencies of the comment, and applied to next, thanks.
Regards,
Yann E. MORIN.
Quoted 54 lines
--- package/sdl2/Config.in | 17 ++++++++++------- package/sdl2/sdl2.mk | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-)package/sdl2/Config.in +10
-7@@ -31,14 +31,17 @@ comment "X11 video driver needs X.org" config BR2_PACKAGE_SDL2_KMSDRM bool "KMS/DRM video driver" - depends on BR2_PACKAGE_LIBDRM - depends on BR2_PACKAGE_MESA3D_GBM + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_SDL2_OPENGL || BR2_PACKAGE_SDL2_OPENGLES + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBDRM -comment "KMS/DRM video driver needs libdrm" - depends on !BR2_PACKAGE_LIBDRM - -comment "KMS/DRM video driver needs mesa3d w/ GBM" - depends on !BR2_PACKAGE_MESA3D_GBM +comment "KMS/DRM video driver needs a GBM provider, OpenGL or OpenGLES support, toolchain w/threads" + depends on !BR2_PACKAGE_HAS_LIBGBM || \ + !(BR2_PACKAGE_SDL2_OPENGL || BR2_PACKAGE_SDL2_OPENGLES) || \ + BR2_PACKAGE_HAS_LIBEGL || \ + BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_SDL2_OPENGL bool "OpenGL (GLX)"package/sdl2/sdl2.mk +1
-1@@ -169,7 +169,7 @@ SDL2_CONF_OPTS += --disable-alsa endif ifeq ($(BR2_PACKAGE_SDL2_KMSDRM),y) -SDL2_DEPENDENCIES += libdrm mesa3d +SDL2_DEPENDENCIES += libdrm libgbm libegl SDL2_CONF_OPTS += --enable-video-kmsdrm else SDL2_CONF_OPTS += --disable-video-kmsdrmSignature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedThomas, All,
On 2022-08-05 00:15 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 4 lines
Add many more explicit --disable-<foo>, as we have for example seen video-vivante being autodetected when not needed.
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 41 lines
--- package/sdl2/sdl2.mk | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)package/sdl2/sdl2.mk +18
-1@@ -20,7 +20,24 @@ SDL2_CONF_OPTS += \ --disable-esd \ --disable-dbus \ --disable-pulseaudio \ - --disable-video-wayland + --disable-video-vivante \ + --disable-video-cocoa \ + --disable-video-metal \ + --disable-video-wayland \ + --disable-video-dummy \ + --disable-video-offscreen \ + --disable-video-vulkan \ + --disable-ime \ + --disable-ibus \ + --disable-fcitx \ + --disable-joystick-mfi \ + --disable-directx \ + --disable-xinput \ + --disable-wasapi \ + --disable-hidapi-joystick \ + --disable-hidapi-libusb \ + --disable-joystick-virtual \ + --disable-render-d3d # We are using autotools build system for sdl2, so the sdl2-config.cmake # include path are not resolved like for sdl2-config script.Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot