Closed TerryGeng closed 1 year ago
Can you try this patch?
diff --git a/nginx-mainline-mod-lua/PKGBUILD b/nginx-mainline-mod-lua/PKGBUILD
index 9152885..0327488 100644
--- a/nginx-mainline-mod-lua/PKGBUILD
+++ b/nginx-mainline-mod-lua/PKGBUILD
@@ -36,9 +36,9 @@ build() {
export LUAJIT_LIB=$(pkg-config luajit --variable=libdir)
nginx -V 2>&1 |
grep -o -- '--prefix=.*$' |
- xargs printf '%s\n' |
- sed '/^--with-ld-opt=/{s/-Wl,/\0-E,/;s/-Wl,/-lpcre \0/}' |
- xargs /usr/src/nginx/configure \
+ xargs printf '%s\0' |
+ sed -z '/^--with-ld-opt=/{s/-Wl,/\0-E,/;s/-Wl,/-lpcre \0/}' |
+ xargs -0 /usr/src/nginx/configure \
--add-dynamic-module=../$_modname-nginx-module-$pkgver
make modules
}
Yes, it works!
The regex in https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nginx-mainline-mod-http-xslt-filter also works:
sed -nE 's/^configure arguments: ([^\n]*)$/\1/p' |
sed -nE 's/([^'"'"' \t\n]+('"'"'([^'"'"'\]|\\'"'"'?)*'"'"'|"([^"\\]|\\"?)*")?) ?/\1\n/gp')
My
nginx -V
outputsApparently, the quote marks in
--with-cc-opt
get stripped when going through theprintf
line in https://github.com/ahmubashshir/pkgbuilds/blob/7b6b4e024ca1a04825e5ce7e023d9a9ac4d23c0c/nginx-mainline-mod-lua/PKGBUILD#L37-L42 and confused nginx/configure.A quick workaround is to change this block to