package/x11r7/xwayland: add nettle and libmd as SHA1 providers

Xwayland can use either nettle or libmd for SHA1 support. When one of
these libraries is selected, use it as the SHA1 provider.

Also reorder the preferred SHA1 libraries to match the order used by
meson [1].

[1]: https://gitlab.freedesktop.org/xorg/xserver/-/blob/xwayland-24.1.9/meson.build?ref_type=tags#L235-239

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
[Julien: fix package path in commit title]
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Raphael Pavlidis
2025-12-13 17:52:00 +00:00
committed by Julien Olivain
parent 14f279184e
commit bbbc6c9d9e
2 changed files with 16 additions and 9 deletions

View File

@@ -3,12 +3,12 @@ config BR2_PACKAGE_XWAYLAND
depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS # wayland
depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
# We need a SHA1 implementation. If either openssl or
# libgcrypt are already part of the build, we'll use one of
# them, otherwise, use the small libsha1 library.
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # xlib_libxshmfence
select BR2_PACKAGE_LIBDRM
select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT)
# We need a SHA1 implementation. If either openssl, libgcrypt, nettle or
# libsha1 are already part of the build, we'll use one of them,
# otherwise, use the small libmd library.
select BR2_PACKAGE_LIBMD if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT && !BR2_PACKAGE_NETTLE && !BR2_PACKAGE_LIBSHA1)
select BR2_PACKAGE_PIXMAN
select BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_WAYLAND_PROTOCOLS

View File

@@ -69,15 +69,22 @@ else
XWAYLAND_CONF_OPTS += -Dxselinux=false
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
XWAYLAND_CONF_OPTS += -Dsha1=libcrypto
XWAYLAND_DEPENDENCIES += openssl
# The order of the preferred SHA1 libraries should match used by meson.build.
ifeq ($(BR2_PACKAGE_LIBMD),y)
XWAYLAND_CONF_OPTS += -Dsha1=libmd
XWAYLAND_DEPENDENCIES += libmd
else ifeq ($(BR2_PACKAGE_LIBSHA1),y)
XWAYLAND_CONF_OPTS += -Dsha1=libsha1
XWAYLAND_DEPENDENCIES += libsha1
else ifeq ($(BR2_PACKAGE_NETTLE),y)
XWAYLAND_CONF_OPTS += -Dsha1=libnettle
XWAYLAND_DEPENDENCIES += nettle
else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
XWAYLAND_CONF_OPTS += -Dsha1=libgcrypt
XWAYLAND_DEPENDENCIES += libgcrypt
else
XWAYLAND_CONF_OPTS += -Dsha1=libsha1
XWAYLAND_DEPENDENCIES += libsha1
XWAYLAND_CONF_OPTS += -Dsha1=libcrypto
XWAYLAND_DEPENDENCIES += openssl
endif
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)