From 1c110d79560213b9245696059eafcc43f13ae147 Mon Sep 17 00:00:00 2001 From: Ignacy Gawędzki Date: Tue, 19 Dec 2017 11:10:24 +0100 Subject: nginx: fix patch using pkg-config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The regular expression that drops the -I flag from the output of pkg-config --cflags-only-I doesn't work properly as it is too naive: it breaks a path if it contains -I: $ echo "-I/usr/Some-Install-Location/include" | sed 's/-I//g' /usr/Somenstall-Location/include $ echo "-I/usr/Some-Install-Location/include" | sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g' /usr/Some-Install-Location/include Signed-off-by: Ignacy Gawędzki [Thomas: improved commit log.] Signed-off-by: Thomas Petazzoni --- package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch') diff --git a/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch b/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch index b315909c34..103f90b305 100644 --- a/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch +++ b/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch @@ -15,13 +15,14 @@ diff --git a/auto/lib/libxslt/conf b/auto/lib/libxslt/conf index 3a0f37b..3c2a60e 100644 --- a/auto/lib/libxslt/conf +++ b/auto/lib/libxslt/conf -@@ -12,8 +12,8 @@ +@@ -12,8 +12,9 @@ #include #include #include " - ngx_feature_path="/usr/include/libxml2" - ngx_feature_libs="-lxml2 -lxslt" -+ ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I libxslt|sed 's/-I//g')" ++ ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I libxslt| ++ sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g')" + ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs libxslt)" ngx_feature_test="xmlParserCtxtPtr ctxt = NULL; xsltStylesheetPtr sheet = NULL; -- cgit v1.2.3