From 5be3377ed422f4584fd33969a5bfb5ecc4a24da0 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Wed, 31 Aug 2016 23:41:06 +0200 Subject: [PATCH] php7-pecl-http: add new package Quote: This PHP HTTP extension aims to provide a convenient and powerful set of functionality for one of PHPs major applications: it eases handling of HTTP urls, headers and messages, provides means for negotiation of a client's preferred content type, language and charset, as well as a convenient way to send any arbitrary data with caching and resuming capabilities. It provides powerful request functionality with support for parallel requests. Signed-off-by: Michael Heimpold --- lang/php7-pecl-http/Makefile | 49 +++++++++++++++++++ .../patches/001_pecl_mod_include_dir.patch | 31 ++++++++++++ .../patches/002_php_http_api.patch | 13 +++++ 3 files changed, 93 insertions(+) create mode 100644 lang/php7-pecl-http/Makefile create mode 100644 lang/php7-pecl-http/patches/001_pecl_mod_include_dir.patch create mode 100644 lang/php7-pecl-http/patches/002_php_http_api.patch diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile new file mode 100644 index 0000000000..4b39a5c762 --- /dev/null +++ b/lang/php7-pecl-http/Makefile @@ -0,0 +1,49 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PECL_NAME:=pecl_http +PECL_LONGNAME:=Extended HTTP Support + +PKG_VERSION:=3.0.1 +PKG_RELEASE:=1 +PKG_MD5SUM:=042c97314c180f6473338f0c5d35fabd + +PKG_NAME:=php7-pecl-http +PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://pecl.php.net/get/ + +PKG_MAINTAINER:=Michael Heimpold + +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_BUILD_DEPENDS:=php7 php7-pecl-propro php7-pecl-raphf +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PECL_NAME)-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk +include ../php7/pecl.mk + +CONFIGURE_VARS+= \ + PHP_PROPRO=yes \ + PHP_RAPHF=yes \ + +CONFIGURE_ARGS+= \ + --with-http \ + --without-http-shared-deps \ + --with-http-libcurl-dir="$(STAGING_DIR)/usr" \ + --with-http-libevent-dir="$(STAGING_DIR)/usr" \ + --with-http-libidn-dir="$(STAGING_DIR)/usr" \ + --with-http-pecl-propro-dir="$(shell echo $(BUILD_DIR)/propro-*)" \ + --with-http-pecl-raphf-dir="$(shell echo $(BUILD_DIR)/raphf-*)" \ + + +$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+libcurl +librt +libevent2 +libidn +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/001_pecl_mod_include_dir.patch b/lang/php7-pecl-http/patches/001_pecl_mod_include_dir.patch new file mode 100644 index 0000000000..4a6cb4076e --- /dev/null +++ b/lang/php7-pecl-http/patches/001_pecl_mod_include_dir.patch @@ -0,0 +1,31 @@ +--- a/config9.m4 2016-03-09 11:04:06.000000000 +0100 ++++ b/config9.m4 2016-08-31 21:55:40.297712442 +0200 +@@ -12,6 +12,10 @@ + [ --with-http-libevent-dir[=DIR] HTTP: where to find libevent], $PHP_HTTP_LIBCURL_DIR, "") + PHP_ARG_WITH([http-libidn-dir], [], + [ --with-http-libidn-dir[=DIR] HTTP: where to find libidn], $PHP_HTTP_LIBCURL_DIR, "") ++PHP_ARG_WITH([http-pecl-propro-dir], [], ++[ --with-http-pecl-propro-dir[=DIR] HTTP: where to find pecl propro], $PHP_HTTP_PECL_PROPRO_DIR, "") ++PHP_ARG_WITH([http-pecl-raphf-dir], [], ++[ --with-http-pecl-raphf-dir[=DIR] HTTP: where to find pecl raphf], $PHP_HTTP_PECL_RAPHF_DIR, "") + + if test "$PHP_HTTP" != "no"; then + +@@ -486,7 +490,7 @@ + HTTP_HAVE_PHP_EXT([raphf], [ + AC_MSG_CHECKING([for php_raphf.h]) + HTTP_EXT_RAPHF_INCDIR= +- for i in `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../raphf; do ++ for i in "$PHP_HTTP_PECL_RAPHF_DIR" `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../raphf; do + if test -d $i; then + if test -f $i/php_raphf.h; then + HTTP_EXT_RAPHF_INCDIR=$i +@@ -514,7 +518,7 @@ + HTTP_HAVE_PHP_EXT([propro], [ + AC_MSG_CHECKING([for php_propro.h]) + HTTP_EXT_PROPRO_INCDIR= +- for i in `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../propro; do ++ for i in "$PHP_HTTP_PECL_PROPRO_DIR" `echo $INCLUDES | $SED -e's/-I//g'` $abs_srcdir ../propro; do + if test -d $i; then + if test -f $i/php_propro.h; then + HTTP_EXT_PROPRO_INCDIR=$i diff --git a/lang/php7-pecl-http/patches/002_php_http_api.patch b/lang/php7-pecl-http/patches/002_php_http_api.patch new file mode 100644 index 0000000000..efd93803dd --- /dev/null +++ b/lang/php7-pecl-http/patches/002_php_http_api.patch @@ -0,0 +1,13 @@ +--- a/src/php_http_api.h 2016-03-09 11:04:06.000000000 +0100 ++++ b/src/php_http_api.h 2016-08-31 22:20:07.978505983 +0200 +@@ -23,8 +23,8 @@ + #include + #include + +-#include +-#include ++#include ++#include + #include + #include + #include -- 2.30.2