kumquat-buildroot/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch
Ignacy Gawędzki 1c110d7956 nginx: fix patch using pkg-config
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 <ignacy.gawedzki@green-communications.fr>
[Thomas: improved commit log.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-12-29 23:32:31 +01:00

33 lines
1.2 KiB
Diff

From 211b9f19a3a62826fadef55d2f89d6f66fbf4aa6 Mon Sep 17 00:00:00 2001
From: Samuel Martin <s.martin49@gmail.com>
Date: Thu, 29 May 2014 19:22:27 +0200
Subject: [PATCH] auto/lib/libxslt/conf: use pkg-config
Change to using pkg-config to find the path to libxslt and its
dependencies.
Signed-off-by: Martin Bark <martin@barkynet.com>
---
auto/lib/libxslt/conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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,9 @@
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>"
- ngx_feature_path="/usr/include/libxml2"
- ngx_feature_libs="-lxml2 -lxslt"
+ 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;
xmlDocPtr doc;
--
2.8.2