git: 906e82b4032d - main - www/pecl-yaf: Fix build with php84
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Jul 2024 19:05:03 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=906e82b4032d321d5d8804530d99050a77e75c14 commit 906e82b4032d321d5d8804530d99050a77e75c14 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-07-29 19:03:02 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-07-29 19:03:02 +0000 www/pecl-yaf: Fix build with php84 Obtained from: https://github.com/laruence/yaf/commit/b1d252c944a8d70f0dc28415b3d67a7b3bbbf7ce --- www/pecl-yaf/Makefile | 1 - www/pecl-yaf/files/patch-php84 | 46 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/www/pecl-yaf/Makefile b/www/pecl-yaf/Makefile index 0adefd87ff3f..79d1feb3f156 100644 --- a/www/pecl-yaf/Makefile +++ b/www/pecl-yaf/Makefile @@ -13,6 +13,5 @@ LICENSE_FILE= ${WRKSRC}/LICENSE USES= localbase php:pecl CFLAGS+= -DZEND_HOT= -IGNORE_WITH_PHP=84 .include <bsd.port.mk> diff --git a/www/pecl-yaf/files/patch-php84 b/www/pecl-yaf/files/patch-php84 new file mode 100644 index 000000000000..424a5fdd2554 --- /dev/null +++ b/www/pecl-yaf/files/patch-php84 @@ -0,0 +1,46 @@ +Obtained from: https://github.com/laruence/yaf/commit/b1d252c944a8d70f0dc28415b3d67a7b3bbbf7ce + +--- routes/yaf_route_regex.c.orig 2024-06-25 03:13:57 UTC ++++ routes/yaf_route_regex.c +@@ -204,11 +204,18 @@ static int yaf_route_regex_match(yaf_route_regex_objec + #if PHP_VERSION_ID < 70400 + php_pcre_match_impl(pce_regexp, (char*)uri, len, &matches, &subparts /* subpats */, + 0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */); +-#else ++#elif PHP_VERSION_ID < 80400 + { + zend_string *tmp = zend_string_init(uri, len, 0); + php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */, + 0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */); ++ zend_string_release(tmp); ++ } ++#else ++ { ++ zend_string *tmp = zend_string_init(uri, len, 0); ++ php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */, ++ 0/* global */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */); + zend_string_release(tmp); + } + #endif +--- routes/yaf_route_rewrite.c.orig 2024-06-25 03:13:57 UTC ++++ routes/yaf_route_rewrite.c +@@ -209,11 +209,18 @@ static int yaf_route_rewrite_match(yaf_route_rewrite_o + #if PHP_VERSION_ID < 70400 + php_pcre_match_impl(pce_regexp, (char*)uri, len, &matches, &subparts /* subpats */, + 0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */); +-#else ++#elif PHP_VERSION_ID <80400 + { + zend_string *tmp = zend_string_init(uri, len, 0); + php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */, + 0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */); ++ zend_string_release(tmp); ++ } ++#else ++ { ++ zend_string *tmp = zend_string_init(uri, len, 0); ++ php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */, ++ 0/* global */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */); + zend_string_release(tmp); + } + #endif