From 2da394c4f1f4cea37f24cb34ef648d33f4184f31 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Wed, 18 Apr 2018 22:29:19 +0200 Subject: [PATCH] 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 --- lang/php7-pecl-http/Makefile | 4 +- lang/php7-pecl-http/patches/300-fix-73.patch | 55 ++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 lang/php7-pecl-http/patches/300-fix-73.patch diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile index 15d47a891c..17eb4a947d 100644 --- a/lang/php7-pecl-http/Makefile +++ b/lang/php7-pecl-http/Makefile @@ -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))) diff --git a/lang/php7-pecl-http/patches/300-fix-73.patch b/lang/php7-pecl-http/patches/300-fix-73.patch new file mode 100644 index 0000000000..1779223dc1 --- /dev/null +++ b/lang/php7-pecl-http/patches/300-fix-73.patch @@ -0,0 +1,55 @@ +From 8158548a80733b3af9539356b47527d960a13287 Mon Sep 17 00:00:00 2001 +From: Michael Wallner +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 + #endif +-#if PHP_HTTP_HAVE_LIBIDN2 +-# include +-#endif + #if PHP_HTTP_HAVE_LIBIDN + # include + #endif ++#if PHP_HTTP_HAVE_LIBIDN2 ++# include ++#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 +-#endif + #if PHP_HTTP_HAVE_LIBIDN + # include + #endif ++#if PHP_HTTP_HAVE_LIBIDN2 ++# include ++#endif + #if PHP_HTTP_HAVE_LIBICU + # include + #endif +-- +2.7.4 +