git: 1d8473a561ea - main - www/yarn-node*: Reorganize yarn-node* as node20 is the new default

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 01 Nov 2023 19:30:03 UTC
The branch main has been updated by sunpoet:

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

commit 1d8473a561ea519f1bcf5b603760fa68fa5306c1
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-11-01 19:29:14 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-11-01 19:29:14 +0000

    www/yarn-node*: Reorganize yarn-node* as node20 is the new default
---
 www/yarn-node16/Makefile                           |  2 +-
 www/yarn-node18/Makefile                           | 52 ++--------------------
 www/yarn-node20/Makefile                           | 52 ++++++++++++++++++++--
 www/{yarn-node18 => yarn-node20}/distinfo          |  0
 .../files/patch-lib_cli.js                         |  0
 www/{yarn-node18 => yarn-node20}/pkg-descr         |  0
 www/{yarn-node18 => yarn-node20}/pkg-plist         |  0
 7 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/www/yarn-node16/Makefile b/www/yarn-node16/Makefile
index 26bd42e35698..e556953d5a53 100644
--- a/www/yarn-node16/Makefile
+++ b/www/yarn-node16/Makefile
@@ -1,5 +1,5 @@
 USES=		nodejs:16,run
 
-MASTERDIR=	${.CURDIR}/../yarn-node18
+MASTERDIR=	${.CURDIR}/../yarn-node20
 
 .include "${MASTERDIR}/Makefile"
diff --git a/www/yarn-node18/Makefile b/www/yarn-node18/Makefile
index 103671754b31..6e7609f00c8e 100644
--- a/www/yarn-node18/Makefile
+++ b/www/yarn-node18/Makefile
@@ -1,51 +1,5 @@
-PORTNAME=	yarn
-DISTVERSIONPREFIX=	v
-PORTVERSION=	1.22.19
-CATEGORIES=	www
-MASTER_SITES=	https://yarnpkg.com/downloads/${PORTVERSION}/
-PKGNAMESUFFIX=	${NODEJS_SUFFIX}
+USES=		nodejs:18,run
 
-MAINTAINER=	pizzamig@FreeBSD.org
-COMMENT=	Package manager for node, alternative to npm
-WWW=		https://classic.yarnpkg.com/
+MASTERDIR=	${.CURDIR}/../yarn-node20
 
-LICENSE=	BSD2CLAUSE
-LICENSE_FILE=	${WRKSRC}/LICENSE
-
-USES?=		nodejs:18,run
-USES+=		cpe
-CPE_VENDOR=	${PORTNAME}pkg
-
-CONFLICTS_INSTALL=	yarn-node[0-9][0-9]
-
-OPTIONS_DEFINE=	HADOOPCOMPAT
-HADOOPCOMPAT_DESC=	hadoop2 compatibility, the yarn script is excluded
-
-OPTIONS_SUB=	yes
-
-HADOOPCOMPAT_CONFLICTS_INSTALL_OFF=	hadoop2*
-
-NO_ARCH=	yes
-NO_BUILD=	yes
-
-post-patch:
-	@${RM} ${WRKSRC}/bin/*.cmd
-	@${REINPLACE_CMD} -i '' \
-		-e 's|"installationMethod": "tar"|"installationMethod": "pkg"|g' \
-		${WRKSRC}/package.json
-	@${REINPLACE_CMD} -i '' -e 's%Linux)%Linux|FreeBSD)%g' \
-		${WRKSRC}/bin/yarn
-
-do-install:
-	${MKDIR} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn
-	(cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/node_modules/yarn)
-	${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn.js \
-		${STAGEDIR}${PREFIX}/bin/yarn.js
-	${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarnpkg \
-		${STAGEDIR}${PREFIX}/bin/yarnpkg
-
-do-install-HADOOPCOMPAT-off:
-	${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn \
-		${STAGEDIR}${PREFIX}/bin/yarn
-
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"
diff --git a/www/yarn-node20/Makefile b/www/yarn-node20/Makefile
index 77d7de2d408f..8d34f0a20309 100644
--- a/www/yarn-node20/Makefile
+++ b/www/yarn-node20/Makefile
@@ -1,5 +1,51 @@
-USES=		nodejs:20,run
+PORTNAME=	yarn
+DISTVERSIONPREFIX=	v
+PORTVERSION=	1.22.19
+CATEGORIES=	www
+MASTER_SITES=	https://yarnpkg.com/downloads/${PORTVERSION}/
+PKGNAMESUFFIX=	${NODEJS_SUFFIX}
 
-MASTERDIR=	${.CURDIR}/../yarn-node18
+MAINTAINER=	pizzamig@FreeBSD.org
+COMMENT=	Package manager for node, alternative to npm
+WWW=		https://classic.yarnpkg.com/
 
-.include "${MASTERDIR}/Makefile"
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES?=		nodejs:20,run
+USES+=		cpe
+CPE_VENDOR=	${PORTNAME}pkg
+
+CONFLICTS_INSTALL=	yarn-node[0-9][0-9]
+
+OPTIONS_DEFINE=	HADOOPCOMPAT
+HADOOPCOMPAT_DESC=	hadoop2 compatibility, the yarn script is excluded
+
+OPTIONS_SUB=	yes
+
+HADOOPCOMPAT_CONFLICTS_INSTALL_OFF=	hadoop2*
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+
+post-patch:
+	@${RM} ${WRKSRC}/bin/*.cmd
+	@${REINPLACE_CMD} -i '' \
+		-e 's|"installationMethod": "tar"|"installationMethod": "pkg"|g' \
+		${WRKSRC}/package.json
+	@${REINPLACE_CMD} -i '' -e 's%Linux)%Linux|FreeBSD)%g' \
+		${WRKSRC}/bin/yarn
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn
+	(cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/node_modules/yarn)
+	${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn.js \
+		${STAGEDIR}${PREFIX}/bin/yarn.js
+	${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarnpkg \
+		${STAGEDIR}${PREFIX}/bin/yarnpkg
+
+do-install-HADOOPCOMPAT-off:
+	${RLN} ${STAGEDIR}${PREFIX}/lib/node_modules/yarn/bin/yarn \
+		${STAGEDIR}${PREFIX}/bin/yarn
+
+.include <bsd.port.mk>
diff --git a/www/yarn-node18/distinfo b/www/yarn-node20/distinfo
similarity index 100%
rename from www/yarn-node18/distinfo
rename to www/yarn-node20/distinfo
diff --git a/www/yarn-node18/files/patch-lib_cli.js b/www/yarn-node20/files/patch-lib_cli.js
similarity index 100%
rename from www/yarn-node18/files/patch-lib_cli.js
rename to www/yarn-node20/files/patch-lib_cli.js
diff --git a/www/yarn-node18/pkg-descr b/www/yarn-node20/pkg-descr
similarity index 100%
rename from www/yarn-node18/pkg-descr
rename to www/yarn-node20/pkg-descr
diff --git a/www/yarn-node18/pkg-plist b/www/yarn-node20/pkg-plist
similarity index 100%
rename from www/yarn-node18/pkg-plist
rename to www/yarn-node20/pkg-plist