summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--event-upstream.patch53
-rw-r--r--php-pecl-event.spec3
2 files changed, 56 insertions, 0 deletions
diff --git a/event-upstream.patch b/event-upstream.patch
new file mode 100644
index 0000000..cf3d8a8
--- /dev/null
+++ b/event-upstream.patch
@@ -0,0 +1,53 @@
+From 935302065af825f82fbbc3e6e93eb83f408c9121 Mon Sep 17 00:00:00 2001
+From: Ruslan Osmanov <rrosmanov@gmail.com>
+Date: Mon, 23 Apr 2018 15:15:29 +0700
+Subject: [PATCH] Fixed tests/12-serialization.phpt
+
+---
+ package.xml | 23 +++++++++++++++++++----
+ php5/php_event.h | 2 +-
+ php7/php_event.h | 2 +-
+ tests/12-serialization.phpt | 2 +-
+ 4 files changed, 22 insertions(+), 7 deletions(-)
+
+diff --git a/tests/12-serialization.phpt b/tests/12-serialization.phpt
+index 2a8f15d..d5945df 100644
+--- a/tests/12-serialization.phpt
++++ b/tests/12-serialization.phpt
+@@ -22,7 +22,7 @@ $http_connection = new $eventHttpConnectionClass($base, null, "0.0.0.0", 9099);
+ $config = new $eventConfigClass;
+
+ if (class_exists($eventSslContextClass)) {
+- $ssl_context = new $eventSslContextClass($eventSslContextClass::SSLv3_SERVER_METHOD, []);
++ $ssl_context = new $eventSslContextClass($eventSslContextClass::TLS_SERVER_METHOD, []);
+ serialize($ssl_context);
+ }
+
+--
+2.10.5
+
+From 5827e342d81f196f35601a6227852e9a075f9df1 Mon Sep 17 00:00:00 2001
+From: Ruslan Osmanov <rrosmanov@gmail.com>
+Date: Mon, 23 Apr 2018 15:36:51 +0700
+Subject: [PATCH] Fixed PHP 5.4-related issue in tests/12-serialization.phpt
+
+---
+ tests/12-serialization.phpt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/12-serialization.phpt b/tests/12-serialization.phpt
+index d5945df..e37b2b1 100644
+--- a/tests/12-serialization.phpt
++++ b/tests/12-serialization.phpt
+@@ -38,7 +38,7 @@ echo "1 - ok\n";
+
+ /////////////////////////////////////////////
+
+-foreach ([ $base, $http, $http_request, $http_connection, $config, $listener ] as &$object) {
++foreach ([ $base, $http, $http_request, $http_connection, $config, $listener ] as $object) {
+ try {
+ serialize($object);
+ } catch (\Exception $e) {
+--
+2.10.5
+
diff --git a/php-pecl-event.spec b/php-pecl-event.spec
index 0de0c05..6182e49 100644
--- a/php-pecl-event.spec
+++ b/php-pecl-event.spec
@@ -41,6 +41,8 @@ License: PHP
URL: http://pecl.php.net/package/event
Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: %{pecl_name}-upstream.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -116,6 +118,7 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
cd NTS
+%patch0 -p1 -b .upstream
# Sanity check, really often broken
DIR=$(%{__php} -r 'echo "php" . PHP_MAJOR_VERSION;')