From c6fc3750bdef45a30dbb9ab69ff992d5022b422d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 25 Sep 2014 10:32:38 +0200 Subject: php-pecl-http: 2.1.2 (stable) --- REFLECTION | 5 +++-- pecl_http-upstream.patch | 34 ++++++++++++++++++++++++++++++++++ php-pecl-http.spec | 9 ++++++++- 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 pecl_http-upstream.patch diff --git a/REFLECTION b/REFLECTION index 4536d7d..7803a58 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #168 http version 2.1.1 ] { +Extension [ extension #167 http version 2.1.2 ] { - Dependencies { Dependency [ raphf (Required) ] @@ -15,7 +15,7 @@ Extension [ extension #168 http version 2.1.1 ] { } } - - Constants [25] { + - Constants [26] { Constant [ integer http\Client\Curl\HTTP_VERSION_1_0 ] { 1 } Constant [ integer http\Client\Curl\HTTP_VERSION_1_1 ] { 2 } Constant [ integer http\Client\Curl\HTTP_VERSION_ANY ] { 0 } @@ -40,6 +40,7 @@ Extension [ extension #168 http version 2.1.1 ] { Constant [ integer http\Client\Curl\PROXY_HTTP_1_0 ] { 1 } Constant [ integer http\Client\Curl\POSTREDIR_301 ] { 1 } Constant [ integer http\Client\Curl\POSTREDIR_302 ] { 2 } + Constant [ integer http\Client\Curl\POSTREDIR_303 ] { 4 } Constant [ integer http\Client\Curl\POSTREDIR_ALL ] { 7 } } diff --git a/pecl_http-upstream.patch b/pecl_http-upstream.patch new file mode 100644 index 0000000..505f524 --- /dev/null +++ b/pecl_http-upstream.patch @@ -0,0 +1,34 @@ +From 62030d589336fc052eab8cf4503ef1968f5d9ac8 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 25 Sep 2014 10:16:51 +0200 +Subject: [PATCH] Fix build with curl < 7.26 + +$ grep "define CURL_REDIR_POST_30" curl-7.2*/include/curl/curl.h + +curl-7.25.0/include/curl/curl.h:#define CURL_REDIR_POST_301 1 +curl-7.25.0/include/curl/curl.h:#define CURL_REDIR_POST_302 2 + +curl-7.26.0/include/curl/curl.h:#define CURL_REDIR_POST_301 1 +curl-7.26.0/include/curl/curl.h:#define CURL_REDIR_POST_302 2 +curl-7.26.0/include/curl/curl.h:#define CURL_REDIR_POST_303 4 +--- + php_http_client_curl.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/php_http_client_curl.c b/php_http_client_curl.c +index 6f9884e..8f25211 100644 +--- a/php_http_client_curl.c ++++ b/php_http_client_curl.c +@@ -2169,7 +2169,9 @@ PHP_MINIT_FUNCTION(http_client_curl) + #if PHP_HTTP_CURL_VERSION(7,19,1) + REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_301", CURL_REDIR_POST_301, CONST_CS|CONST_PERSISTENT); + REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_302", CURL_REDIR_POST_302, CONST_CS|CONST_PERSISTENT); ++#if PHP_HTTP_CURL_VERSION(7,26,0) + REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_303", CURL_REDIR_POST_303, CONST_CS|CONST_PERSISTENT); ++#endif + REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_ALL", CURL_REDIR_POST_ALL, CONST_CS|CONST_PERSISTENT); + #endif + +-- +2.1.0 + diff --git a/php-pecl-http.spec b/php-pecl-http.spec index a6477a1..8ed6c73 100644 --- a/php-pecl-http.spec +++ b/php-pecl-http.spec @@ -27,7 +27,7 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: %{?scl_prefix}php-pecl-http -Version: 2.1.1 +Version: 2.1.2 Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Summary: Extended HTTP support @@ -39,6 +39,8 @@ Source0: http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz # From http://www.php.net/manual/en/http.configuration.php Source1: %{proj_name}.ini +Patch0: %{proj_name}-upstream.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel >= 5.3.0 BuildRequires: %{?scl_prefix}php-hash @@ -172,6 +174,7 @@ These are the files needed to compile programs using HTTP extension. mv %{proj_name}-%{version}%{?prever} NTS cd NTS +%patch0 -p1 -b .upstream extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -305,6 +308,7 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{proj_name} %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -326,6 +330,9 @@ rm -rf %{buildroot} %changelog +* Thu Sep 25 2014 Remi Collet - 2.1.2-1 +- Update to 2.1.2 + * Tue Sep 09 2014 Remi Collet - 2.1.1-1 - Update to 2.1.1 -- cgit