diff --git a/package/x11r7/xwayland/Config.in b/package/x11r7/xwayland/Config.in index 311dae25ec..3df8677545 100644 --- a/package/x11r7/xwayland/Config.in +++ b/package/x11r7/xwayland/Config.in @@ -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 diff --git a/package/x11r7/xwayland/xwayland.mk b/package/x11r7/xwayland/xwayland.mk index 59d607fb5b..98bc74200a 100644 --- a/package/x11r7/xwayland/xwayland.mk +++ b/package/x11r7/xwayland/xwayland.mk @@ -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)