diff --git a/package/libwebsock/0002-fix-ssl.patch b/package/libwebsock/0002-fix-ssl.patch new file mode 100644 index 000000000..51b9b3682 --- /dev/null +++ b/package/libwebsock/0002-fix-ssl.patch @@ -0,0 +1,26 @@ +config: fix SSL detection + +The @WEBSOCK_HAVE_SSL@ is not replaced at configure time, and even if +it was, it would be replaced by an empty string if openssl is disabled, +thus still defining WEBSOCK_HAVE_SSL when we would not want it. + +Instead, rely on config.h, which is properly generated by ./configure, +to provide the information about whether openssl is enabled or not. + +Signed-off-by: "Yann E. MORIN" + +diff -durN a/src/websock_config.h.in b/src/websock_config.h.in +--- a/src/websock_config.h.in ++++ b/src/websock_config.h.in +@@ -1,9 +1,10 @@ + #ifndef WEBSOCK_CONFIG_H + #define WEBSOCK_CONFIG_H 1 + ++#include "config.h" ++ + #define WEBSOCK_PACKAGE_STRING @WEBSOCK_PACKAGE_STRING@ + #define WEBSOCK_PACKAGE_VERSION @WEBSOCK_PACKAGE_VERSION@ + #define WEBSOCK_PACKAGE_NAME @WEBSOCK_PACKAGE_NAME@ +-#define WEBSOCK_HAVE_SSL @WEBSOCK_HAVE_SSL@ + + #endif diff --git a/package/libwebsock/libwebsock.mk b/package/libwebsock/libwebsock.mk index 845888306..b52293b21 100644 --- a/package/libwebsock/libwebsock.mk +++ b/package/libwebsock/libwebsock.mk @@ -12,4 +12,11 @@ LIBWEBSOCK_INSTALL_STAGING = YES LIBWEBSOCK_LICENSE = LGPLv3 LIBWEBSOCK_LICENSE_FILES = COPYING.lesser +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBWEBSOCK_DEPENDENCIES += openssl +LIBWEBSOCK_CONF_OPTS += --with-ssl +else +LIBWEBSOCK_CONF_OPTS += --without-ssl +endif + $(eval $(autotools-package))