diff --git a/.gitignore b/.gitignore index b143867..4eea525 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ clog /yaml-2.0.2.tgz /yaml-2.0.3.tgz /yaml-2.0.4.tgz +/yaml-2.1.0.tgz diff --git a/45.patch b/45.patch new file mode 100644 index 0000000..f2b9593 --- /dev/null +++ b/45.patch @@ -0,0 +1,56 @@ +From eb11e4e425d3d6e703c824fb891b1b0701d683ef Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 23 Apr 2020 08:16:30 +0200 +Subject: [PATCH 1/2] fix [-Wformat=] issue on 32-bit + +--- + emit.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/emit.c b/emit.c +index 0fd2ebc..234a64e 100644 +--- a/emit.c ++++ b/emit.c +@@ -506,9 +506,9 @@ static int y_write_array( + recursive_idx = y_search_recursive(state, (zend_ulong) ht); + if (-1 != recursive_idx) { + /* create anchor to refer to this structure */ +- anchor_size = snprintf(anchor, 0, "refid%ld", recursive_idx + 1); ++ anchor_size = snprintf(anchor, 0, "refid" ZEND_LONG_FMT, recursive_idx + 1); + anchor = (char*) emalloc(anchor_size + 1); +- snprintf(anchor, anchor_size + 1, "refid%ld", recursive_idx + 1); ++ snprintf(anchor, anchor_size + 1, "refid" ZEND_LONG_FMT, recursive_idx + 1); + + #if PHP_VERSION_ID >= 70300 + if (!(GC_FLAGS(ht) & GC_IMMUTABLE) && GC_IS_RECURSIVE(ht)) { + +From a5a7f14f37c1d530e8e9868945f4c08af26ba8a9 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 23 Apr 2020 08:16:55 +0200 +Subject: [PATCH 2/2] relax test on 32-bit (overflow to float) + +--- + tests/bug_79494.phpt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/bug_79494.phpt b/tests/bug_79494.phpt +index d388bd8..f4f8b48 100644 +--- a/tests/bug_79494.phpt ++++ b/tests/bug_79494.phpt +@@ -22,13 +22,13 @@ $data = array ( + + print yaml_emit($data); + ?> +---EXPECT-- ++--EXPECTF-- + --- + audio: + audioEnabled: +- - 132317787432502136 ++ - 13231778%s + - 0 + eveampGain: +- - 132316833510704299 ++ - 13231683%s + - 0.250000 + ... diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec index d039e69..537dd24 100644 --- a/php-pecl-yaml.spec +++ b/php-pecl-yaml.spec @@ -5,15 +5,17 @@ %global ini_name 40-%{pecl_name}.ini Name: php-pecl-yaml -Version: 2.0.4 -Release: 5%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: Support for YAML 1.1 serialization using the LibYAML library License: MIT -URL: http://pecl.php.net/package/yaml -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +URL: https://pecl.php.net/package/yaml +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz -BuildRequires: php-devel >= 7 +Patch0: https://patch-diff.githubusercontent.com/raw/php/pecl-file_formats-yaml/pull/45.patch + +BuildRequires: php-devel >= 7.1 BuildRequires: php-pear BuildRequires: libyaml-devel @@ -39,6 +41,9 @@ sed -e 's/role="test"/role="src"/' \ -e '/LICENSE/s/role="doc"/role="src"/' \ package.xml >%{pecl_name}-%{version}%{?prever}/package.xml +cd %{pecl_name}-%{version}%{?prever} +%patch0 -p1 -b .pr45 + %build cd %{pecl_name}-%{version}%{?prever} @@ -101,6 +106,12 @@ done %changelog +* Thu Apr 23 2020 Remi Collet - 2.1.0-1 +- update to 2.1.0 +- raise dependency on PHP 7.1 +- fix 32-bit build using patch from + https://github.com/php/pecl-file_formats-yaml/pull/45 + * Thu Jan 30 2020 Fedora Release Engineering - 2.0.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 9f5ccc4..c81bcc5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (yaml-2.0.4.tgz) = 138e5b4566800fc7d624baf71bc585d6d432755046e598ae9f4099fa565727e04d79bb171289a53eb9e5daa416ffee1b0fb4967c84976ac6cd6fc01b0a05fbae +SHA512 (yaml-2.1.0.tgz) = 3731ca2b84e80599d7fae4f58efdd11e9920c672ea6e62ff6b0d57d721d3f6f12ca86efe88f63c324d4ad2b73d6947a21f6e5a47263538ca0d5e822b8fc7b8bd