git: 00b411fc8b19 - main - */*: Cleanup php NOOP codes

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 12 Nov 2023 19:23:12 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=00b411fc8b1991da755d79d373ef86ad1f10d68f

commit 00b411fc8b1991da755d79d373ef86ad1f10d68f
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-11-12 17:07:33 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-11-12 19:23:01 +0000

    */*: Cleanup php NOOP codes
    
    There are some php modules which are by default installed and/or
    statically linked in the default PHP installations and has no effect if
    mentioned through USE_PHP. Remove those codes.
    
    Also add comment for these cases like which extensions are required for
    future references.
    
    Approved by:    portmgr (blanket)
---
 net-mgmt/icingaweb2-module-icingadb/Makefile | 3 ++-
 net-mgmt/librenms/Makefile                   | 5 +++--
 www/piwigo/Makefile                          | 5 +++--
 www/suitecrm/Makefile                        | 5 +++--
 www/thundersnarf/Makefile                    | 3 ++-
 www/tt-rss/Makefile                          | 4 ++--
 www/typo3-12/Makefile                        | 3 ++-
 www/webtrees21/Makefile                      | 4 ++--
 8 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/net-mgmt/icingaweb2-module-icingadb/Makefile b/net-mgmt/icingaweb2-module-icingadb/Makefile
index 0262f29fa377..7ad874342b5d 100644
--- a/net-mgmt/icingaweb2-module-icingadb/Makefile
+++ b/net-mgmt/icingaweb2-module-icingadb/Makefile
@@ -17,7 +17,8 @@ RUN_DEPENDS=	icinga-php-library${PHP_PKGNAMESUFFIX}>=0.9:net-mgmt/icinga-php-lib
 		icingaweb2${PHP_PKGNAMESUFFIX}>=2.9:net-mgmt/icingaweb2
 
 USES=		php:web,flavors shebangfix
-USE_PHP=	curl dom json xml
+# php json extension is required but it's statically linked in default php
+USE_PHP=	curl dom xml
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	icinga
diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile
index 755e453cdcb2..3a57133da13a 100644
--- a/net-mgmt/librenms/Makefile
+++ b/net-mgmt/librenms/Makefile
@@ -23,8 +23,9 @@ RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}pymysql>0:databases/py-pymysql@${PY_FLAVOR}
 
 USES=		cpe php python shebangfix
 USE_GITHUB=	yes
-USE_PHP=	ctype curl dom fileinfo filter gd hash json ldap mbstring \
-		mysqli openssl pdo pdo_mysql phar posix session simplexml snmp \
+# php hash/json/openssl extension is required but it's statically linked in default php
+USE_PHP=	ctype curl dom fileinfo filter gd ldap mbstring \
+		mysqli pdo pdo_mysql phar posix session simplexml snmp \
 		sockets tokenizer xml xmlwriter zip zlib
 USE_RC_SUBR=	librenms
 
diff --git a/www/piwigo/Makefile b/www/piwigo/Makefile
index b827ae504611..bd136934f6d3 100644
--- a/www/piwigo/Makefile
+++ b/www/piwigo/Makefile
@@ -13,8 +13,9 @@ LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/doc/COPYING
 
 USES=		cpe php:web,flavors zip
-USE_PHP=	ctype dom exif filter gd hash iconv json mbstring mysqli \
-		openssl pcre pdo session simplexml sodium spl tokenizer \
+# php hash/json/openssl/pcre/spl extension is required but it's statically linked in default php
+USE_PHP=	ctype dom exif filter gd iconv mbstring mysqli \
+		pdo session simplexml sodium tokenizer \
 		xml zip zlib
 # sodium is needed for randomisation stuff (prefferred option),
 # 	could be replaced by mcrypt
diff --git a/www/suitecrm/Makefile b/www/suitecrm/Makefile
index ab9753f86c0c..15b2e999c165 100644
--- a/www/suitecrm/Makefile
+++ b/www/suitecrm/Makefile
@@ -11,8 +11,9 @@ LICENSE=	AGPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 USES=		php zip
-USE_PHP=	curl ctype dom filter gd imap json mysqli pcre pdo posix \
-		session spl tokenizer xml mbstring zip zlib
+# php json/pcre/spl extension is required but it's statically linked in default php
+USE_PHP=	curl ctype dom filter gd imap mysqli pdo posix \
+		session tokenizer xml mbstring zip zlib
 NO_BUILD=	yes
 
 WRKSRC=		${WRKDIR}/SuiteCRM-${PORTVERSION}
diff --git a/www/thundersnarf/Makefile b/www/thundersnarf/Makefile
index e07a14b78599..ad9ec730f645 100644
--- a/www/thundersnarf/Makefile
+++ b/www/thundersnarf/Makefile
@@ -38,7 +38,8 @@ WANT_PGSQL=	server
 .endif
 
 .if ${PORT_OPTIONS:MPHP}
-USE_PHP+=	curl bcmath pdo mcrypt session pgsql spl dom xmlrpc ctype simplexml soap
+# php spl extension is required but it's statically linked in default php
+USE_PHP+=	curl bcmath pdo mcrypt session pgsql dom xmlrpc ctype simplexml soap
 .  if ${PORT_OPTIONS:MPGSQL}
 USE_PHP+=	pdo_pgsql pgsql
 .  endif
diff --git a/www/tt-rss/Makefile b/www/tt-rss/Makefile
index 2c90195a6779..9985bd19a269 100644
--- a/www/tt-rss/Makefile
+++ b/www/tt-rss/Makefile
@@ -16,8 +16,8 @@ USES=		gettext-tools php:cli,web shebangfix
 USE_GITLAB=	yes
 GL_SITE=	https://gitlab.tt-rss.org
 GL_TAGNAME=	c779e2ba0d71942579dd27ccdcad0295bd06e45f
-
-USE_PHP=	ctype dom exif fileinfo filter iconv intl json mbstring openssl \
+# phe json/openssl extension is required but it's statically linked in default php
+USE_PHP=	ctype dom exif fileinfo filter iconv intl mbstring \
 		pcntl pdo phar posix session simplexml sockets tokenizer xml \
 		xmlwriter zip
 USE_RC_SUBR=	ttrssd
diff --git a/www/typo3-12/Makefile b/www/typo3-12/Makefile
index fc53a3593c16..ce63153fa203 100644
--- a/www/typo3-12/Makefile
+++ b/www/typo3-12/Makefile
@@ -16,8 +16,9 @@ IGNORE_WITH_MYSQL=	57
 IGNORE_WITH_PHP=	80 83
 
 USES=		cpe php:web,flavors shebangfix
+# php openssl extension is required but it's statically linked in default php
 USE_PHP=	ctype dom fileinfo filter gd intl \
-		mbstring openssl pdo session simplexml \
+		mbstring pdo session simplexml \
 		tokenizer xml zip zlib
 
 WRKSRC=		${WRKDIR}/${PORTNAME}_src-${PORTVERSION}
diff --git a/www/webtrees21/Makefile b/www/webtrees21/Makefile
index 7bc8da2fbbb9..886885d63f3a 100644
--- a/www/webtrees21/Makefile
+++ b/www/webtrees21/Makefile
@@ -11,8 +11,8 @@ WWW=		https://webtrees.net/
 LICENSE=	GPLv3+
 
 USES=		cpe php shebangfix zip
-
-USE_PHP=	calendar curl dom filter gd iconv pcre pdo_mysql session xml
+# php pcre extension is required but it's statically linked in default php
+USE_PHP=	calendar curl dom filter gd iconv pdo_mysql session xml
 
 SHEBANG_FILES=	webtrees/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php