lighttpd: build fixes
authorGlenn Strauss <redacted>
Sun, 30 Apr 2023 08:11:01 +0000 (04:11 -0400)
committerRosen Penev <redacted>
Mon, 1 May 2023 10:31:17 +0000 (13:31 +0300)
Signed-off-by: Glenn Strauss <redacted>
net/lighttpd/Makefile
net/lighttpd/patches/030-meson-check-FORCE_._CRYPTO.patch [new file with mode: 0644]
net/lighttpd/patches/031-mod_mbedtls-check-MBEDTLS_DEBUG_C.patch [new file with mode: 0644]
net/lighttpd/patches/032-meson-build-fix-for-builtin_mods.patch [new file with mode: 0644]

index ad0afd82f8492d6f78b2991808a2c8f1c81497dd..a627c88ca6dd8a34aec6c1517ea966fcd2f1eb1d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
 PKG_VERSION:=1.4.69
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 # release candidate ~rcX testing; remove for release
 #PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
diff --git a/net/lighttpd/patches/030-meson-check-FORCE_._CRYPTO.patch b/net/lighttpd/patches/030-meson-check-FORCE_._CRYPTO.patch
new file mode 100644 (file)
index 0000000..6db2895
--- /dev/null
@@ -0,0 +1,34 @@
+From e91ad65e4aacde815679c06cb687931dd7beb9b3 Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss@gluelogic.com>
+Date: Thu, 20 Apr 2023 21:27:36 -0400
+Subject: [PATCH] [meson] check FORCE_{WOLFSSL,MBEDTLS}_CRYPTO
+
+---
+ src/meson.build | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -358,15 +358,19 @@ if get_option('with_mbedtls')
+       libmbedtls = [ compiler.find_library('mbedtls') ]
+       libmbedx509 = [ compiler.find_library('mbedx509') ]
+       libmbedcrypto = [ compiler.find_library('mbedcrypto') ]
+-      libcrypto = [ compiler.find_library('mbedcrypto') ]
++      if compiler.get_define('FORCE_WOLFSSL_CRYPTO') == ''
++        libcrypto = [ compiler.find_library('mbedcrypto') ]
++      endif
+       conf_data.set('HAVE_LIBMBEDCRYPTO', true)
+ endif
+ if get_option('with_nettle')
+       # manual search:
+       # header: nettle/nettle-types.h
+       # function: nettle_md5_init (-lnettle)
+-      libcrypto = [ dependency('nettle') ]
+-      conf_data.set('HAVE_NETTLE_NETTLE_TYPES_H', true)
++      if compiler.get_define('FORCE_WOLFSSL_CRYPTO') == '' and compiler.get_define('FORCE_MBEDTLS_CRYPTO') == ''
++        libcrypto = [ dependency('nettle') ]
++        conf_data.set('HAVE_NETTLE_NETTLE_TYPES_H', true)
++      endif
+ endif
+ if get_option('with_gnutls')
+       # manual search:
diff --git a/net/lighttpd/patches/031-mod_mbedtls-check-MBEDTLS_DEBUG_C.patch b/net/lighttpd/patches/031-mod_mbedtls-check-MBEDTLS_DEBUG_C.patch
new file mode 100644 (file)
index 0000000..d50b2e9
--- /dev/null
@@ -0,0 +1,23 @@
+From 37cbdacda78f9df4aba4c39e60472025d93bb7ba Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss@gluelogic.com>
+Date: Fri, 28 Apr 2023 03:17:16 -0400
+Subject: [PATCH] [mod_mbedtls] check MBEDTLS_DEBUG_C for debug func
+
+---
+ src/mod_mbedtls.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/mod_mbedtls.c
++++ b/src/mod_mbedtls.c
+@@ -2357,9 +2357,11 @@ CONNECTION_FUNC(mod_mbedtls_handle_con_a
+      * overlap, and so this debug setting is not reset upon connection close.
+      * Once enabled, debug hook will remain so for this mbedtls_ssl_config */
+     if (hctx->conf.ssl_log_noise) {/* volume level for debug message callback */
++      #ifdef MBEDTLS_DEBUG_C
+       #if MBEDTLS_VERSION_NUMBER >= 0x02000000 /* mbedtls 2.0.0 */
+         mbedtls_debug_set_threshold(hctx->conf.ssl_log_noise);
+       #endif
++      #endif
+         mbedtls_ssl_conf_dbg(hctx->ssl_ctx, mod_mbedtls_debug_cb,
+                              (void *)(intptr_t)hctx->conf.ssl_log_noise);
+     }
diff --git a/net/lighttpd/patches/032-meson-build-fix-for-builtin_mods.patch b/net/lighttpd/patches/032-meson-build-fix-for-builtin_mods.patch
new file mode 100644 (file)
index 0000000..2375f8a
--- /dev/null
@@ -0,0 +1,20 @@
+From 2fc157f37ea4644ba9ac776de1926b9e518ec42b Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss@gluelogic.com>
+Date: Sat, 29 Apr 2023 00:43:55 -0400
+Subject: [PATCH] [meson] build fix for builtin_mods
+
+---
+ src/meson.build | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -656,7 +656,7 @@ executable('lighttpd-angel',
+ )
+ executable('lighttpd', configparser,
+-      sources: common_src + main_src,
++      sources: common_src + main_src + builtin_mods,
+       dependencies: [ common_flags, lighttpd_flags
+               , libattr
+               , libcrypto
git clone https://git.99rst.org/PROJECT