summaryrefslogtreecommitdiff
path: root/databases/pecl-memcache
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--databases/pecl-memcache/Makefile14
-rw-r--r--databases/pecl-memcache/files/patch-php8555
-rw-r--r--databases/pecl-memcached/Makefile10
-rw-r--r--databases/pecl-memcached/files/patch-php8514
4 files changed, 71 insertions, 22 deletions
diff --git a/databases/pecl-memcache/Makefile b/databases/pecl-memcache/Makefile
index 9b32402ee944..4e9a9a40171c 100644
--- a/databases/pecl-memcache/Makefile
+++ b/databases/pecl-memcache/Makefile
@@ -18,20 +18,8 @@ USE_CSTD= gnu89
OPTIONS_DEFINE= EXAMPLES
-.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}/src/memcache_ascii_protocol.c \
- ${WRKSRC}/src/memcache_binary_protocol.c \
- ${WRKSRC}/src/memcache_session.c \
- ${WRKSRC}/src/memcache_pool.c \
- ${WRKSRC}/src/memcache_pool.h
-.endif
-
post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
${INSTALL_DATA} ${WRKSRC}/example.php ${STAGEDIR}${EXAMPLESDIR}/
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/databases/pecl-memcache/files/patch-php85 b/databases/pecl-memcache/files/patch-php85
new file mode 100644
index 000000000000..8f1f700e8dc3
--- /dev/null
+++ b/databases/pecl-memcache/files/patch-php85
@@ -0,0 +1,55 @@
+--- src/memcache_ascii_protocol.c.orig 2023-04-30 11:27:52 UTC
++++ src/memcache_ascii_protocol.c
+@@ -24,7 +24,7 @@
+ #endif
+
+ #include "memcache_pool.h"
+-#include "ext/standard/php_smart_string.h"
++#include "Zend/zend_smart_string.h"
+
+ typedef struct mmc_ascii_request {
+ mmc_request_t base; /* enable cast to mmc_request_t */
+--- src/memcache_binary_protocol.c.orig 2023-04-30 11:27:52 UTC
++++ src/memcache_binary_protocol.c
+@@ -34,7 +34,7 @@
+ #include <netinet/in.h>
+ #endif
+ #include "memcache_pool.h"
+-#include "ext/standard/php_smart_string.h"
++#include "Zend/zend_smart_string.h"
+
+ #ifdef htonll
+ #undef htonll
+--- src/memcache_pool.c.orig 2023-04-30 11:27:52 UTC
++++ src/memcache_pool.c
+@@ -35,7 +35,7 @@
+ #include "ext/standard/crc32.h"
+ #include "ext/standard/php_var.h"
+ #include "ext/standard/php_string.h"
+-#include "ext/standard/php_smart_string.h"
++#include "Zend/zend_smart_string.h"
+ #include "zend_smart_str.h"
+ #include "memcache_pool.h"
+
+--- src/memcache_pool.h.orig 2023-04-30 11:27:52 UTC
++++ src/memcache_pool.h
+@@ -42,7 +42,7 @@
+ #include <string.h>
+
+ #include "php.h"
+-#include "ext/standard/php_smart_string_public.h"
++#include "Zend/zend_smart_string_public.h"
+ #include "memcache_queue.h"
+
+ /*
+--- src/memcache_session.c.orig 2023-04-30 11:27:52 UTC
++++ src/memcache_session.c
+@@ -29,7 +29,7 @@
+ #include "php_variables.h"
+
+ #include "SAPI.h"
+-#include "ext/standard/php_smart_string.h"
++#include "Zend/zend_smart_string.h"
+ #include "ext/standard/url.h"
+ #include "ext/session/php_session.h"
+ #ifdef PHP_WIN32
diff --git a/databases/pecl-memcached/Makefile b/databases/pecl-memcached/Makefile
index e5e1c231e375..3154396d3b6b 100644
--- a/databases/pecl-memcached/Makefile
+++ b/databases/pecl-memcached/Makefile
@@ -35,12 +35,4 @@ SASL_CONFIGURE_ENABLE= memcached-sasl
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
-.include <bsd.port.pre.mk>
-
-post-patch:
-.if ${PHP_VER} >= 85
- @${REINPLACE_CMD} -e 's|ext/standard/php_smart_string.h|Zend/zend_smart_string.h|' \
- ${WRKSRC}/php_memcached_private.h
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/databases/pecl-memcached/files/patch-php85 b/databases/pecl-memcached/files/patch-php85
index 0262a948c7f6..4860955286e7 100644
--- a/databases/pecl-memcached/files/patch-php85
+++ b/databases/pecl-memcached/files/patch-php85
@@ -1,3 +1,6 @@
+Obtained from: https://github.com/php-memcached-dev/php-memcached/commit/bb83855d1874d1741ec51277f2ed496a476d35ff
+ https://github.com/php-memcached-dev/php-memcached/commit/de7d53d13aecd329f03eab2eaf51c1ad8fa5c18f
+
--- php_memcached.c.orig 2024-10-17 17:34:21 UTC
+++ php_memcached.c
@@ -3961,7 +3961,7 @@ zend_class_entry *php_memc_get_exception_base(int root
@@ -9,3 +12,14 @@
}
+--- php_memcached_private.h.orig 2024-10-17 17:34:21 UTC
++++ php_memcached_private.h
+@@ -43,7 +43,7 @@
+ #include <ext/standard/info.h>
+ #include <zend_extensions.h>
+ #include <zend_exceptions.h>
+-#include <ext/standard/php_smart_string.h>
++#include <Zend/zend_smart_string.h>
+ #include <ext/standard/php_var.h>
+ #include <ext/standard/basic_functions.h>
+