aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2020-04-25 17:32:17 +0300
committerAndy Postnikov <apostnikov@gmail.com>2020-04-25 17:34:15 +0300
commitbeece7d04e4b34a25c5a76da6e8d8ba91a680f09 (patch)
treed7d42954c48549813c5f654dd09f64e8ade7cea4
parentc290ece8c5d488bd50bc55c904dcb9e1fe0827d4 (diff)
downloadaports-beece7d04e4b34a25c5a76da6e8d8ba91a680f09.tar.gz
aports-beece7d04e4b34a25c5a76da6e8d8ba91a680f09.tar.bz2
aports-beece7d04e4b34a25c5a76da6e8d8ba91a680f09.tar.xz
community/php7-pecl-yaml: improve 32-bit fix from upstream
-rw-r--r--community/php7-pecl-yaml/32bit.patch57
-rw-r--r--community/php7-pecl-yaml/APKBUILD4
2 files changed, 49 insertions, 12 deletions
diff --git a/community/php7-pecl-yaml/32bit.patch b/community/php7-pecl-yaml/32bit.patch
index 5d03ee9822..96eb111f15 100644
--- a/community/php7-pecl-yaml/32bit.patch
+++ b/community/php7-pecl-yaml/32bit.patch
@@ -1,13 +1,50 @@
+commit eb11e4e425d3d6e703c824fb891b1b0701d683ef
+Author: Remi Collet <remi@remirepo.net>
+Date: Thu Apr 23 08:16:30 2020 +0200
+
+ fix [-Wformat=] issue on 32-bit
+
+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)) {
+
+commit a5a7f14f37c1d530e8e9868945f4c08af26ba8a9
+Author: Remi Collet <remi@remirepo.net>
+Date: Thu Apr 23 08:16:55 2020 +0200
+
+ relax test on 32-bit (overflow to float)
+
diff --git a/tests/bug_79494.phpt b/tests/bug_79494.phpt
-index f4f8b48..ec630a5 100644
+index d388bd8..f4f8b48 100644
--- a/tests/bug_79494.phpt
+++ b/tests/bug_79494.phpt
-@@ -1,7 +1,7 @@
- --TEST--
- Test PECL bug #74949
- --SKIPIF--
--<?php if(!extension_loaded('yaml')) die('skip yaml n/a'); ?>
-+<?php if(!extension_loaded('yaml') || PHP_INT_SIZE==4) die('skip yaml n/a'); ?>
- --FILE--
- <?php
- $data = array (
+@@ -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/community/php7-pecl-yaml/APKBUILD b/community/php7-pecl-yaml/APKBUILD
index 573fc75795..ba148c15c7 100644
--- a/community/php7-pecl-yaml/APKBUILD
+++ b/community/php7-pecl-yaml/APKBUILD
@@ -2,7 +2,7 @@
pkgname=php7-pecl-yaml
_pkgreal=yaml
pkgver=2.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="YAML syntax bindings for PHP"
url="https://pecl.php.net/package/yaml"
arch="all"
@@ -36,4 +36,4 @@ package() {
}
sha512sums="3731ca2b84e80599d7fae4f58efdd11e9920c672ea6e62ff6b0d57d721d3f6f12ca86efe88f63c324d4ad2b73d6947a21f6e5a47263538ca0d5e822b8fc7b8bd php7-pecl-yaml-2.1.0.tgz
-96cbb76f747ee75f73b048b3f612eddc9a4904bb212028c9f38030e0cb365e31d9048c4a180fb2d1258c5da38f8e37e76a843b66549d40407011c5d53eeb3c5a 32bit.patch"
+1707d8d3c4d1f003bf2ab1e04bbcacd73d3ecfa94377bdb0d870d775c820a2b1a180147033208754977652c8c11860e2a1703fd6b0acc997c4bacc612be5737a 32bit.patch"