From f7aa9aa70832ec51b0a4fc7e80de2b4d1d4e9240 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 16 Aug 2024 03:40:54 +0200 Subject: [PATCH] package/nginx: fix static build error In commit 761259c93400bc806611a242c7dc3df7ff67c231 the SSL patch was removed, without testing any static compilation. Reintroduce a small version of the original patch. Upstream does not use pkg-config, so the patch is Buildroot specific and not suitable for upstreaming. Fixes: - http://autobuild.buildroot.net/results/a85/a85b00dfe9b55607390ebacc0e4e55c7cfbace3a Signed-off-by: Waldemar Brodkorb Signed-off-by: Arnout Vandecappelle (cherry picked from commit 6cda3504086e4c4b6acd24212e4d568684442243) Signed-off-by: Peter Korsgaard --- ...auto-lib-openssl-conf-use-pkg-config.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch diff --git a/package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch b/package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch new file mode 100644 index 0000000000..05fb48b76e --- /dev/null +++ b/package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch @@ -0,0 +1,34 @@ +From 232ac61984720401b0c3854da1644ec20ed218e0 Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Thu, 15 Aug 2024 19:47:23 +0200 +Subject: [PATCH] auto/lib/openssl/conf: use pkg-config + +Change to using pkg-config to find the path to openssl and its +dependencies. + +Signed-off-by: Martin Bark +Signed-off-by: Waldemar Brodkorb +Upstream: not suitable +--- + auto/lib/openssl/conf | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf +index fdf430dff..c9fe4c8bf 100644 +--- a/auto/lib/openssl/conf ++++ b/auto/lib/openssl/conf +@@ -63,8 +63,9 @@ else + ngx_feature_name="NGX_OPENSSL" + ngx_feature_run=no + ngx_feature_incs="#include " +- ngx_feature_path= +- ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD" ++ ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I openssl| ++ sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g')" ++ ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs openssl)" + ngx_feature_test="SSL_CTX_set_options(NULL, 0)" + . auto/feature + +-- +2.39.2 +