git: 35784fd58565 - main - www/npm-node*: Reorganize npm-node* as node20 is the new default

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

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

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

    www/npm-node*: Reorganize npm-node* as node20 is the new default
---
 www/npm-node18/Makefile                  | 47 ++------------------------------
 www/npm-node20/Makefile                  | 47 ++++++++++++++++++++++++++++++--
 www/{npm-node18 => npm-node20}/distinfo  |  0
 www/{npm-node18 => npm-node20}/pkg-descr |  0
 www/{npm-node18 => npm-node20}/pkg-plist |  0
 5 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/www/npm-node18/Makefile b/www/npm-node18/Makefile
index c2315b1364e5..62fff8f1e81b 100644
--- a/www/npm-node18/Makefile
+++ b/www/npm-node18/Makefile
@@ -1,46 +1,5 @@
-PORTNAME=	npm
-PORTVERSION=	10.2.0
-CATEGORIES=	www
-MASTER_SITES=	LOCAL/sunpoet
-PKGNAMESUFFIX=	${NODEJS_SUFFIX}
+USES=		nodejs:18,run
 
-MAINTAINER=	sunpoet@FreeBSD.org
-COMMENT=	Node package manager
-WWW=		https://www.npmjs.com/package/npm \
-		https://github.com/npm/cli
+MASTERDIR=	${.CURDIR}/../npm-node20
 
-LICENSE=	ART20
-LICENSE_FILE=	${WRKSRC}/lib/node_modules/npm/LICENSE
-
-RUN_DEPENDS=	gmake:devel/gmake
-
-USES?=		nodejs:18,run
-USES+=		cpe python shebangfix tar:xz
-
-NO_ARCH=	yes
-NO_BUILD=	yes
-REINPLACE_ARGS=	-i ''
-
-CONFLICTS_INSTALL=	npm-node[0-9][0-9]
-
-CPE_VENDOR=	npmjs
-
-PORTSCOUT=	ignore:1
-
-SHEBANG_GLOB=	*.py
-
-post-patch:
-	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/etc/man.d/npm.conf
-	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp
-	@${REINPLACE_CMD} -e 's|exec python |exec ${PYTHON_CMD} |' ${WRKSRC}/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp
-	@${FIND} ${WRKSRC}/ -name '*.sh' -exec ${REINPLACE_CMD} -e '1 s|/usr/local|${LOCALBASE}|' {} +
-
-do-install:
-	cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/
-	${ECHO_CMD} 'python=${PYTHON_CMD}' > ${STAGEDIR}${PREFIX}/etc/npmrc
-	${PYTHON_CMD} -m compileall -d ${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -f ${STAGEDIR}${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp
-	${PYTHON_CMD} -O -m compileall -d ${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -f ${STAGEDIR}${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp
-	# After Python 3.8 expires, use the following line instead of the above 2 lines.
-	#${PYTHON_CMD} -m compileall -d ${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -f ${STAGEDIR}${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -o 0 -o 1
-
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"
diff --git a/www/npm-node20/Makefile b/www/npm-node20/Makefile
index 50518ea70c81..f4e591ff7d39 100644
--- a/www/npm-node20/Makefile
+++ b/www/npm-node20/Makefile
@@ -1,5 +1,46 @@
-USES=		nodejs:20,run
+PORTNAME=	npm
+PORTVERSION=	10.2.0
+CATEGORIES=	www
+MASTER_SITES=	LOCAL/sunpoet
+PKGNAMESUFFIX=	${NODEJS_SUFFIX}
 
-MASTERDIR=	${.CURDIR}/../npm-node18
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Node package manager
+WWW=		https://www.npmjs.com/package/npm \
+		https://github.com/npm/cli
 
-.include "${MASTERDIR}/Makefile"
+LICENSE=	ART20
+LICENSE_FILE=	${WRKSRC}/lib/node_modules/npm/LICENSE
+
+RUN_DEPENDS=	gmake:devel/gmake
+
+USES?=		nodejs:20,run
+USES+=		cpe python shebangfix tar:xz
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+REINPLACE_ARGS=	-i ''
+
+CONFLICTS_INSTALL=	npm-node[0-9][0-9]
+
+CPE_VENDOR=	npmjs
+
+PORTSCOUT=	ignore:1
+
+SHEBANG_GLOB=	*.py
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/etc/man.d/npm.conf
+	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp
+	@${REINPLACE_CMD} -e 's|exec python |exec ${PYTHON_CMD} |' ${WRKSRC}/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp
+	@${FIND} ${WRKSRC}/ -name '*.sh' -exec ${REINPLACE_CMD} -e '1 s|/usr/local|${LOCALBASE}|' {} +
+
+do-install:
+	cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/
+	${ECHO_CMD} 'python=${PYTHON_CMD}' > ${STAGEDIR}${PREFIX}/etc/npmrc
+	${PYTHON_CMD} -m compileall -d ${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -f ${STAGEDIR}${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp
+	${PYTHON_CMD} -O -m compileall -d ${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -f ${STAGEDIR}${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp
+	# After Python 3.8 expires, use the following line instead of the above 2 lines.
+	#${PYTHON_CMD} -m compileall -d ${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -f ${STAGEDIR}${PREFIX}/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp -o 0 -o 1
+
+.include <bsd.port.mk>
diff --git a/www/npm-node18/distinfo b/www/npm-node20/distinfo
similarity index 100%
rename from www/npm-node18/distinfo
rename to www/npm-node20/distinfo
diff --git a/www/npm-node18/pkg-descr b/www/npm-node20/pkg-descr
similarity index 100%
rename from www/npm-node18/pkg-descr
rename to www/npm-node20/pkg-descr
diff --git a/www/npm-node18/pkg-plist b/www/npm-node20/pkg-plist
similarity index 100%
rename from www/npm-node18/pkg-plist
rename to www/npm-node20/pkg-plist