CVS commit: pkgsrc/lang/php
"Takahiro Kambe" <[email protected]> Thu, 30 Jul 2026 16:15:31 +0000
| Newsgroups | gmane.os.netbsd.devel.pkgsrc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module Name: pkgsrc Committed By: taca Date: Thu Jul 30 16:15:31 UTC 2026 Added Files: pkgsrc/lang/php: compat.mk Log Message: lang/php: introduce compat.mk php/compat.mk is more generic version of php/json.mk. PHP_REQUIRE_MODULE is list of key words which speicifies conditionally depending php packages. Currently, it supports imap, json and mcrypt. * imap and mcrypt specifies bundled package or pecl version. * json specifies bundled package for prior to PHP 8. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/lang/php/compat.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
(unnamed)
(text/x-diff, 1.3 KB)
Added files:
Index: pkgsrc/lang/php/compat.mk
diff -u /dev/null pkgsrc/lang/php/compat.mk:1.1
--- /dev/null Thu Jul 30 16:15:31 2026
+++ pkgsrc/lang/php/compat.mk Thu Jul 30 16:15:31 2026
@@ -0,0 +1,40 @@
+# $NetBSD: compat.mk,v 1.1 2026/07/30 16:15:31 taca Exp $
+#
+# Support for dependency several php packages which was contained
+# in base PHP distributions.
+#
+# PHP_REQUIRE_MODULE
+# list of key words which speicifies conditionally depending
+# php packages.
+#
+# Possible: imap json mcrypt
+# Default: (empty)
+#
+.if !defined(PHP_COMPAT_MK)
+PHP_COMPAT_MK:= # empty
+
+.include "../../lang/php/phpversion.mk"
+
+.if $(PHP_REQUIRE_MODULE:Mimap)
+. if ${PHP_VER} < 84
+DEPENDS+= ${PHP_PKG_PREFIX}-imap>=${PHP_BASE_VERS}:../../mail/php-imap
+. else
+DEPENDS+= ${PHP_PKG_PREFIX}-imap>=1.0.3:../../mail/php-pecl-imap
+. endif
+.endif # imap
+
+.if $(PHP_REQUIRE_MODULE:Mjson)
+. if ${PHP_VER} < 80
+DEPENDS+= ${PHP_PKG_PREFIX}-json>=${PHP_BASE_VERS}:../../textproc/php-json
+. endif
+.endif # json
+
+.if $(PHP_REQUIRE_MODULE:Mmcrypt)
+. if ${PHP_VER} < 71
+DEPENDS+= ${PHP_PKG_PREFIX}-mcrypt>=${PHP_BASE_VERS}:../../security/php-mcrypt
+. else
+DEPENDS+= ${PHP_PKG_PREFIX}-pecl-mcrypt>=1.0.1:../../security/php-pecl-mcrypt
+. endif
+.endif # mcrypt
+
+.endif # PHP_COMPAT_MK