From 333957fba91346093b8d622b2a3611bdf60a4367 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Fri, 23 Dec 2016 22:57:28 +0100 Subject: [PATCH] php7-pecl-http: fix build for big endian (fixes #3691) While at, improve pre-seeded dependency detection. Signed-off-by: Michael Heimpold --- lang/php7-pecl-http/Makefile | 4 ++-- .../patches/100_php_http_etag_bigendian_check.patch | 11 +++++++++++ lang/php7/pecl.mk | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile index df9056dfd4..6db8a78c91 100644 --- a/lang/php7-pecl-http/Makefile +++ b/lang/php7-pecl-http/Makefile @@ -32,8 +32,8 @@ include $(INCLUDE_DIR)/nls.mk include ../php7/pecl.mk CONFIGURE_VARS+= \ - PHP_PROPRO=yes \ - PHP_RAPHF=yes \ + PECL_cv_HAVE_EXT_propro=yes \ + PECL_cv_HAVE_EXT_raphf=yes \ PECL_cv_HAVE_LIBCURL_ARES=no \ PECL_cv_HAVE_LIBCURL_OpenSSL=$(if $(CONFIG_LIBCURL_OPENSSL),yes,no) \ PECL_cv_HAVE_LIBCURL_GnuTLS=$(if $(CONFIG_LIBCURL_GNUTLS),yes,no) \ diff --git a/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch new file mode 100644 index 0000000000..ee925c454e --- /dev/null +++ b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch @@ -0,0 +1,11 @@ +--- a/src/php_http_etag.c 2016-12-12 10:04:21.000000000 +0100 ++++ b/src/php_http_etag.c 2016-12-23 21:10:59.523222367 +0100 +@@ -60,7 +60,7 @@ + unsigned char buf[4]; + + *((uint *) e->ctx) = ~*((uint *) e->ctx); +-#if WORDS_BIGENDIAN ++#ifdef WORDS_BIGENDIAN + etag = php_http_etag_digest((unsigned char *) e->ctx, 4); + #else + buf[0] = ((unsigned char *) e->ctx)[3]; diff --git a/lang/php7/pecl.mk b/lang/php7/pecl.mk index 7b7c2442b7..caafc66c33 100644 --- a/lang/php7/pecl.mk +++ b/lang/php7/pecl.mk @@ -16,6 +16,9 @@ define Build/Prepare ( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 ) endef +CONFIGURE_VARS+= \ + ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) + CONFIGURE_ARGS+= \ --with-php-config=$(STAGING_DIR)/usr/bin/php7-config