From 8239f89e9a10c67b292076ca2a6a4115f8163938 Mon Sep 17 00:00:00 2001 From: Andy Postnikov <apostnikov@gmail.com> Date: Wed, 10 Aug 2022 02:25:49 +0200 Subject: [PATCH] testing/php82: add patch to display avif codecs --- testing/php82/APKBUILD | 4 +++- testing/php82/phpinfo-avif.patch | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 testing/php82/phpinfo-avif.patch diff --git a/testing/php82/APKBUILD b/testing/php82/APKBUILD index 6a99ee8d1dad..e717a48d4f57 100644 --- a/testing/php82/APKBUILD +++ b/testing/php82/APKBUILD @@ -27,7 +27,7 @@ pkgname=php82 _pkgreal=php pkgver=8.2.0_beta2 _pkgver=${pkgver/_/} -pkgrel=0 +pkgrel=1 _apiver=20210903 _suffix=${pkgname#php} # Is this package the default (latest) PHP version? @@ -109,6 +109,7 @@ source="https://downloads.php.net/~sergey/$_pkgreal-$_pkgver.tar.xz xfail-openssl-1.1-test.patch atomic-lsapi.patch fix-socket-tests.patch + phpinfo-avif.patch " builddir="$srcdir/$_pkgreal-$_pkgver" @@ -644,4 +645,5 @@ f93c6544fe7cc630b72c2315b312e327b39d7a46e9bcd0d00d37d92863dd44c06f96f74539f0ef93 d90e839cfae1cbb42c1dfb0fb73defa55154dbef69bc9a8206e561c2d0ceb43ca778e35dcfa3224570deabe7d59d35dac3f21d0c4bd82ac92cebd5477a30a89d xfail-openssl-1.1-test.patch 465b38c089d938a4a072b2eff3edaf928455bf873f5eeb65ff3bee9614f5f45c70f285abb50809c2e2d9d259395acae38bd649860ca3b8d65e43447082a51552 atomic-lsapi.patch 34aaa0dddbb5aefac283ecc1dc542e63789adb5e517bd329ca1dcc82df11b0f7c983e208a5d657419b219b31a4aa357468ce39dd984eb0be38a41919f174e27f fix-socket-tests.patch +8833c5c6f5225f5e85a9cd842274e4e6b2f55dc572a13bdb3066c624f82c9f39fa07cb2f8f242092ff814f61f0cb8abaa792b1f93c16ad341f1a8dec05a6ca2d phpinfo-avif.patch " diff --git a/testing/php82/phpinfo-avif.patch b/testing/php82/phpinfo-avif.patch new file mode 100644 index 000000000000..b2af4ea8b5bf --- /dev/null +++ b/testing/php82/phpinfo-avif.patch @@ -0,0 +1,30 @@ +Patch-Source: https://github.com/php/php-src/pull/7526 +From d3402bfd3e9a87b1d4ce3785e393e698746c645c Mon Sep 17 00:00:00 2001 +From: Andy Postnikov <apostnikov@gmail.com> +Date: Tue, 28 Sep 2021 23:35:37 +0300 +Subject: [PATCH] display libavif version and codecs via phpinfo() + +--- + ext/gd/gd.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/ext/gd/gd.c b/ext/gd/gd.c +index 880d6dddc7d7..67349e8749bf 100644 +--- a/ext/gd/gd.c ++++ b/ext/gd/gd.c +@@ -455,6 +455,15 @@ + #endif + #ifdef HAVE_GD_AVIF + php_info_print_table_row(2, "AVIF Support", "enabled"); ++#ifdef HAVE_GD_BUNDLED ++#include <avif/avif.h> ++ { ++ php_info_print_table_row(2, "AVIF Version", avifVersion()); ++ char tmp[256]; ++ avifCodecVersions(tmp); ++ php_info_print_table_row(2, "AVIF Codecs", tmp); ++ } ++#endif + #endif + #ifdef HAVE_GD_TGA + php_info_print_table_row(2, "TGA Read Support", "enabled"); -- GitLab