From 5f9bc68c563fd8b2ba45d22fcad96b093158fa8e Mon Sep 17 00:00:00 2001
From: Andy Postnikov <apostnikov@gmail.com>
Date: Fri, 12 Jun 2020 17:41:25 +0300
Subject: [PATCH] community/*: rebuild against PHP 7.4

---
 community/php7-brotli/APKBUILD                |   2 +-
 community/php7-maxminddb/APKBUILD             |   2 +-
 community/php7-pecl-amqp/APKBUILD             |   2 +-
 community/php7-pecl-apcu/APKBUILD             |   2 +-
 community/php7-pecl-ast/APKBUILD              |   2 +-
 community/php7-pecl-couchbase/APKBUILD        |   2 +-
 community/php7-pecl-event/APKBUILD            |   2 +-
 community/php7-pecl-gmagick/APKBUILD          |   2 +-
 ...of-serializing-ArrayObject-for-7.4.6.patch |  66 +++++
 community/php7-pecl-igbinary/APKBUILD         |   8 +-
 community/php7-pecl-imagick/APKBUILD          |   2 +-
 community/php7-pecl-lzf/APKBUILD              |   2 +-
 community/php7-pecl-mailparse/APKBUILD        |   2 +-
 community/php7-pecl-mcrypt/APKBUILD           |   2 +-
 community/php7-pecl-memcache/APKBUILD         |   2 +-
 community/php7-pecl-memcached/APKBUILD        |   2 +-
 community/php7-pecl-msgpack/APKBUILD          |   2 +-
 community/php7-pecl-oauth/APKBUILD            |   2 +-
 community/php7-pecl-protobuf/APKBUILD         |   2 +-
 community/php7-pecl-psr/APKBUILD              |   2 +-
 community/php7-pecl-redis/APKBUILD            |   2 +-
 community/php7-pecl-ssh2/APKBUILD             |   2 +-
 community/php7-pecl-timezonedb/APKBUILD       |   2 +-
 community/php7-pecl-uploadprogress/APKBUILD   |   2 +-
 community/php7-pecl-uuid/APKBUILD             |   2 +-
 community/php7-pecl-vips/APKBUILD             |   2 +-
 community/php7-pecl-xdebug/APKBUILD           |   2 +-
 community/php7-pecl-xhprof/APKBUILD           |   2 +-
 community/php7-pecl-yaml/APKBUILD             |   2 +-
 community/php7-pecl-zmq/APKBUILD              |   8 +-
 .../php7-pecl-zmq/fix-php-7.4-compile.patch   | 261 ++++++++++++++++++
 community/php7-phalcon/APKBUILD               |   2 +-
 community/unit/APKBUILD                       |   2 +-
 community/xapian-bindings/APKBUILD            |   2 +-
 34 files changed, 367 insertions(+), 36 deletions(-)
 create mode 100644 community/php7-pecl-igbinary/0001-Update-tests-of-serializing-ArrayObject-for-7.4.6.patch
 create mode 100644 community/php7-pecl-zmq/fix-php-7.4-compile.patch

diff --git a/community/php7-brotli/APKBUILD b/community/php7-brotli/APKBUILD
index f6bc9241f333..648b4982afac 100644
--- a/community/php7-brotli/APKBUILD
+++ b/community/php7-brotli/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-brotli
 _pkgreal=brotli
 pkgver=0.7.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Brotli Extension for PHP"
 url="https://github.com/kjdev/php-ext-brotli"
 arch="all"
diff --git a/community/php7-maxminddb/APKBUILD b/community/php7-maxminddb/APKBUILD
index 49ec624d9c40..c5ff5b44e87e 100644
--- a/community/php7-maxminddb/APKBUILD
+++ b/community/php7-maxminddb/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-maxminddb
 _pkgreal=MaxMind-DB-Reader-php
 pkgver=1.6.0
-pkgrel=1
+pkgrel=2
 pkgdesc="PHP7 MaxMind DB Reader extension"
 url="https://github.com/maxmind/MaxMind-DB-Reader-php"
 arch="all"
diff --git a/community/php7-pecl-amqp/APKBUILD b/community/php7-pecl-amqp/APKBUILD
index 3d1a3b1155ec..909ce21d301b 100644
--- a/community/php7-pecl-amqp/APKBUILD
+++ b/community/php7-pecl-amqp/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-amqp
 _pkgreal=amqp
 pkgver=1.10.2
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension to communicate with any AMQP spec 0-9-1 compatible server - PECL"
 url="https://pecl.php.net/package/amqp"
 arch="all"
diff --git a/community/php7-pecl-apcu/APKBUILD b/community/php7-pecl-apcu/APKBUILD
index 41e70349839a..51389f4e65c0 100644
--- a/community/php7-pecl-apcu/APKBUILD
+++ b/community/php7-pecl-apcu/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-apcu
 _pkgreal=apcu
 pkgver=5.1.18
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension APC User Cache - PECL"
 url="https://pecl.php.net/package/apcu"
 arch="all"
diff --git a/community/php7-pecl-ast/APKBUILD b/community/php7-pecl-ast/APKBUILD
index 8cd594d6eb6b..ce14a96d2768 100644
--- a/community/php7-pecl-ast/APKBUILD
+++ b/community/php7-pecl-ast/APKBUILD
@@ -4,7 +4,7 @@ pkgname=php7-pecl-ast
 _pkgext=ast
 _pkgreal=php-ast
 pkgver=1.0.6
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension exposing PHP 7 abstract syntax tree - PECL"
 url="https://pecl.php.net/package/ast"
 arch="all"
diff --git a/community/php7-pecl-couchbase/APKBUILD b/community/php7-pecl-couchbase/APKBUILD
index b631c486b522..f5261e7ff7ea 100644
--- a/community/php7-pecl-couchbase/APKBUILD
+++ b/community/php7-pecl-couchbase/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-couchbase
 _pkgreal=couchbase
 pkgver=2.6.2
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension for Couchbase - PECL"
 url="https://pecl.php.net/package/couchbase"
 arch="all"
diff --git a/community/php7-pecl-event/APKBUILD b/community/php7-pecl-event/APKBUILD
index e90a1d6c9b0a..8bba833a0bbc 100644
--- a/community/php7-pecl-event/APKBUILD
+++ b/community/php7-pecl-event/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-event
 _pkgname=event
 pkgver=2.5.6
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension that provides interface to libevent library - PECL"
 url="https://pecl.php.net/package/event"
 arch="all"
diff --git a/community/php7-pecl-gmagick/APKBUILD b/community/php7-pecl-gmagick/APKBUILD
index a1b3b0ac365a..7677fb9ea09b 100644
--- a/community/php7-pecl-gmagick/APKBUILD
+++ b/community/php7-pecl-gmagick/APKBUILD
@@ -4,7 +4,7 @@ pkgname=php7-pecl-gmagick
 _pkgreal=gmagick
 pkgver=2.0.5_rc1
 _pkgver=${pkgver/_rc/RC}
-pkgrel=5
+pkgrel=6
 pkgdesc="PHP bindings to the GraphicsMagick library - PECL"
 url="https://pecl.php.net/package/gmagick"
 arch="all"
diff --git a/community/php7-pecl-igbinary/0001-Update-tests-of-serializing-ArrayObject-for-7.4.6.patch b/community/php7-pecl-igbinary/0001-Update-tests-of-serializing-ArrayObject-for-7.4.6.patch
new file mode 100644
index 000000000000..adcecb379c5d
--- /dev/null
+++ b/community/php7-pecl-igbinary/0001-Update-tests-of-serializing-ArrayObject-for-7.4.6.patch
@@ -0,0 +1,66 @@
+From 07de7a665802ff8e028b85442568031ae9759077 Mon Sep 17 00:00:00 2001
+From: Tyson Andre <tysonandre775@hotmail.com>
+Date: Wed, 6 May 2020 09:57:04 -0400
+Subject: [PATCH] Update tests of serializing ArrayObject for 7.4.6+
+
+Fixes #274
+---
+ tests/__serialize_012.phpt | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/tests/__serialize_012.phpt b/tests/__serialize_012.phpt
+index 13f1d32..488a87d 100644
+--- a/tests/__serialize_012.phpt
++++ b/tests/__serialize_012.phpt
+@@ -1,7 +1,7 @@
+ --TEST--
+ Test unserialization of classes derived from ArrayIterator
+ --SKIPIF--
+-<?php if (PHP_VERSION_ID < 70400) { echo "Skip requires php 7.4+"; } ?>
++<?php if (PHP_VERSION_ID < 70406) { echo "Skip requires php 7.4.6+"; } ?>
+ --FILE--
+ <?php
+ // based on bug45706.phpt from php-src
+@@ -12,13 +12,25 @@ class Foo2 {
+ }
+ $x = array(new Foo1(),new Foo2);
+ $s = igbinary_serialize($x);
++var_dump(igbinary_unserialize($s));
+ $s = str_replace("Foo", "Bar", $s);
+ $y = igbinary_unserialize($s);
+ var_dump($y);
+ --EXPECTF--
+ array(2) {
+   [0]=>
+-  object(__PHP_Incomplete_Class)#3 (4) {
++  object(Foo1)#3 (1) {
++    ["storage":"ArrayIterator":private]=>
++    array(0) {
++    }
++  }
++  [1]=>
++  object(Foo2)#4 (0) {
++  }
++}
++array(2) {
++  [0]=>
++  object(__PHP_Incomplete_Class)#4 (5) {
+     ["__PHP_Incomplete_Class_Name"]=>
+     string(4) "Bar1"
+     ["0"]=>
+@@ -29,9 +41,11 @@ array(2) {
+     ["2"]=>
+     array(0) {
+     }
++    ["3"]=>
++    NULL
+   }
+   [1]=>
+-  object(__PHP_Incomplete_Class)#4 (1) {
++  object(__PHP_Incomplete_Class)#3 (1) {
+     ["__PHP_Incomplete_Class_Name"]=>
+     string(4) "Bar2"
+   }
+-- 
+2.26.2
+
diff --git a/community/php7-pecl-igbinary/APKBUILD b/community/php7-pecl-igbinary/APKBUILD
index 01f78b14d26e..f4452bdfc5bc 100644
--- a/community/php7-pecl-igbinary/APKBUILD
+++ b/community/php7-pecl-igbinary/APKBUILD
@@ -4,7 +4,7 @@
 pkgname=php7-pecl-igbinary
 _pkgreal=igbinary
 pkgver=3.1.2
-pkgrel=0
+pkgrel=1
 pkgdesc="Igbinary is a drop in replacement for the standard php serializer"
 url="https://pecl.php.net/package/igbinary"
 arch="all"
@@ -13,7 +13,8 @@ provides="php7-igbinary=$pkgver-r$pkgrel" # for backward compatibility
 replaces="php7-igbinary" # for backward compatibility
 depends="php7-common"
 makedepends="autoconf php7-dev php7-json php7-pecl-apcu re2c"
-source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
+source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz
+	0001-Update-tests-of-serializing-ArrayObject-for-7.4.6.patch"
 builddir="$srcdir/$_pkgreal-$pkgver"
 
 build() {
@@ -38,4 +39,5 @@ package() {
 		"$pkgdir"/etc/php7/conf.d/10_$_pkgreal.ini
 }
 
-sha512sums="8d293b63e64a2759d55569fda9f9641c34dd9cc1529612d22821f8026b09010e35e2f36552f88e4af89c64a81a9a1548e012b176e2fedab74f839bf7699168c2  php7-pecl-igbinary-3.1.2.tgz"
+sha512sums="8d293b63e64a2759d55569fda9f9641c34dd9cc1529612d22821f8026b09010e35e2f36552f88e4af89c64a81a9a1548e012b176e2fedab74f839bf7699168c2  php7-pecl-igbinary-3.1.2.tgz
+b7f8c05d6f60f5ba17f64ca3bc057e693ffcbf9a73f87e41af102ebb5818e32045f2275d54452a3219351c0186107b3f3d147b6e55af78bb77980f8008590d1d  0001-Update-tests-of-serializing-ArrayObject-for-7.4.6.patch"
diff --git a/community/php7-pecl-imagick/APKBUILD b/community/php7-pecl-imagick/APKBUILD
index 91655c854829..f661b17cbc34 100644
--- a/community/php7-pecl-imagick/APKBUILD
+++ b/community/php7-pecl-imagick/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-imagick
 _pkgreal=imagick
 pkgver=3.4.4
-pkgrel=3
+pkgrel=4
 pkgdesc="PHP extension provides a wrapper to the ImageMagick library - PECL"
 url="https://pecl.php.net/package/imagick"
 arch="all"
diff --git a/community/php7-pecl-lzf/APKBUILD b/community/php7-pecl-lzf/APKBUILD
index ec6389cafa4f..30944acaa50b 100644
--- a/community/php7-pecl-lzf/APKBUILD
+++ b/community/php7-pecl-lzf/APKBUILD
@@ -4,7 +4,7 @@ pkgname=php7-pecl-lzf
 _pkgreal=LZF
 _pkgextname=lzf
 pkgver=1.6.8
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension handles LZF de/compression - PECL"
 url="https://pecl.php.net/package/LZF"
 arch="all"
diff --git a/community/php7-pecl-mailparse/APKBUILD b/community/php7-pecl-mailparse/APKBUILD
index 9ddffca3e449..a51705b53e41 100644
--- a/community/php7-pecl-mailparse/APKBUILD
+++ b/community/php7-pecl-mailparse/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-mailparse
 _pkgreal=mailparse
 pkgver=3.1.0
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension for parsing and working with email messages - PECL"
 url="https://pecl.php.net/package/mailparse"
 arch="all"
diff --git a/community/php7-pecl-mcrypt/APKBUILD b/community/php7-pecl-mcrypt/APKBUILD
index f734404d73a0..aeb768d7dbb8 100644
--- a/community/php7-pecl-mcrypt/APKBUILD
+++ b/community/php7-pecl-mcrypt/APKBUILD
@@ -2,7 +2,7 @@
 pkgname=php7-pecl-mcrypt
 _pkgreal=mcrypt
 pkgver=1.0.3
-pkgrel=1
+pkgrel=2
 pkgdesc="Provides bindings for the unmaintained libmcrypt."
 url="https://pecl.php.net/package/mcrypt"
 arch="all"
diff --git a/community/php7-pecl-memcache/APKBUILD b/community/php7-pecl-memcache/APKBUILD
index 3ee9427c103d..00c5814a9951 100644
--- a/community/php7-pecl-memcache/APKBUILD
+++ b/community/php7-pecl-memcache/APKBUILD
@@ -2,7 +2,7 @@
 pkgname=php7-pecl-memcache
 _pkgreal=memcache
 pkgver=4.0.5.2
-pkgrel=0
+pkgrel=1
 pkgdesc="PECL memcache extension, provides handy OO and procedural interfaces, can be used as session handler."
 url="https://pecl.php.net/package/memcache"
 arch="all"
diff --git a/community/php7-pecl-memcached/APKBUILD b/community/php7-pecl-memcached/APKBUILD
index ece5a2cd600f..6da8b332daba 100644
--- a/community/php7-pecl-memcached/APKBUILD
+++ b/community/php7-pecl-memcached/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-memcached
 _pkgreal=memcached
 pkgver=3.1.5
-pkgrel=1
+pkgrel=2
 pkgdesc="PHP extension for interfacing with memcached via libmemcached library"
 url="https://pecl.php.net/package/memcached"
 arch="all"
diff --git a/community/php7-pecl-msgpack/APKBUILD b/community/php7-pecl-msgpack/APKBUILD
index 775624a906f5..9fe2f4992243 100644
--- a/community/php7-pecl-msgpack/APKBUILD
+++ b/community/php7-pecl-msgpack/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-msgpack
 _pkgreal=msgpack
 pkgver=2.1.0
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension provides API for communicating with MessagePack serialization - PECL"
 url="https://pecl.php.net/package/msgpack"
 arch="all"
diff --git a/community/php7-pecl-oauth/APKBUILD b/community/php7-pecl-oauth/APKBUILD
index 3570926cebc7..c9f3239ad7fe 100644
--- a/community/php7-pecl-oauth/APKBUILD
+++ b/community/php7-pecl-oauth/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-oauth
 _pkgreal=oauth
 pkgver=2.0.5
-pkgrel=0
+pkgrel=1
 pkgdesc="OAuth is an authorization protocol built on top of HTTP."
 url="https://pecl.php.net/package/oauth"
 arch="all"
diff --git a/community/php7-pecl-protobuf/APKBUILD b/community/php7-pecl-protobuf/APKBUILD
index 860de4a57367..ffc058c8b94c 100644
--- a/community/php7-pecl-protobuf/APKBUILD
+++ b/community/php7-pecl-protobuf/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-protobuf
 _pkgreal=protobuf
 pkgver=3.12.2
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP7 extension: Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data."
 url="https://pecl.php.net/package/protobuf"
 arch="all"
diff --git a/community/php7-pecl-psr/APKBUILD b/community/php7-pecl-psr/APKBUILD
index 25f1a8549164..9010992b8d73 100644
--- a/community/php7-pecl-psr/APKBUILD
+++ b/community/php7-pecl-psr/APKBUILD
@@ -2,7 +2,7 @@
 pkgname=php7-pecl-psr
 _pkgreal=psr
 pkgver=1.0.0
-pkgrel=0
+pkgrel=1
 pkgdesc="PECL extension provides the accepted PSR interfaces, so they can be used in an extension."
 url="https://pecl.php.net/package/psr"
 arch="all"
diff --git a/community/php7-pecl-redis/APKBUILD b/community/php7-pecl-redis/APKBUILD
index 23201089da16..9acf88a364ea 100644
--- a/community/php7-pecl-redis/APKBUILD
+++ b/community/php7-pecl-redis/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-redis
 _pkgreal=redis
 pkgver=5.2.2
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension for interfacing with Redis - PECL"
 url="https://pecl.php.net/package/redis"
 arch="all"
diff --git a/community/php7-pecl-ssh2/APKBUILD b/community/php7-pecl-ssh2/APKBUILD
index ff78fc61be0a..7ae2d39d180b 100644
--- a/community/php7-pecl-ssh2/APKBUILD
+++ b/community/php7-pecl-ssh2/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-ssh2
 _pkgreal=ssh2
 pkgver=1.2
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension provide bindings for the libssh2 library - PECL"
 url="https://pecl.php.net/package/ssh2"
 arch="all"
diff --git a/community/php7-pecl-timezonedb/APKBUILD b/community/php7-pecl-timezonedb/APKBUILD
index c3dbf3d09283..807359cddaca 100644
--- a/community/php7-pecl-timezonedb/APKBUILD
+++ b/community/php7-pecl-timezonedb/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-timezonedb
 _pkgreal=timezonedb
 pkgver=2020.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Timezone Database to be used with PHP's date and time functions."
 url="https://pecl.php.net/package/timezonedb"
 arch="all"
diff --git a/community/php7-pecl-uploadprogress/APKBUILD b/community/php7-pecl-uploadprogress/APKBUILD
index 78cdcf4cdea2..7d24c829b4cd 100644
--- a/community/php7-pecl-uploadprogress/APKBUILD
+++ b/community/php7-pecl-uploadprogress/APKBUILD
@@ -4,7 +4,7 @@
 pkgname=php7-pecl-uploadprogress
 _pkgreal=uploadprogress
 pkgver=1.1.3
-pkgrel=1
+pkgrel=2
 pkgdesc="An extension to track progress of a file upload for PHP"
 url="https://pecl.php.net/package/uploadprogress"
 arch="all"
diff --git a/community/php7-pecl-uuid/APKBUILD b/community/php7-pecl-uuid/APKBUILD
index 09d8a1ecf5ad..0fb9582b5e65 100644
--- a/community/php7-pecl-uuid/APKBUILD
+++ b/community/php7-pecl-uuid/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-uuid
 _pkgreal=uuid
 pkgver=1.1.0
-pkgrel=1
+pkgrel=2
 pkgdesc="A wrapper around libuuid from the ext2utils project."
 url="https://pecl.php.net/package/uuid"
 arch="all"
diff --git a/community/php7-pecl-vips/APKBUILD b/community/php7-pecl-vips/APKBUILD
index 67ab637a20bd..a15ddd5b06b8 100644
--- a/community/php7-pecl-vips/APKBUILD
+++ b/community/php7-pecl-vips/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-vips
 _pkgname=vips
 pkgver=1.0.10
-pkgrel=1
+pkgrel=2
 pkgdesc="PHP extension for interfacing with vips - PECL"
 url="https://pecl.php.net/package/vips"
 arch="all !s390x !ppc64le !mips !mips64" # Limited by vips aport
diff --git a/community/php7-pecl-xdebug/APKBUILD b/community/php7-pecl-xdebug/APKBUILD
index ba3243de9263..5011375355eb 100644
--- a/community/php7-pecl-xdebug/APKBUILD
+++ b/community/php7-pecl-xdebug/APKBUILD
@@ -5,7 +5,7 @@
 pkgname=php7-pecl-xdebug
 _pkgname=xdebug
 pkgver=2.9.6
-pkgrel=0
+pkgrel=1
 pkgdesc="PHP extension that provides functions for function traces and profiling - PECL"
 url="https://pecl.php.net/package/xdebug"
 arch="all"
diff --git a/community/php7-pecl-xhprof/APKBUILD b/community/php7-pecl-xhprof/APKBUILD
index 4121307ae733..b582bc7be38d 100644
--- a/community/php7-pecl-xhprof/APKBUILD
+++ b/community/php7-pecl-xhprof/APKBUILD
@@ -4,7 +4,7 @@
 pkgname=php7-pecl-xhprof
 _pkgreal=xhprof
 pkgver=2.2.0
-pkgrel=0
+pkgrel=1
 pkgdesc="A Hierarchical Profiler for PHP"
 url="https://pecl.php.net/package/xhprof"
 arch="all"
diff --git a/community/php7-pecl-yaml/APKBUILD b/community/php7-pecl-yaml/APKBUILD
index ba148c15c731..6e520f7c2596 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=1
+pkgrel=2
 pkgdesc="YAML syntax bindings for PHP"
 url="https://pecl.php.net/package/yaml"
 arch="all"
diff --git a/community/php7-pecl-zmq/APKBUILD b/community/php7-pecl-zmq/APKBUILD
index 267f804f2047..181a62085ca1 100644
--- a/community/php7-pecl-zmq/APKBUILD
+++ b/community/php7-pecl-zmq/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7-pecl-zmq
 _pkgreal=zmq
 pkgver=1.1.3
-pkgrel=7
+pkgrel=8
 pkgdesc="PHP extension for ZeroMQ - PECL"
 url="https://pecl.php.net/package/zmq"
 arch="all"
@@ -11,7 +11,8 @@ license="PHP-3.01"
 depends="php7-common"
 makedepends="php7-dev zeromq-dev"
 source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz
-	fix-php-7.3-compile.patch"
+	fix-php-7.3-compile.patch
+	fix-php-7.4-compile.patch"
 builddir="$srcdir/$_pkgreal-$pkgver"
 provides="php7-zmq=$pkgver-r$pkgrel" # for backward compatibility
 replaces="php7-zmq" # for backward compatibility
@@ -35,4 +36,5 @@ package() {
 }
 
 sha512sums="0f03016e315a6c6a1e1d6eca1e20564834d2a924cef06af1b38693933f1e5a094c37e9c432705a64f61d95e82655f61358fc7783e7a6f06c7dd9ad84fc6f7bbc  php7-pecl-zmq-1.1.3.tgz
-3fda312b76106a1b78e35ffce3199bf52d040008e5fc9c134dd0b3f4a41ceef8857e8cae10b208dfd9b7394dfea652533a258f523da9b5f870d381bddd780797  fix-php-7.3-compile.patch"
+3fda312b76106a1b78e35ffce3199bf52d040008e5fc9c134dd0b3f4a41ceef8857e8cae10b208dfd9b7394dfea652533a258f523da9b5f870d381bddd780797  fix-php-7.3-compile.patch
+58288af1fd1441491c7f5cc7be967ba8e806a8d80141d4c3699af9a977ede57f3f464922bc218f3aabdce965699fea5a016954ca538f98559553625d33ff2d4f  fix-php-7.4-compile.patch"
diff --git a/community/php7-pecl-zmq/fix-php-7.4-compile.patch b/community/php7-pecl-zmq/fix-php-7.4-compile.patch
new file mode 100644
index 000000000000..965f32a7a728
--- /dev/null
+++ b/community/php7-pecl-zmq/fix-php-7.4-compile.patch
@@ -0,0 +1,261 @@
+From 4ad1b33e095924bd4ccf79295999dd54edaaac37 Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <luca.boccassi@gmail.com>
+Date: Thu, 5 Mar 2020 22:51:22 +0000
+Subject: [PATCH] updates for php7.4 and php8.0 (#212)
+
+* travisci: enabled php7.4 and php8.0
+
+* updates for php7.4 and php8.0
+
+- travisci enabled php7.4 and php8.0
+- removed now unused references to TSRMLS_*
+  These flags were mostly already removed from the
+  php7 codebase but some instances were still present.
+  With php8 these produce compile errors.
+- fix tests for php8 and php7.4
+  New TypeErrors now get handled correctly in the test cases.
+- fix memory corruption in zmq.c
+  The conflicting line causes memory leaks on other php
+  version and causes a segfault on php8 and php7.4
+  The error was provocable with test case
+  021-callbackwarning.phpt. After removing of the line
+  valgrind showed no memory leak, so this line was probably
+  redundant. Also if you compare with zmqsocket constructor
+  this line is also not present.
+---
+ .travis.yml                        |  6 +++---
+ options/sockopts_set.gsl           |  2 +-
+ php_zmq_private.h                  |  4 ++--
+ tests/016-callbackinvalidargs.phpt |  4 ++++
+ tests/021-callbackwarning.phpt     | 22 +++++++++++++++++-----
+ tests/022-highwatermark.phpt       |  6 +++---
+ tests/055-socks-proxy.phpt         |  2 +-
+ tests/bug_gh_43.phpt               | 25 +++++++++++++++++--------
+ zmq.c                              |  1 -
+ zmq_device.c                       | 14 +++++++-------
+ zmq_sockopt.c                      |  2 +-
+ 11 files changed, 56 insertions(+), 32 deletions(-)
+
+diff --git a/php_zmq_private.h b/php_zmq_private.h
+index 49630e9..2e5cd3b 100644
+--- a/php_zmq_private.h
++++ b/php_zmq_private.h
+@@ -156,9 +156,9 @@ typedef struct _php_zmq_device_object  {
+ 
+ #define PHP_ZMQ_ERROR_HANDLING_INIT() zend_error_handling error_handling;
+ 
+-#define PHP_ZMQ_ERROR_HANDLING_THROW() zend_replace_error_handling(EH_THROW, php_zmq_socket_exception_sc_entry, &error_handling TSRMLS_CC);
++#define PHP_ZMQ_ERROR_HANDLING_THROW() zend_replace_error_handling(EH_THROW, php_zmq_socket_exception_sc_entry, &error_handling);
+ 
+-#define PHP_ZMQ_ERROR_HANDLING_RESTORE() zend_restore_error_handling(&error_handling TSRMLS_CC);
++#define PHP_ZMQ_ERROR_HANDLING_RESTORE() zend_restore_error_handling(&error_handling);
+ 
+ /* Compatibility macros between zeromq 2.x and 3.x */
+ #ifndef ZMQ_DONTWAIT
+diff --git a/tests/016-callbackinvalidargs.phpt b/tests/016-callbackinvalidargs.phpt
+index a940e41..6bd0e75 100644
+--- a/tests/016-callbackinvalidargs.phpt
++++ b/tests/016-callbackinvalidargs.phpt
+@@ -10,6 +10,8 @@ try {
+ 	echo "Fail\n";
+ } catch (ZMQSocketException $e) {
+ 	echo "OK\n";
++} catch (TypeError $e) {
++ 	echo "OK\n"; // on PHP8
+ }
+ 
+ try {
+@@ -18,6 +20,8 @@ try {
+ 	echo "Fail\n";
+ } catch (ZMQSocketException $e) {
+ 	echo "OK\n";
++} catch (TypeError $e) {
++ 	echo "OK\n"; // on PHP8
+ }
+ 
+ --EXPECT--
+diff --git a/tests/021-callbackwarning.phpt b/tests/021-callbackwarning.phpt
+index eba2ecf..9e1689f 100644
+--- a/tests/021-callbackwarning.phpt
++++ b/tests/021-callbackwarning.phpt
+@@ -5,13 +5,25 @@ Test warning in callback
+ --FILE--
+ <?php
+ 
++error_reporting(0);
++
+ function generate_warning($a, $b) 
+ {
+ 	in_array(1, 1);
+ }
+ 
+-$socket = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, 'persistent_socket', 'generate_warning');
+-
+---EXPECTF--
+-Warning: in_array() expects parameter 2 to be array, %s given in %s on line %d
+-
++try {
++    $socket = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, 'persistent_socket', 'generate_warning');
++    // on PHP7 and lower
++    $lastError = error_get_last();
++    if(strpos($lastError['message'], 'in_array() expects parameter 2 to be array') !== false)
++     	echo "OK\n";
++    else{
++        echo "FAIL\n";
++        print_r($lastError);
++    }
++}catch(TypeError $e){
++ 	echo "OK\n"; // on PHP8
++}
++--EXPECT--
++OK
+diff --git a/tests/022-highwatermark.phpt b/tests/022-highwatermark.phpt
+index 84be509..c1ff703 100644
+--- a/tests/022-highwatermark.phpt
++++ b/tests/022-highwatermark.phpt
+@@ -1,11 +1,11 @@
+ --TEST--
+ Test that high-watermark works
+ --SKIPIF--
+-<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+-
++<?php
++require_once(dirname(__FILE__) . '/skipif.inc');
+ if (!defined('ZMQ::SOCKOPT_LINGER'))
+     die ("Skip Not compiled against new enough version");
+-
++?>
+ --FILE--
+ <?php
+ 
+diff --git a/tests/bug_gh_43.phpt b/tests/bug_gh_43.phpt
+index bdc274a..923d074 100644
+--- a/tests/bug_gh_43.phpt
++++ b/tests/bug_gh_43.phpt
+@@ -7,16 +7,25 @@ Test for Github issue #43
+ --FILE--
+ <?php
+ 
++error_reporting(0);
++
+ $context = new ZMQContext (1, false);
+ 
+ $sock1 = new ZMQSocket ($context, ZMQ::SOCKET_PUB);
+ $sock2 = new ZMQSocket ($context, ZMQ::SOCKET_SUB);
+ 
+-$device = new ZMQDevice ($sock1, $sock1, $sock1, $sock1);
+-
+-echo "OK";
+-?>
+-
+---EXPECTF--
+-Warning: ZMQDevice::__construct() expects at most 3 parameters, 4 given in %s/bug_gh_43.php on line %d
+-OK
+\ No newline at end of file
++try {
++    $device = new ZMQDevice ($sock1, $sock1, $sock1, $sock1);
++    // on PHP7 and lower
++    $lastError = error_get_last();
++    if(strpos($lastError['message'], 'ZMQDevice::__construct() expects at most 3 parameters, 4 given') !== false)
++     	echo "OK\n";
++    else{
++        echo "FAIL\n";
++        print_r($lastError);
++    }
++}catch(TypeError $e){
++ 	echo "OK\n"; // on PHP8
++}
++--EXPECT--
++OK
+diff --git a/zmq.c b/zmq.c
+index 57ebd11..db9c8f2 100644
+--- a/zmq.c
++++ b/zmq.c
+@@ -687,7 +687,6 @@ PHP_METHOD(zmqcontext, getsocket)
+ 			if (!php_zmq_connect_callback(return_value, &fci, &fci_cache, persistent_id)) {
+ 				php_zmq_socket_destroy(socket);
+ 				interns->socket = NULL;
+-				zval_dtor(return_value);
+ 				return;
+ 			}
+ 		}
+diff --git a/zmq_device.c b/zmq_device.c
+index c7415c1..534f966 100644
+--- a/zmq_device.c
++++ b/zmq_device.c
+@@ -41,7 +41,7 @@
+ ZEND_EXTERN_MODULE_GLOBALS(php_zmq)
+ 
+ static
+-zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts TSRMLS_DC)
++zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts)
+ {
+ 	zend_bool retval = 0;
+ 	zval params[1];
+@@ -59,7 +59,7 @@ zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts TSRML
+ 	if (zend_call_function(&(cb->fci), &(cb->fci_cache)) == FAILURE) {
+ 		if (!EG(exception)) {
+ 			char *func_name = php_zmq_printable_func(&cb->fci, &cb->fci_cache);
+-			zend_throw_exception_ex(php_zmq_device_exception_sc_entry_get (), 0 TSRMLS_CC, "Failed to invoke device callback %s()", func_name);
++			zend_throw_exception_ex(php_zmq_device_exception_sc_entry_get (), 0, "Failed to invoke device callback %s()", func_name);
+ 			zval_ptr_dtor(&params[0]);
+ 			efree(func_name);
+ 		}
+@@ -94,7 +94,7 @@ int s_capture_message (void *socket, zmq_msg_t *msg, int more)
+ }
+ 
+ static
+-int s_calculate_timeout (php_zmq_device_object *intern TSRMLS_DC)
++int s_calculate_timeout (php_zmq_device_object *intern)
+ {
+ 	int timeout = -1;
+ 	uint64_t current = php_zmq_clock (ZMQ_G (clock_ctx));
+@@ -131,7 +131,7 @@ int s_calculate_timeout (php_zmq_device_object *intern TSRMLS_DC)
+ }
+ 
+ 
+-zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
++zend_bool php_zmq_device (php_zmq_device_object *intern)
+ {
+ 	int errno_;
+ 	uint64_t last_message_received;
+@@ -186,7 +186,7 @@ zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
+ 		uint64_t current_ts = 0;
+ 
+ 		/* Calculate poll_timeout based on idle / timer cb */
+-		int timeout = s_calculate_timeout (intern TSRMLS_CC);
++		int timeout = s_calculate_timeout (intern);
+ 
+ 		rc = zmq_poll(&items [0], 2, timeout);
+ 		if (rc < 0) {
+@@ -205,7 +205,7 @@ zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
+ 		if (intern->timer_cb.initialized && intern->timer_cb.timeout > 0) {
+ 			/* Is it timer to call the timer ? */
+ 			if (intern->timer_cb.scheduled_at <= current_ts) {
+-				if (!s_invoke_device_cb (&intern->timer_cb, current_ts TSRMLS_CC)) {
++				if (!s_invoke_device_cb (&intern->timer_cb, current_ts)) {
+ 					zmq_msg_close (&msg);
+ 					return 1;
+ 				}
+@@ -217,7 +217,7 @@ zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
+ 			/* Is it timer to call the idle callback ? */
+ 			if ((current_ts - last_message_received) >= intern->idle_cb.timeout &&
+ 				intern->idle_cb.scheduled_at <= current_ts) {
+-				if (!s_invoke_device_cb (&intern->idle_cb, current_ts TSRMLS_CC)) {
++				if (!s_invoke_device_cb (&intern->idle_cb, current_ts)) {
+ 					zmq_msg_close (&msg);
+ 					return 1;
+ 				}
+diff --git a/zmq_sockopt.c b/zmq_sockopt.c
+index 02cd76d..b0f18cd 100644
+--- a/zmq_sockopt.c
++++ b/zmq_sockopt.c
+@@ -1476,7 +1476,7 @@ PHP_METHOD(zmqsocket, setsockopt)
+     zend_long key;
+     zval *zv;
+ 
+-    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz/", &key, &zv) == FAILURE) {
++    if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz/", &key, &zv) == FAILURE) {
+         return;
+     }
+ 
diff --git a/community/php7-phalcon/APKBUILD b/community/php7-phalcon/APKBUILD
index 798ce0e7bfa7..7a122bcdb5dc 100644
--- a/community/php7-phalcon/APKBUILD
+++ b/community/php7-phalcon/APKBUILD
@@ -5,7 +5,7 @@ _pkgext=phalcon
 _pkgreal=cphalcon
 pkgver=4.0.6
 _pkgver=${pkgver/_rc/RC}
-pkgrel=0
+pkgrel=1
 pkgdesc="High performance, full-stack PHP framework delivered as a C extension"
 url="https://phalcon.io/"
 arch="all"
diff --git a/community/unit/APKBUILD b/community/unit/APKBUILD
index 69ed7d92028b..251ab3f58187 100644
--- a/community/unit/APKBUILD
+++ b/community/unit/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: André Klitzing <aklitzing@gmail.com>
 pkgname=unit
 pkgver=1.18.0
-pkgrel=0
+pkgrel=1
 pkgdesc="NGINX Unit is a dynamic web application server"
 url="https://unit.nginx.org/"
 arch="all"
diff --git a/community/xapian-bindings/APKBUILD b/community/xapian-bindings/APKBUILD
index 4e5f3f020359..49083533e884 100644
--- a/community/xapian-bindings/APKBUILD
+++ b/community/xapian-bindings/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Francesco Colista <fcolista@alpinelinux.org>
 pkgname=xapian-bindings
 pkgver=1.4.16
-pkgrel=0
+pkgrel=1
 pkgdesc="Binding libraries for xapian"
 url="http://www.xapian.org"
 arch="all"
-- 
GitLab