php7-pecl-http: fix build if libidn and libidn2 are both available
We now select libidn2 as dependency, but libidn -if available- is also linked against. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This commit is contained in:
parent
f8ec3965eb
commit
2da394c4f1
|
@ -9,7 +9,7 @@ PECL_NAME:=pecl_http
|
|||
PECL_LONGNAME:=Extended HTTP Support
|
||||
|
||||
PKG_VERSION:=3.1.0
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
PKG_HASH:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0
|
||||
|
||||
PKG_NAME:=php7-pecl-http
|
||||
|
@ -53,5 +53,5 @@ CONFIGURE_ARGS+= \
|
|||
--with-http-libevent-dir="$(STAGING_DIR)/usr" \
|
||||
--with-http-libidn-dir="$(STAGING_DIR)/usr"
|
||||
|
||||
$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +libidn +php7-mod-hash +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30))
|
||||
$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +PACKAGE_libidn:libidn +libidn2 +php7-mod-hash +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
From 8158548a80733b3af9539356b47527d960a13287 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Wallner <mike@php.net>
|
||||
Date: Thu, 1 Feb 2018 14:36:09 +0100
|
||||
Subject: [PATCH] fix #73
|
||||
|
||||
include idna.h prior idn2.h to ensure INDA_H is defined and libidn2 does
|
||||
not try to define the idna compat layer
|
||||
---
|
||||
src/php_http.c | 6 +++---
|
||||
src/php_http_url.c | 6 +++---
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/php_http.c b/src/php_http.c
|
||||
index 207c248..bc9166a 100644
|
||||
--- a/src/php_http.c
|
||||
+++ b/src/php_http.c
|
||||
@@ -31,12 +31,12 @@
|
||||
#if PHP_HTTP_HAVE_LIBICU
|
||||
# include <unicode/uversion.h>
|
||||
#endif
|
||||
-#if PHP_HTTP_HAVE_LIBIDN2
|
||||
-# include <idn2.h>
|
||||
-#endif
|
||||
#if PHP_HTTP_HAVE_LIBIDN
|
||||
# include <idna.h>
|
||||
#endif
|
||||
+#if PHP_HTTP_HAVE_LIBIDN2
|
||||
+# include <idn2.h>
|
||||
+#endif
|
||||
#if PHP_HTTP_HAVE_LIBIDNKIT2 || PHP_HTTP_HAVE_LIBIDNKIT
|
||||
#include "idn/version.h"
|
||||
#endif
|
||||
diff --git a/src/php_http_url.c b/src/php_http_url.c
|
||||
index 029e6a8..361e61c 100644
|
||||
--- a/src/php_http_url.c
|
||||
+++ b/src/php_http_url.c
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
#include "php_http_api.h"
|
||||
|
||||
-#if PHP_HTTP_HAVE_LIBIDN2
|
||||
-# include <idn2.h>
|
||||
-#endif
|
||||
#if PHP_HTTP_HAVE_LIBIDN
|
||||
# include <idna.h>
|
||||
#endif
|
||||
+#if PHP_HTTP_HAVE_LIBIDN2
|
||||
+# include <idn2.h>
|
||||
+#endif
|
||||
#if PHP_HTTP_HAVE_LIBICU
|
||||
# include <unicode/uidna.h>
|
||||
#endif
|
||||
--
|
||||
2.7.4
|
||||
|
Loading…
Reference in New Issue