git: 6ecf81cce570 - main - net/pecl-radius: Fix build with php84

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 29 Jul 2024 19:05:02 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6ecf81cce570592bc1ad0f9910d6390c0463148d

commit 6ecf81cce570592bc1ad0f9910d6390c0463148d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-07-29 19:02:58 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-07-29 19:02:58 +0000

    net/pecl-radius: Fix build with php84
---
 net/pecl-radius/Makefile          |  1 -
 net/pecl-radius/files/patch-php84 | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/net/pecl-radius/Makefile b/net/pecl-radius/Makefile
index f31abe723fac..782f1c9ed3b2 100644
--- a/net/pecl-radius/Makefile
+++ b/net/pecl-radius/Makefile
@@ -13,7 +13,6 @@ LICENSE=	BSD3CLAUSE
 USES=		php:pecl
 
 CONFIGURE_ARGS=	--enable-radius
-IGNORE_WITH_PHP=84
 
 OPTIONS_DEFINE=	EXAMPLES
 
diff --git a/net/pecl-radius/files/patch-php84 b/net/pecl-radius/files/patch-php84
new file mode 100644
index 000000000000..c9aaa61bc046
--- /dev/null
+++ b/net/pecl-radius/files/patch-php84
@@ -0,0 +1,14 @@
+--- radlib_compat.h.orig	2016-02-15 15:11:50 UTC
++++ radlib_compat.h
+@@ -39,7 +39,11 @@ any other GPL-like (LGPL, GPL2) License.
+ #endif
+ 
+ #include "php.h"
++#if PHP_VERSION_ID >= 80400
++#include "ext/random/php_random.h"
++#else
+ #include "ext/standard/php_rand.h"
++#endif
+ #include "ext/standard/php_standard.h"
+ 
+ #define MPPE_KEY_LEN    16