summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-04 16:00:36 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-04 16:00:36 +0200
commit8b03d74d52b2c3b4abbddfb9f9d81e326968b448 (patch)
tree652ef1f20334c6d1f6299341d943bd79b3430aa8
parent7ebbbeba9611089f3aa6f55ad4c77ae6a27a20bf (diff)
php-pecl-http: 2.0.5 (stable)
-rw-r--r--pecl_http-build.patch25
-rw-r--r--php-pecl-http.spec66
2 files changed, 46 insertions, 45 deletions
diff --git a/pecl_http-build.patch b/pecl_http-build.patch
deleted file mode 100644
index aacbafa..0000000
--- a/pecl_http-build.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From d6975fac1d5c88362e9ce625e9b5248e23b3cfb1 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Thu, 2 Jan 2014 17:19:18 +0100
-Subject: [PATCH] Fix build with -Werror=format-security
-
----
- php_http_client_curl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/php_http_client_curl.c b/php_http_client_curl.c
-index cc5e810..4033b9f 100644
---- a/php_http_client_curl.c
-+++ b/php_http_client_curl.c
-@@ -1807,7 +1807,7 @@ static STATUS php_http_client_curl_exec(php_http_client_t *h)
- /* see http://msdn.microsoft.com/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp */
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "WinSock error: %d", WSAGetLastError());
- #else
-- php_error_docref(NULL TSRMLS_CC, E_WARNING, strerror(errno));
-+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
- #endif
- return FAILURE;
- }
---
-1.8.4.3
-
diff --git a/php-pecl-http.spec b/php-pecl-http.spec
index dd5152d..042832f 100644
--- a/php-pecl-http.spec
+++ b/php-pecl-http.spec
@@ -6,11 +6,12 @@
#
# Please, preserve the changelog entries
#
-%{?scl: %scl_package php-pecl-http}
-%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
-%{!?php_incldir: %global php_incldir %{_includedir}/php}
-%{!?__pecl: %global __pecl %{_bindir}/pecl}
-%{!?__php: %global __php %{_bindir}/php}
+%{?scl: %scl_package php-pecl-http}
+%{!?scl: %global _root_prefix %{_prefix}}
+%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
+%{!?php_incldir: %global php_incldir %{_includedir}/php}
+%{!?__pecl: %global __pecl %{_bindir}/pecl}
+%{!?__php: %global __php %{_bindir}/php}
# The project is pecl_http but the extension is only http
%global proj_name pecl_http
@@ -18,8 +19,8 @@
%global with_zts 0%{?__ztsphp:1}
Name: %{?scl_prefix}php-pecl-http
-Version: 2.0.4
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 2.0.5
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Summary: Extended HTTP support
License: BSD
@@ -27,8 +28,6 @@ Group: Development/Languages
URL: http://pecl.php.net/package/pecl_http
Source0: http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz
-Patch0: %{proj_name}-build.patch
-
# From http://www.php.net/manual/en/http.configuration.php
Source1: %{proj_name}.ini
@@ -41,11 +40,30 @@ BuildRequires: %{?scl_prefix}php-spl
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: pcre-devel
BuildRequires: zlib-devel >= 1.2.0.4
-BuildRequires: libevent-devel >= 1.4
BuildRequires: curl-devel >= 7.18.2
BuildRequires: %{?scl_prefix}php-pecl-propro-devel
BuildRequires: %{?scl_prefix}php-pecl-raphf-devel
+%if 0%{?scl:1} && 0%{?fedora} < 15 && 0%{?rhel} < 7
+# Filter in the SCL collection
+%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so}
+# libvent from SCL as not available in system
+BuildRequires: %{scl_prefix}libevent-devel > 2
+Requires: %{scl_prefix}libevent%{_isa} > 2
+Requires: libcurl%{_isa}
+Requires: zlib%{_isa}
+%global _event_prefix %{_prefix}
+
+%else
+%global _event_prefix %{_root_prefix}
+%if "%{?vendor}" == "Remi Collet"
+BuildRequires: libevent-devel > 2
+%else
+# Copr build
+BuildRequires: libevent-devel > 1.4
+%endif
+%endif
+
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -62,7 +80,7 @@ Requires: %{?scl_prefix}php-spl%{?_isa}
%endif
Requires: %{?scl_prefix}php-pecl(propro)%{?_isa}
Requires: %{?scl_prefix}php-pecl(raphf)%{?_isa}
-# Can't install both version of the same extension
+# Can't install both versions of the same extension
Conflicts: %{?scl_prefix}php-pecl-http1
Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version}%{?prever}
@@ -72,13 +90,11 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}%{?prev
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}%{?prever}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}%{?prever}
-%if 0%{!?scl:1}
+%if "%{?vendor}" == "Remi Collet"
# Other third party repo stuff
-%if "%{php_version}" > "5.4"
Obsoletes: php53-pecl-http
Obsoletes: php53u-pecl-http
Obsoletes: php54-pecl-http
-%endif
%if "%{php_version}" > "5.5"
Obsoletes: php55u-pecl-http
%endif
@@ -90,8 +106,8 @@ Obsoletes: php56u-pecl-http
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
%endif
+%{?filter_setup}
%description
@@ -130,9 +146,6 @@ These are the files needed to compile programs using HTTP extension.
mv %{proj_name}-%{version}%{?prever} NTS
cd NTS
-
-%patch0 -p1
-
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
@@ -150,15 +163,24 @@ cp -pr NTS ZTS
%build
+peclconf() {
+%configure \
+ --with-http \
+ --with-http-zlib-dir=%{_root_prefix} \
+ --with-http-libcurl-dir=%{_root_prefix} \
+ --with-http-libevent-dir=%{_event_prefix} \
+ --with-libdir=%{_lib} \
+ --with-php-config=$1
+}
cd NTS
%{_bindir}/phpize
-%configure --with-php-config=%{_bindir}/php-config
+peclconf %{_bindir}/php-config
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
%{_bindir}/zts-phpize
-%configure --with-php-config=%{_bindir}/zts-php-config
+peclconf %{_bindir}/zts-php-config
make %{?_smp_mflags}
%endif
@@ -250,6 +272,10 @@ rm -rf %{buildroot}
%changelog
+* Fri Apr 04 2014 Remi Collet <remi@fedoraproject.org> - 2.0.5-1
+- Update to 2.0.5
+- use libevent v2 in SCL
+
* Sun Mar 09 2014 Remi Collet <remi@fedoraproject.org> - 2.0.4-2
- add upstream patch for -Werror=format-security