git: 91b1d1c5359a - main - archivers/php-lz4: Patch config.m4 to always honor APCU setting
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 08 Jun 2026 19:31:55 UTC
The branch main has been updated by vvd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=91b1d1c5359af6cf62953344d24b4f5ac1ac411e
commit 91b1d1c5359af6cf62953344d24b4f5ac1ac411e
Author: Paavo-Einari Kaipila <pkaipila@gmail.com>
AuthorDate: 2026-06-08 19:30:33 +0000
Commit: Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-06-08 19:31:48 +0000
archivers/php-lz4: Patch config.m4 to always honor APCU setting
PR: 295867
Sponsored by: UNIS Labs
Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>
---
archivers/php-lz4/Makefile | 2 ++
archivers/php-lz4/files/patch-config.m4 | 38 +++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/archivers/php-lz4/Makefile b/archivers/php-lz4/Makefile
index 4f2866ca2092..37e133c8a8cb 100644
--- a/archivers/php-lz4/Makefile
+++ b/archivers/php-lz4/Makefile
@@ -1,5 +1,6 @@
PORTNAME= lz4
DISTVERSION= 0.6.0
+PORTREVISION= 1
CATEGORIES= archivers
PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
@@ -26,5 +27,6 @@ OPTIONS_DEFAULT= APCU
APCU_DESC= APCu cache compression support for objects
APCU_BUILD_DEPENDS= ${LOCALBASE}/include/php/ext/apcu/apc_serializer.h:devel/pecl-APCu@${PHP_FLAVOR}
+APCU_CONFIGURE_ENABLE= apcu
.include <bsd.port.mk>
diff --git a/archivers/php-lz4/files/patch-config.m4 b/archivers/php-lz4/files/patch-config.m4
new file mode 100644
index 000000000000..0eea252eb5c6
--- /dev/null
+++ b/archivers/php-lz4/files/patch-config.m4
@@ -0,0 +1,38 @@
+--- config.m4.orig 2025-11-07 02:17:19 UTC
++++ config.m4
+@@ -27,6 +27,9 @@ PHP_ARG_WITH(lz4-includedir, for lz4 header,
+ PHP_ARG_WITH(lz4-includedir, for lz4 header,
+ [ --with-lz4-includedir=DIR lz4 header files], no, no)
+
++PHP_ARG_ENABLE(apcu, whether to enable APCu support,
++[ --enable-apcu Enable APCu support], auto, no)
++
+ if test "$PHP_LZ4" != "no"; then
+
+ AC_MSG_CHECKING([searching for liblz4])
+@@ -65,13 +68,18 @@ if test "$PHP_LZ4" != "no"; then
+ PHP_ADD_INCLUDE([$ext_srcdir/lz4/lib])
+ fi
+
+- AC_MSG_CHECKING([for APCu includes])
+- if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then
+- apc_inc_path="$phpincludedir"
+- AC_MSG_RESULT([APCu in $apc_inc_path])
+- AC_DEFINE(HAVE_APCU_SUPPORT,1,[Whether to enable APCu support])
+- else
+- AC_MSG_RESULT([not found])
++ if test "$PHP_APCU" != "no"; then
++ AC_MSG_CHECKING([for APCu includes])
++ if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then
++ apc_inc_path="$phpincludedir"
++ AC_MSG_RESULT([APCu in $apc_inc_path])
++ AC_DEFINE(HAVE_APCU_SUPPORT, 1, [Whether to enable APCu support])
++ else
++ if test "$PHP_APCU" != "auto"; then
++ AC_MSG_ERROR([apc_serializer.h header not found])
++ fi
++ AC_MSG_RESULT([not found])
++ fi
+ fi
+ fi
+