aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2023-03-24 22:22:15 +0100
committerAndy Postnikov <apostnikov@gmail.com>2023-03-26 14:14:44 +0000
commit4d6e1a6ad45b9aa08f6eeba02c6423ce869c83ee (patch)
treec8bc07010d2e30858e378a393ac9844643c610eb
parent6b0ee34bea5e1b34a09a6cbbdeebc1ecda16b736 (diff)
community/php82: modernize
- remove _mv in favour of amove, fpm/status.html moved to share - as clang16 is the default added -Wno-error=implicit-function-declaration https://github.com/php/php-src/issues/10947
-rw-r--r--community/php82/APKBUILD64
-rw-r--r--community/php82/disabled-tests.list5
-rw-r--r--community/php82/xfail-openssl-1.1-test.patch13
3 files changed, 25 insertions, 57 deletions
diff --git a/community/php82/APKBUILD b/community/php82/APKBUILD
index b3e1e6a342b..7b19995b56f 100644
--- a/community/php82/APKBUILD
+++ b/community/php82/APKBUILD
@@ -27,7 +27,7 @@
pkgname=php82
_pkgreal=php
pkgver=8.2.4
-pkgrel=0
+pkgrel=1
_apiver=20220829
_suffix=${pkgname#php}
# Is this package the default (latest) PHP version?
@@ -107,7 +107,6 @@ source="https://php.net/distributions/$_pkgreal-$pkgver.tar.xz
sharedir.patch
$pkgname-fpm-version-suffix.patch
fix-tests-devserver.patch
- xfail-openssl-1.1-test.patch
phpinfo-avif.patch
"
builddir="$srcdir/$_pkgreal-${pkgver}"
@@ -231,8 +230,11 @@ prepare() {
# * -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 (https://www.php.net/manual/en/intro.filesystem.php andypost)
# * -O2 optimize for apps usage (andypost)
_build() {
- export CFLAGS="${CFLAGS/-Os/-O2} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- export CXXFLAGS="${CXXFLAGS/-Os/-O2} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ # clang16 https://github.com/php/php-src/issues/10947
+ local _warnings='-Wno-error=implicit-function-declaration'
+ local _extra='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+ export CFLAGS="${CFLAGS/-Os/-O2} $_warnings $_extra"
+ export CXXFLAGS="${CXXFLAGS/-Os/-O2} $_warnings $_extra"
local without_pcre_jit
[ "$CARCH" = "s390x" ] && without_pcre_jit="--without-pcre-jit"
@@ -412,13 +414,10 @@ dev() {
replaces="php-dev"
depends="$depends"
- cd "$pkgdir"
-
- _mv usr/bin/php-config$_suffix \
+ amove \
+ usr/bin/php-config$_suffix \
usr/bin/phpize$_suffix \
- "$subpkgdir"/usr/bin/
-
- _mv ./$_libdir/build "$subpkgdir"/$_libdir/
+ $_libdir/build
if [ "$_default_php" = yes ]; then
ln -s phpize$_suffix "$subpkgdir"/usr/bin/phpize
@@ -472,8 +471,7 @@ litespeed() {
pkgdesc="PHP$_suffix LiteSpeed SAPI"
provides="php-lightspeed"
- mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/lsphp$_suffix "$subpkgdir"/usr/bin
+ amove usr/bin/lsphp$_suffix
if [ "$_default_php" = yes ]; then
ln -s lsphp$_suffix "$subpkgdir"/usr/bin/lsphp
@@ -484,7 +482,7 @@ cgi() {
pkgdesc="PHP$_suffix Common Gateway Interface"
provides="php-cgi"
- _mv "$pkgdir"/usr/bin/php-cgi$_suffix "$subpkgdir"/usr/bin/
+ amove usr/bin/php-cgi$_suffix
if [ "$_default_php" = yes ]; then
ln -s php-cgi$_suffix "$subpkgdir"/usr/bin/php-cgi
@@ -495,12 +493,8 @@ fpm() {
pkgdesc="PHP$_suffix FastCGI Process Manager"
provides="php-fpm"
- cd "$pkgdir"
-
- _mv var "$subpkgdir"/
- _mv usr/share/$pkgname/fpm "$subpkgdir"/var/lib/$pkgname/
- _mv usr/sbin "$subpkgdir"/usr/
- _mv etc/$pkgname/php-fpm* "$subpkgdir"/etc/$pkgname/
+ amove etc/$pkgname/php-fpm* usr/sbin var
+ amove usr/share/$pkgname/fpm
local file; for file in php-fpm.conf php-fpm.d/www.conf; do
mv "$subpkgdir"/etc/$pkgname/$file.default \
@@ -521,18 +515,15 @@ pear() {
depends="$pkgname $pkgname-xml"
provides="php-pear"
- cd "$pkgdir"
-
mkdir -p "$subpkgdir"/usr/bin
local file; for file in pecl pear peardev; do
- mv usr/bin/$file "$subpkgdir"/usr/bin/$file$_suffix
+ mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/$file$_suffix
if [ "$_default_php" = yes ]; then
ln -s $file$_suffix "$subpkgdir"/usr/bin/$file
fi
done
- _mv etc/$pkgname/pear.conf "$subpkgdir"/etc/$pkgname/
- _mv usr/share "$subpkgdir"/usr/
+ amove etc/$pkgname/pear.conf usr/share
}
common() {
@@ -540,22 +531,17 @@ common() {
provides="php-common $pkgname-zlib php-zlib $pkgname-json php-json" # for backward compatibility
depends=""
- cd "$pkgdir"
-
- _mv usr/lib "$subpkgdir"/usr/
- _mv etc "$subpkgdir"/
- mkdir -p "$subpkgdir"/$_extension_confd
+ amove etc
+ mkdir -p "$subpkgdir"/$_extension_confd "$subpkgdir"/$_extension_dir
}
phar() {
_extension
- cd "$pkgdir"
-
mkdir -p "$subpkgdir"/usr/bin
- mv usr/bin/phar$_suffix.phar "$subpkgdir"/usr/bin/phar.phar$_suffix
+ mv "$pkgdir"/usr/bin/phar$_suffix.phar "$subpkgdir"/usr/bin/phar.phar$_suffix
- rm usr/bin/phar$_suffix
+ rm "$pkgdir"/usr/bin/phar$_suffix
ln -s phar.phar$_suffix "$subpkgdir"/usr/bin/phar$_suffix
if [ "$_default_php" = yes ]; then
@@ -580,8 +566,7 @@ _extension() {
local prefix=
[ "$extname" != "opcache" ] || prefix="zend_"
- _mv "$pkgdir"/$_extension_dir/$extname.so \
- "$subpkgdir"/$_extension_dir/
+ amove $_extension_dir/$extname.so
mkdir -p "$subpkgdir"/$_extension_confd
echo "${prefix}extension=$extname" \
@@ -633,18 +618,12 @@ _extensions_by_load_order() {
printf '%s\n' $list | sort -t ';' -k 1 | sed -E 's/\d+;//'
}
-_mv() {
- local dest; for dest; do true; done # get last argument
- mkdir -p "$dest"
- mv "$@"
-}
-
sha512sums="
997435f3f921f305147a520497c68031aad6d1212365ddf04674d919fd2787d169d2898536a59709b5530857c5746a25cf43e726a2c3a30bcf3372107b2cd388 php-8.2.4.tar.xz
65bd907ea11e12efff1c06b86609a2acaecaac2c49caa087ef9529d26d89891fcad1c49a4faa494ba0aab1683abf56cc2e45d9727a50aa2dc16369425974bf51 php82-fpm.initd
29dc69d06c25ecc194b617e9af7c42fbdbe634a8312a5c6a1ab8e2d582cb64ed2f53308eeaa45dcf71b7f5618e6ef3e9d8a9d6932685e0d8af86203f43481bd9 php82-fpm.logrotate
504f0e4aca2dfd36f428006fe6442557e99f8608f683467ae95519b5219208951bf3ba7223af69728a4e055110f5e491ea4b484db2f696410ce35f4999a8481a php82-module.conf
-e576ffdd8d5bfa3a22780ef9e781b90f2a62d8cae30bd32cd3e90c7ebbb9830bea570c50a987039c64ecf48b56f0d3fdf4f1e89516eb8b79a9aaee575a1f6de1 disabled-tests.list
+025a09a0c04e3c3cc9afff6df90dc3b16cba2286ac4dd6fedf1ab582962f5df08ca38d16ee421b40431b10bf167963deb5392c550e3cac6838348b83dd61e1b1 disabled-tests.list
08fa95fb741d2017f41bf36fd32ad02e6076cde806a7035e8e324b4ba3147bc6b96e124e662a87ff62bd1d33b5be1739e5a839e2023ef0da9e08bd6393a5a53c disabled-tests.x86.list
30cba10c11f800d23e013c7f92cadb7e2a9ac5e89e5466445c77761369e7f3b8daba7ae64e23967329139b01f37f187acd2f1f1e3dfb0bca2e900a7d7e1afd07 disabled-tests.ppc64le.list
ec206639d076ddac6c2d1db697a5428ed3be979157db39417af7fbe6ab837e8dc00315ae0e55aea4f92f45ca5827c88cc4933099fad9c962f029ca81bef779d7 install-pear.patch
@@ -652,6 +631,5 @@ f93c6544fe7cc630b72c2315b312e327b39d7a46e9bcd0d00d37d92863dd44c06f96f74539f0ef93
8fb98b369b522eb2d5b0735773343e5ca31bcdf422cba0dc0c014d57e63de0f8c746c8b4cedcfa874aa053488ec8642a84771aad16eeee50b1bfd84343f37c05 sharedir.patch
804f376d3a58318edc792ab0f898bf9f2f719dd56c16dbac21e0ea020b32556ef3283a7c14ea5a2791594af0c1b96ae99906033fc947feea340ab04b95626c68 php82-fpm-version-suffix.patch
1b64a7cef9e81387f955cb60ffa4e3d2277b4f6072e9328d779c0d447c202c8ee9dff0d8d8c34abc82c150311f51c4e9316a3b72a383ca6c9a6e683bc5b349a0 fix-tests-devserver.patch
-d90e839cfae1cbb42c1dfb0fb73defa55154dbef69bc9a8206e561c2d0ceb43ca778e35dcfa3224570deabe7d59d35dac3f21d0c4bd82ac92cebd5477a30a89d xfail-openssl-1.1-test.patch
8833c5c6f5225f5e85a9cd842274e4e6b2f55dc572a13bdb3066c624f82c9f39fa07cb2f8f242092ff814f61f0cb8abaa792b1f93c16ad341f1a8dec05a6ca2d phpinfo-avif.patch
"
diff --git a/community/php82/disabled-tests.list b/community/php82/disabled-tests.list
index befe71b53bc..4886c2e2057 100644
--- a/community/php82/disabled-tests.list
+++ b/community/php82/disabled-tests.list
@@ -163,5 +163,8 @@ ext/sockets/tests/socket_tcp_congestion.phpt
# needs root
ext/pcntl/tests/pcntl_setpriority_error_linux.phpt
-# fails since RC1
+# fails since 8.2 RC1
ext/openssl/tests/gh9310.phpt
+
+# openssl 1 and unstable
+ext/openssl/tests/openssl_error_string_basic.phpt
diff --git a/community/php82/xfail-openssl-1.1-test.patch b/community/php82/xfail-openssl-1.1-test.patch
deleted file mode 100644
index 18fefe64796..00000000000
--- a/community/php82/xfail-openssl-1.1-test.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/ext/openssl/tests/openssl_error_string_basic.phpt b/ext/openssl/tests/openssl_error_string_basic.phpt
-index e4ea264b3b..fd1f7ef9d3 100644
---- a/ext/openssl/tests/openssl_error_string_basic.phpt
-+++ b/ext/openssl/tests/openssl_error_string_basic.phpt
-@@ -6,6 +6,8 @@ openssl
- <?php
- if (OPENSSL_VERSION_NUMBER >= 0x30000000) die('skip For OpenSSL < 3.0');
- ?>
-+--XFAIL--
-+Somehow unstable
- --FILE--
- <?php
- // helper function to check openssl errors