+++ /dev/null
-From 5d281572d0afbf69d934737e1ee4c553670a46cc 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 4/5] auto/lib/libxslt/conf: allow to override ngx_feature_path
- and ngx_feature_libs
-
-Because libxml2 headers are not in /usr/include by default, hardcoding the
-include directory to /usr/include/libxml2 does not play well when
-cross-compiling, or if libxml2 has been installed somewhere else.
-
-This patch allows to define/override the libxslt include directory, and
-the libxslt libs flags.
-
-Being able to override the include location is especially useful when
-cross-compiling to prevent gcc from complaining about unsafe include
-location for cross-compilation (-Wpoision-system-directories).
-
-So far, this warning is only triggered by libxslt.
-
-Signed-off-by: Samuel Martin <s.martin49@gmail.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 bc19d83..386f1a0 100644
---- a/auto/lib/libxslt/conf
-+++ b/auto/lib/libxslt/conf
-@@ -12,8 +12,8 @@
- #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="${ngx_feature_path_libxslt:=/usr/include/libxml2}"
-+ ngx_feature_libs="${ngx_feature_libs_libxslt:=-lxml2 -lxslt}"
- ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
- xsltStylesheetPtr sheet = NULL;
- xmlDocPtr doc;
---
-1.9.2
-
--- /dev/null
+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 4/8] 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,8 @@
+ #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 's/-I//g')"
++ ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs libxslt)"
+ ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
+ xsltStylesheetPtr sheet = NULL;
+ xmlDocPtr doc;
+--
+2.8.2
+
NGINX_SITE = http://nginx.org/download
NGINX_LICENSE = BSD-2c
NGINX_LICENSE_FILES = LICENSE
+NGINX_DEPENDENCIES = host-pkgconf
NGINX_CONF_OPTS = \
--crossbuild=Linux::$(BR2_ARCH) \
ifeq ($(BR2_PACKAGE_NGINX_HTTP_XSLT_MODULE),y)
NGINX_DEPENDENCIES += libxml2 libxslt
NGINX_CONF_OPTS += --with-http_xslt_module
-NGINX_CONF_ENV += \
- ngx_feature_path_libxslt=$(STAGING_DIR)/usr/include/libxml2
endif
ifeq ($(BR2_PACKAGE_NGINX_HTTP_IMAGE_FILTER_MODULE),y)
NGINX_PRE_CONFIGURE_HOOKS += NGINX_DISABLE_WERROR
define NGINX_CONFIGURE_CMDS
- cd $(@D) ; $(NGINX_CONF_ENV) ./configure $(NGINX_CONF_OPTS)
+ cd $(@D) ; $(NGINX_CONF_ENV) \
+ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+ ./configure $(NGINX_CONF_OPTS)
endef
define NGINX_BUILD_CMDS