summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--env-pr8.patch53
-rw-r--r--php-pecl-env.spec32
2 files changed, 62 insertions, 23 deletions
diff --git a/env-pr8.patch b/env-pr8.patch
index 6bcae23..6ace4d9 100644
--- a/env-pr8.patch
+++ b/env-pr8.patch
@@ -1,7 +1,7 @@
From 58552b8035d4b0a72040f0c8aed91ae849172eda Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Thu, 1 Dec 2016 17:40:42 +0100
-Subject: [PATCH] fix segfault with 7.1.0, fix #7
+Subject: [PATCH 1/2] fix segfault with 7.1.0, fix #7
---
php7/php_env.c | 2 +-
@@ -20,3 +20,54 @@ index 22c19b4..b891ba7 100644
php_env_ini_parser_cb, vars) == FAILURE || ENV_G(parse_err)) {
if (ENV_G(parse_err)) {
php_error(E_WARNING, "env: parsing '%s' failed", ENV_G(file));
+
+From b91c4c1302b6fc8c731072d8d0b4e3eb7275f534 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 19 Feb 2020 09:38:24 +0100
+Subject: [PATCH 2/2] fix multiple definition of 'env_globals'
+
+---
+ php5/php_env.c | 2 --
+ php7/php_env.c | 2 --
+ php_env.h | 2 ++
+ 3 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/php5/php_env.c b/php5/php_env.c
+index 62a231a..a1381df 100644
+--- a/php5/php_env.c
++++ b/php5/php_env.c
+@@ -2,8 +2,6 @@
+ #include "../php_env.h"
+ #include "../env.h"
+
+-ZEND_DECLARE_MODULE_GLOBALS(env)
+-
+ static void php_env_ini_parser_cb(zval *key, zval *value, zval *index, int callback_type, HashTable *ht) /* {{{ */ {
+ zval *rv;
+ char *str;
+diff --git a/php7/php_env.c b/php7/php_env.c
+index b891ba7..b1fa628 100644
+--- a/php7/php_env.c
++++ b/php7/php_env.c
+@@ -2,8 +2,6 @@
+ #include "../php_env.h"
+ #include "../env.h"
+
+-ZEND_DECLARE_MODULE_GLOBALS(env)
+-
+ static void php_env_ini_parser_cb(zval *key, zval *value, zval *index, int callback_type, void *arg) /* {{{ */ {
+ HashTable *ht = (HashTable*)arg;
+ char *str;
+diff --git a/php_env.h b/php_env.h
+index de91d42..8455854 100644
+--- a/php_env.h
++++ b/php_env.h
+@@ -44,6 +44,8 @@ ZEND_BEGIN_MODULE_GLOBALS(env)
+ int parse_err;
+ ZEND_END_MODULE_GLOBALS(env)
+
++ZEND_EXTERN_MODULE_GLOBALS(env)
++
+ #ifdef ZTS
+ #define ENV_G(v) TSRMG(env_globals_id, zend_env_globals *, v)
+ #else
diff --git a/php-pecl-env.spec b/php-pecl-env.spec
index 61956d1..4596693 100644
--- a/php-pecl-env.spec
+++ b/php-pecl-env.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-env
#
-# Copyright (c) 2015-2018 Remi Collet
+# Copyright (c) 2015-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -22,11 +22,11 @@
Summary: Load environment variables
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 0.2.1
-Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
-URL: http://pecl.php.net/package/%{pecl_name}
+URL: https://pecl.php.net/package/%{pecl_name}
-Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
Patch0: %{pecl_name}-pr4.patch
Patch1: %{pecl_name}-pr8.patch
@@ -47,32 +47,16 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.0"
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.2"
Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
+Obsoletes: php73-pecl-%{pecl_name} <= %{version}
Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
+Obsoletes: php74-pecl-%{pecl_name} <= %{version}
Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -236,6 +220,10 @@ fi
%changelog
+* Wed Feb 19 2020 Remi Collet <remi@remirepo.net> - 0.2.1-9
+- add patch for GCC 10
+ from https://github.com/beberlei/env/pull/8
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 0.2.1-8
- rebuild for 7.4.0RC1