[Buildroot] [PATCH] package/kodi: fix selection of dependencies

Yann E. MORIN yann.morin.1998 at free.fr
Fri Sep 17 21:28:44 UTC 2021


All,

On 2021-09-11 10:20 +0200, Yann E. MORIN spake thusly:
> Commit 148e695e3756 (package/kodi: bump version to 19.0-Matrix) extended
> the set of required libraries for various "platform" backends, by
> selecting those libraries from the blind options. For example, we have:
> 
>     config BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM
>         bool
>         default y
>         depends on [...]
>         select BR2_PACKAGE_LIBINPUT
>         [...]
> 
> However, that option is true as soon as the requirements are met (the
> depends on), even when Kodi itself is not enabled.
> 
> This means that extra libraries are pulled in to the build, even when
> not required.
> 
> We fix that by moving the actual selects to the main symbol, along with
> the proper conditions. This means that we have two lines that select
> libxbcommon, under two different conditions; we could make that a single
> select, but the codition would need to be on two lines anyway, so meh...
> 
> This is not an ideal solution, because it is a bit ugly, but:
>  1) adding three new blind options just for the select is kinda extreme
>     and superfluous;
>  2) our Kodi packaging is already a bit ugly anyway.
> 
> Fixes: #14206
> 
> Reported-by: Thomas Ruschival <t.ruschival at gmail.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
> Cc: Bernd Kuhls <bernd.kuhls at t-online.de>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/kodi/Config.in | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/package/kodi/Config.in b/package/kodi/Config.in
> index 074a457d1b..af7604428e 100644
> --- a/package/kodi/Config.in
> +++ b/package/kodi/Config.in
> @@ -25,8 +25,6 @@ config BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM
>  	depends on BR2_PACKAGE_MESA3D_GBM
>  	depends on BR2_PACKAGE_HAS_UDEV # libinput
>  	select BR2_PACKAGE_KODI_PLATFORM_SUPPORTS
> -	select BR2_PACKAGE_LIBINPUT
> -	select BR2_PACKAGE_LIBXKBCOMMON
>  
>  config BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_WAYLAND
>  	bool
> @@ -38,8 +36,6 @@ config BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_WAYLAND
>  	depends on BR2_INSTALL_LIBSTDCPP # waylandpp
>  	depends on BR2_PACKAGE_WAYLAND # waylandpp
>  	select BR2_PACKAGE_KODI_PLATFORM_SUPPORTS
> -	select BR2_PACKAGE_LIBXKBCOMMON
> -	select BR2_PACKAGE_WAYLANDPP
>  
>  config BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_X11
>  	bool
> @@ -47,7 +43,6 @@ config BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_X11
>  	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES
>  	depends on BR2_PACKAGE_XORG7
>  	select BR2_PACKAGE_KODI_PLATFORM_SUPPORTS
> -	select BR2_PACKAGE_XLIB_LIBXRANDR
>  
>  comment "kodi needs an OpenGL EGL backend with OpenGL or GLES support"
>  	depends on !BR2_PACKAGE_KODI_PLATFORM_SUPPORTS
> @@ -102,6 +97,11 @@ menuconfig BR2_PACKAGE_KODI
>  	select BR2_PACKAGE_TINYXML
>  	select BR2_PACKAGE_ZLIB
>  	select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC # runtime UTF conversion support
> +	select BR2_PACKAGE_LIBINPUT if BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM
> +	select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM
> +	select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_WAYLAND
> +	select BR2_PACKAGE_WAYLANDPP if BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_WAYLAND
> +	select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_X11
>  	help
>  	  Kodi is an award-winning free and open source (GPL) software
>  	  media player and entertainment hub for digital media.
> -- 
> 2.25.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list