diff options
author | Remi Collet <remi@remirepo.net> | 2020-09-23 08:20:25 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-09-23 08:20:25 +0200 |
commit | 000c4d9220c930dde3daa6099b2b9946ab5e9daf (patch) | |
tree | 3c0d9074b240e8c41cc3dd255aecf7dcfc75bb93 | |
parent | dd1b076a798db3d727b2f212fedca88a92f0bd82 (diff) |
add patch for PHP 8 from https://github.com/laruence/yaconf/pull/63
-rw-r--r-- | 63.patch | 34 | ||||
-rw-r--r-- | php-pecl-yaconf.spec | 27 |
2 files changed, 48 insertions, 13 deletions
diff --git a/63.patch b/63.patch new file mode 100644 index 0000000..510fe50 --- /dev/null +++ b/63.patch @@ -0,0 +1,34 @@ +From 63850cfaeff7329de5e11222a63575fe5aecb382 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 23 Sep 2020 08:11:44 +0200 +Subject: [PATCH] force log_errors=1 for PHP 8 + +--- + tests/005.phpt | 1 + + tests/006.phpt | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/tests/005.phpt b/tests/005.phpt +index 0336074..d7a8e08 100644 +--- a/tests/005.phpt ++++ b/tests/005.phpt +@@ -4,6 +4,7 @@ Check for Yaconf with long key name + <?php if (!extension_loaded("yaconf")) print "skip"; ?> + --INI-- + yaconf.directory={PWD}/inis/005 ++log_errors=1 + --FILE-- + <?php + var_dump(Yaconf::has("a")); +diff --git a/tests/006.phpt b/tests/006.phpt +index 5fba611..a1ca7df 100644 +--- a/tests/006.phpt ++++ b/tests/006.phpt +@@ -4,6 +4,7 @@ Check for Yaconf with section + <?php if (!extension_loaded("yaconf")) print "skip"; ?> + --INI-- + yaconf.directory={PWD}/inis/006 ++log_errors=1 + --FILE-- + <?php + var_dump(Yaconf::has("a")); diff --git a/php-pecl-yaconf.spec b/php-pecl-yaconf.spec index 673005b..2bb622f 100644 --- a/php-pecl-yaconf.spec +++ b/php-pecl-yaconf.spec @@ -20,15 +20,17 @@ Summary: Yet Another Configurations Container Name: %{?scl_prefix}php-pecl-yaconf Version: 1.1.0 +License: PHP +URL: https://github.com/%{gh_owner}/%{gh_project} %if 0%{?gh_date:1} Release: 0.4.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz %endif -License: PHP -URL: https://github.com/%{gh_owner}/%{gh_project} + +Patch0: https://patch-diff.githubusercontent.com/raw/laruence/yaconf/pull/63.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 @@ -38,18 +40,15 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} %if "%{php_version}" > "7.3" 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: php74w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -99,6 +98,8 @@ mv %{pecl_name}-%{version} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS +%patch0 -p1 -b .pr63 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_YACONF_VERSION/{s/.* "//;s/".*$//;p}' php_yaconf.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then @@ -168,9 +169,6 @@ cp -pr NTS/tests %{buildroot}%{pecl_testdir}/%{pecl_name}/tests %check -# ignore bad test -rm ?TS/tests/010.phpt - cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ @@ -244,6 +242,9 @@ fi %changelog +* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 1.1.0-2 +- add patch for PHP 8 from https://github.com/laruence/yaconf/pull/63 + * Thu Mar 12 2020 Remi Collet <remi@remirepo.net> - 1.1.0-1 - update to 1.1.0 |