diff --git a/net/pecl-oauth2/Makefile b/net/pecl-oauth2/Makefile index 156b3076f598..0597bdd795fa 100644 --- a/net/pecl-oauth2/Makefile +++ b/net/pecl-oauth2/Makefile @@ -1,24 +1,23 @@ PORTNAME= oauth PORTVERSION= 2.0.7 CATEGORIES= net pear MAINTAINER= dbaio@FreeBSD.org COMMENT= Php interface to the OAuth Protocol WWW= https://pecl.php.net/package/oauth LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libcurl.so:ftp/curl \ libpcre.so:devel/pcre USES= localbase:ldflags php:pecl -IGNORE_WITH_PHP= 84 CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CONFLICTS= pecl-oauth-1* PORTSCOUT= limit:^2.* .include diff --git a/net/pecl-oauth2/files/patch-php__oauth.h b/net/pecl-oauth2/files/patch-php__oauth.h new file mode 100644 index 000000000000..8dc2afd70a86 --- /dev/null +++ b/net/pecl-oauth2/files/patch-php__oauth.h @@ -0,0 +1,22 @@ +--- php_oauth.h.orig 2024-08-03 14:03:00 UTC ++++ php_oauth.h +@@ -29,7 +29,11 @@ + #include "php_main.h" + #include "php_ini.h" + #include "ext/standard/php_string.h" ++#if PHP_VERSION_ID <= 80300 + #include "ext/standard/php_rand.h" ++#else ++#include "ext/random/php_random.h" ++#endif + #include "ext/standard/php_smart_string.h" + #include "ext/standard/info.h" + #include "ext/standard/php_string.h" +@@ -41,7 +45,6 @@ + #include "php_globals.h" + #include "ext/standard/file.h" + #include "ext/standard/base64.h" +-#include "ext/standard/php_lcg.h" + #include "ext/pcre/php_pcre.h" + #include "php_network.h" + diff --git a/net/pecl-oauth2/files/patch-provider.c b/net/pecl-oauth2/files/patch-provider.c new file mode 100644 index 000000000000..3a0c0b10c9d2 --- /dev/null +++ b/net/pecl-oauth2/files/patch-provider.c @@ -0,0 +1,12 @@ +--- provider.c.orig 2024-08-03 14:10:13 UTC ++++ provider.c +@@ -236,7 +236,9 @@ static int oauth_provider_parse_auth_header(php_oauth_ + &return_value, + &subpats, + 1, /* global */ ++#if PHP_VERSION_ID <= 80300 + 1, /* use flags */ ++#endif + 2, /* PREG_SET_ORDER */ + 0 + );