git: d2948b522a72 - main - www/yarn: make yarn-node16 available

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Fri, 29 Oct 2021 06:33:17 UTC
The branch main has been updated by mfechner:

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

commit d2948b522a724f188d430654d61a0fe38652090b
Author:     Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2021-10-28 04:11:15 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2021-10-29 06:32:52 +0000

    www/yarn: make yarn-node16 available
    
    Currently many node packages do not support node 17 which is
    used for www/node.
    This for example fixes the usage of www/gitlab-ce which cannot
    run the upgrade step if node 17 is used.
    
    PR:             259475
    PR:             259476
    PR:             259477
    Approved by:    pizzamig (maintainer)
---
 www/Makefile             |  1 +
 www/yarn-node14/Makefile |  2 +-
 www/yarn-node16/Makefile | 12 ++++++++++++
 www/yarn/Makefile        |  7 +++++--
 4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/www/Makefile b/www/Makefile
index 4b4c280bcc2b..5fb054cf0900 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -2360,6 +2360,7 @@
     SUBDIR += yanopaste
     SUBDIR += yarn
     SUBDIR += yarn-node14
+    SUBDIR += yarn-node16
     SUBDIR += yarr
     SUBDIR += yaws
     SUBDIR += you-get
diff --git a/www/yarn-node14/Makefile b/www/yarn-node14/Makefile
index 7e51b027382d..b5020fea1fea 100644
--- a/www/yarn-node14/Makefile
+++ b/www/yarn-node14/Makefile
@@ -4,7 +4,7 @@ PKGNAMESUFFIX=	-node14
 
 CONFLICTS_INSTALL=	yarn
 
-OPTIONS_EXCLUDE=	NODE
+OPTIONS_EXCLUDE=	NODE NODE16
 OPTIONS_SLAVE=	NODE14
 
 MASTERDIR=	${.CURDIR}/../yarn
diff --git a/www/yarn-node16/Makefile b/www/yarn-node16/Makefile
new file mode 100644
index 000000000000..a082a498a15d
--- /dev/null
+++ b/www/yarn-node16/Makefile
@@ -0,0 +1,12 @@
+# Created by: Luca Pizzamiglio <pizzamig@FreeBSD.org>
+
+PKGNAMESUFFIX=	-node16
+
+CONFLICTS_INSTALL=	yarn
+
+OPTIONS_EXCLUDE=	NODE NODE14
+OPTIONS_SLAVE=	NODE16
+
+MASTERDIR=	${.CURDIR}/../yarn
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/yarn/Makefile b/www/yarn/Makefile
index ec73d5ace7a0..31a0bac42337 100644
--- a/www/yarn/Makefile
+++ b/www/yarn/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	yarn
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.22.17
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	https://yarnpkg.com/downloads/${PORTVERSION}/
 
@@ -13,20 +14,22 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 USES=		cpe
 CPE_VENDOR=	${PORTNAME}pkg
 
-CONFLICTS_INSTALL?=	yarn-node14 yarn-node10
+CONFLICTS_INSTALL?=	yarn-node16 yarn-node14 yarn-node10
 
 OPTIONS_DEFINE=	HADOOPCOMPAT
 OPTIONS_SINGLE=	BACKEND
-OPTIONS_SINGLE_BACKEND=	NODE14 NODE
+OPTIONS_SINGLE_BACKEND=	NODE16 NODE14 NODE
 OPTIONS_DEFAULT=	NODE
 HADOOPCOMPAT_DESC=	hadoop2 compatibility, the yarn script is excluded
 NODE_DESC=	Use www/node as backend
 NODE14_DESC=	Use www/node14 as backend
+NODE16_DESC=	Use www/node16 as backend
 
 OPTIONS_SUB=	yes
 
 NODE_RUN_DEPENDS=	node>=0.8.0:www/node
 NODE14_RUN_DEPENDS=	node14>=14.0.0:www/node14
+NODE16_RUN_DEPENDS=	node16>=16.0.0:www/node16
 
 HADOOPCOMPAT_CONFLICTS_INSTALL_OFF=	hadoop2*