summaryrefslogtreecommitdiff
path: root/archivers/pecl-zstd
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/pecl-zstd')
-rw-r--r--archivers/pecl-zstd/Makefile8
-rw-r--r--archivers/pecl-zstd/files/patch-php8516
2 files changed, 17 insertions, 7 deletions
diff --git a/archivers/pecl-zstd/Makefile b/archivers/pecl-zstd/Makefile
index 33c5604734e7..055445f91d60 100644
--- a/archivers/pecl-zstd/Makefile
+++ b/archivers/pecl-zstd/Makefile
@@ -16,14 +16,8 @@ USES= php:pecl pkgconfig
CONFIGURE_ARGS= --with-libzstd
-.include <bsd.port.pre.mk>
-
post-patch:
-.if ${PHP_VER} >= 85
- ${REINPLACE_CMD} -e 's|ext/standard/php_smart_string|Zend/zend_smart_string|' \
- ${WRKSRC}/zstd.c
-.endif
# Clean up bundled libraries
@${RM} -r ${WRKSRC}/zstd/
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/archivers/pecl-zstd/files/patch-php85 b/archivers/pecl-zstd/files/patch-php85
new file mode 100644
index 000000000000..2fc932c491fa
--- /dev/null
+++ b/archivers/pecl-zstd/files/patch-php85
@@ -0,0 +1,16 @@
+Obtained from: https://github.com/kjdev/php-ext-zstd/commit/e061583361d4d4167a86dccda385b2944946a09e
+
+--- zstd.c.orig 2024-11-05 21:49:34 UTC
++++ zstd.c
+@@ -30,7 +30,11 @@
+ #include <php_ini.h>
+ #include <ext/standard/file.h>
+ #include <ext/standard/info.h>
++#if PHP_VERSION_ID < 70200
+ #include <ext/standard/php_smart_string.h>
++#else
++#include "Zend/zend_smart_string.h"
++#endif
+ #if defined(HAVE_APCU_SUPPORT)
+ #include <ext/standard/php_var.h>
+ #include <ext/apcu/apc_serializer.h>