summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2024-04-09 09:08:47 -0400
committerMichael Orlitzky <mjo@gentoo.org>2024-04-09 09:50:55 -0400
commitccc5cdc89ecf3ad501acfa34650e63b3329e18da (patch)
tree59e1413119d8b6549caa94c0fa031653878716e2
parentdev-libs/yyjson: add 0.9.0 (diff)
downloadgentoo-ccc5cdc89ecf3ad501acfa34650e63b3329e18da.tar.gz
gentoo-ccc5cdc89ecf3ad501acfa34650e63b3329e18da.tar.bz2
gentoo-ccc5cdc89ecf3ad501acfa34650e63b3329e18da.zip
dev-lang/php: fix a failing test and a musl compatibility issue
Closes: https://bugs.gentoo.org/927461 Closes: https://bugs.gentoo.org/928072 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
-rw-r--r--dev-lang/php/files/fix-musl-llvm.patch37
-rw-r--r--dev-lang/php/php-8.1.27-r2.ebuild5
-rw-r--r--dev-lang/php/php-8.2.17.ebuild7
-rw-r--r--dev-lang/php/php-8.3.4.ebuild7
4 files changed, 54 insertions, 2 deletions
diff --git a/dev-lang/php/files/fix-musl-llvm.patch b/dev-lang/php/files/fix-musl-llvm.patch
new file mode 100644
index 000000000000..bf299837829c
--- /dev/null
+++ b/dev-lang/php/files/fix-musl-llvm.patch
@@ -0,0 +1,37 @@
+From 684f0d9e5946e92008404b3d5a131edc4f34f7da Mon Sep 17 00:00:00 2001
+From: Arnaud Le Blanc <arnaud.lb@gmail.com>
+Date: Thu, 4 Apr 2024 16:10:28 +0200
+Subject: [PATCH] Fix stream_cookie_seeker signature under musl
+
+---
+ main/streams/cast.c | 10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+diff --git a/main/streams/cast.c b/main/streams/cast.c
+index 3bad65fbac1f5..8d9f4a9d2d54b 100644
+--- a/main/streams/cast.c
++++ b/main/streams/cast.c
+@@ -104,6 +104,9 @@ static ssize_t stream_cookie_writer(void *cookie, const char *buffer, size_t siz
+
+ # ifdef COOKIE_SEEKER_USES_OFF64_T
+ static int stream_cookie_seeker(void *cookie, off64_t *position, int whence)
++# else
++static int stream_cookie_seeker(void *cookie, off_t *position, int whence)
++# endif
+ {
+
+ *position = php_stream_seek((php_stream *)cookie, (zend_off_t)*position, whence);
+@@ -113,13 +116,6 @@ static int stream_cookie_seeker(void *cookie, off64_t *position, int whence)
+ }
+ return 0;
+ }
+-# else
+-static int stream_cookie_seeker(void *cookie, zend_off_t position, int whence)
+-{
+-
+- return php_stream_seek((php_stream *)cookie, position, whence);
+-}
+-# endif
+
+ static int stream_cookie_closer(void *cookie)
+ {
diff --git a/dev-lang/php/php-8.1.27-r2.ebuild b/dev-lang/php/php-8.1.27-r2.ebuild
index 38bbbc21e31c..f434f0df4366 100644
--- a/dev-lang/php/php-8.1.27-r2.ebuild
+++ b/dev-lang/php/php-8.1.27-r2.ebuild
@@ -150,6 +150,7 @@ PATCHES=(
"${FILESDIR}/php-capstone-optional.patch"
"${FILESDIR}/php-8.1.27-gcc14-libxml.patch"
"${FILESDIR}/php-8.1.27-implicit-decls.patch"
+ "${FILESDIR}/fix-musl-llvm.patch"
)
# ARM/Windows functions that are expected to be undefined.
@@ -250,8 +251,8 @@ src_prepare() {
ext/curl/tests/bug77535.phpt \
ext/curl/tests/curl_error_basic.phpt \
ext/session/tests/bug74514.phpt \
- ext/session/tests/bug74936.phpt || die
-
+ ext/session/tests/bug74936.phpt \
+ ext/fileinfo/tests/bug78987.phpt || die
}
src_configure() {
diff --git a/dev-lang/php/php-8.2.17.ebuild b/dev-lang/php/php-8.2.17.ebuild
index f27df005dc4f..abe657f95e1d 100644
--- a/dev-lang/php/php-8.2.17.ebuild
+++ b/dev-lang/php/php-8.2.17.ebuild
@@ -151,6 +151,7 @@ PATCHES=(
"${FILESDIR}/php-capstone-optional.patch"
"${FILESDIR}/php-8.2.8-openssl-tests.patch"
"${FILESDIR}/php-8.1.27-implicit-decls.patch"
+ "${FILESDIR}/fix-musl-llvm.patch"
)
# ARM/Windows functions (bug 923335)
@@ -322,6 +323,12 @@ src_prepare() {
# https://github.com/php/php-src/issues/12801
rm ext/pcre/tests/gh11374.phpt || die
+
+ # This is a memory usage test with hard-coded limits. Whenever the
+ # limits are surpassed... they get increased... but in the meantime,
+ # the tests fail. This is not really a test that end users should
+ # be running pre-install, in my opinion. Bug 927461.
+ rm ext/fileinfo/tests/bug78987.phpt || die
}
src_configure() {
diff --git a/dev-lang/php/php-8.3.4.ebuild b/dev-lang/php/php-8.3.4.ebuild
index f4f263225218..7242d6432c71 100644
--- a/dev-lang/php/php-8.3.4.ebuild
+++ b/dev-lang/php/php-8.3.4.ebuild
@@ -146,6 +146,7 @@ PHP_MV="$(ver_cut 1)"
PATCHES=(
"${FILESDIR}/php-iodbc-header-location.patch"
+ "${FILESDIR}/fix-musl-llvm.patch"
)
# ARM/Windows functions (bug 923335)
@@ -267,6 +268,12 @@ src_prepare() {
# https://github.com/php/php-src/pull/13017
#
rm ext/dom/tests/DOMNode_isEqualNode.phpt || die
+
+ # This is a memory usage test with hard-coded limits. Whenever the
+ # limits are surpassed... they get increased... but in the meantime,
+ # the tests fail. This is not really a test that end users should
+ # be running pre-install, in my opinion. Bug 927461.
+ rm ext/fileinfo/tests/bug78987.phpt || die
}
src_configure() {