Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157155566
D32790.id98297.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
15 KB
Referenced Files
None
Subscribers
None
D32790.id98297.diff
View Options
diff --git a/Mk/Uses/nodejs.mk b/Mk/Uses/nodejs.mk
new file mode 100644
--- /dev/null
+++ b/Mk/Uses/nodejs.mk
@@ -0,0 +1,60 @@
+# Provide support for NodeJS
+#
+# Feature: nodejs
+# Usage: USES=nodejs or USES=nodejs:args
+# Valid ARGS: build and/or run <version>
+# version: lts, current, 10, 14, 16, 17
+# Default is: build,run
+# Note: if you define a version, you must provide run and/or build
+#
+# MAINTAINER: bhughes@FreeBSD.org
+
+.if !defined(_INCLUDE_USES_NODEJS_MK)
+_INCLUDE_USES_NODEJS_MK= yes
+
+_VALID_NODEJS_VERSION= 10 14 16 17 lts current
+_NODEJS_VERSION_SUFFIX= ${NODEJS_DEFAULT}
+
+.if ! ${_VALID_NODEJS_VERSION:M${_NODEJS_VERSION_SUFFIX}}
+IGNORE= Invalid nodejs default version ${_NODEJS_VERSION_SUFFIX}; valid versions are ${_VALID_NODEJS_VERSION}
+.endif
+
+.if empty(nodejs_ARGS)
+nodejs_ARGS= build,run
+.endif
+
+. if ${nodejs_ARGS:M10}
+_NODEJS_VERSION_SUFFIX= 10
+. elif ${nodejs_ARGS:M14}
+_NODEJS_VERSION_SUFFIX= 14
+. elif ${nodejs_ARGS:M16}
+_NODEJS_VERSION_SUFFIX= 16
+. elif ${nodejs_ARGS:Mlts}
+_NODEJS_VERSION_SUFFIX= lts
+. elif ${nodejs_ARGS:M17}
+_NODEJS_VERSION_SUFFIX= 17
+. elif ${nodejs_ARGS:Mcurrent}
+_NODEJS_VERSION_SUFFIX= current
+. elif defined(NODEJS_DEFAULT)
+. endif
+
+# The nodejs 17 version is named www/node
+. if ${_NODEJS_VERSION_SUFFIX:Mcurrent}
+_NODEJS_VERSION_SUFFIX=
+. endif
+. if ${_NODEJS_VERSION_SUFFIX:M17}
+_NODEJS_VERSION_SUFFIX=
+. endif
+# The nodejs LTS is version 16
+. if ${_NODEJS_VERSION_SUFFIX:Mlts}
+_NODEJS_VERSION_SUFFIX= 16
+. endif
+
+. if ${nodejs_ARGS:M*run*}
+RUN_DEPENDS+= node:www/node${_NODEJS_VERSION_SUFFIX}
+. endif
+. if ${nodejs_ARGS:M*build*}
+BUILD_DEPENDS+= node:www/node${_NODEJS_VERSION_SUFFIX}
+. endif
+
+.endif
diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk
--- a/Mk/bsd.default-versions.mk
+++ b/Mk/bsd.default-versions.mk
@@ -18,7 +18,7 @@
LOCALBASE?= /usr/local
.for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT GL \
- IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA PERL5 \
+ IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA NODEJS PERL5 \
PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH
.if defined(${lang}_DEFAULT)
ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
@@ -163,4 +163,7 @@
# Possible values: 4, 6
VARNISH_DEFAULT?= 4
+# Possible value: 10, 14, 16, 17, lts, current
+NODEJS_DEFAULT?= lts
+
.endif
diff --git a/UPDATING b/UPDATING
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,25 @@
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20211110:
+ AFFECTS: users of www/node*, www/npm*, www/yarn*
+ AUTHOR: mfechner@FreeBSD.org
+
+ The port framework was updated to use a default version for nodejs.
+ The default version is pointing to the latest LTS version which is
+ currently version 16.
+ You can overwrite this by defining in /etc/make.conf, e.g. version 17:
+ DEFAULT_VERSIONS=nodejs=17
+
+ Or if you would like to stick always to the current version use:
+ DEFAULT_VERSIONS=nodejs=current
+
+ If you would like to use yarn or npm together with nodejs version 17,
+ just install the package that is pulling the wanted dependency to nodejs:
+
+ # pkg install yarn-node17
+ # pkg install npm-node17
+
20211109:
AFFECTS: users of security/libressl
AUTHOR: brnrd@FreeBSD.org
diff --git a/devel/node-thrift/Makefile b/devel/node-thrift/Makefile
--- a/devel/node-thrift/Makefile
+++ b/devel/node-thrift/Makefile
@@ -2,6 +2,7 @@
PORTNAME= thrift
PORTVERSION= ${THRIFT_PORTVERSION}
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= APACHE/thrift/${PORTVERSION}
PKGNAMEPREFIX= node-
@@ -9,9 +10,7 @@
MAINTAINER= ports@FreeBSD.org
COMMENT= Node.js bindings for the Apache Thrift RPC system
-RUN_DEPENDS= node:www/node
-
-USES= cpe
+USES= cpe nodejs:run
CPE_VENDOR= apache
NO_BUILD= yes
diff --git a/devel/purescript-language-server/Makefile b/devel/purescript-language-server/Makefile
--- a/devel/purescript-language-server/Makefile
+++ b/devel/purescript-language-server/Makefile
@@ -1,5 +1,6 @@
PORTNAME= purescript-language-server
PORTVERSION= 0.15.7
+PORTREVISION= 1
CATEGORIES= devel textproc
MASTER_SITES= https://github.com/nwolverson/${PORTNAME}/releases/download/v${PORTVERSION}/
DISTNAME= ${PORTNAME}.js
@@ -11,7 +12,7 @@
LICENSE= MIT
-RUN_DEPENDS= node:www/node
+USES= nodejs:run
NO_BUILD= yes
NO_ARCH= yes
diff --git a/devel/rubygem-execjs/Makefile b/devel/rubygem-execjs/Makefile
--- a/devel/rubygem-execjs/Makefile
+++ b/devel/rubygem-execjs/Makefile
@@ -12,22 +12,11 @@
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/MIT-LICENSE
-USES= gem
+USES= gem nodejs:run
USE_RUBY= yes
NO_ARCH= yes
-OPTIONS_SINGLE= BACKEND
-OPTIONS_SINGLE_BACKEND= NODE NODE14 NODE16
-OPTIONS_DEFAULT=NODE
-NODE_DESC= Use www/node as backend
-NODE14_DESC= Use www/node14 as backend
-NODE16_DESC= Use www/node16 as backend
-
-NODE_RUN_DEPENDS= node>=0:www/node
-NODE14_RUN_DEPENDS= node14>=0:www/node14
-NODE16_RUN_DEPENDS= node16>=0:www/node16
-
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/lib/execjs/runtimes.rb
diff --git a/devel/sonar-scanner-cli/Makefile b/devel/sonar-scanner-cli/Makefile
--- a/devel/sonar-scanner-cli/Makefile
+++ b/devel/sonar-scanner-cli/Makefile
@@ -1,6 +1,6 @@
PORTNAME= sonar-scanner-cli
DISTVERSION= 4.4.0.2170
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel security www java
MASTER_SITES= https://binaries.sonarsource.com/Distribution/${PORTNAME}/
@@ -10,9 +10,7 @@
LICENSE= LGPL3
# node -> JS analysis
-RUN_DEPENDS= node:www/node
-
-USES= cpe zip
+USES= cpe nodejs:run zip
CPE_VENDOR= sonarsource
CPE_PRODUCT= sonarqube_scanner
USE_JAVA= yes
diff --git a/lang/coffeescript/Makefile b/lang/coffeescript/Makefile
--- a/lang/coffeescript/Makefile
+++ b/lang/coffeescript/Makefile
@@ -1,5 +1,6 @@
PORTNAME= coffeescript
DISTVERSION= 2.6.1
+PORTREVISION= 1
CATEGORIES= lang
MAINTAINER= egypcio@FreeBSD.org
@@ -8,8 +9,7 @@
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-RUN_DEPENDS= node:www/node
-
+USES= nodejs:run
USE_GITHUB= yes
GH_ACCOUNT= jashkenas
diff --git a/net/cjdns/Makefile b/net/cjdns/Makefile
--- a/net/cjdns/Makefile
+++ b/net/cjdns/Makefile
@@ -3,6 +3,7 @@
PORTNAME= cjdns
DISTVERSIONPREFIX= cjdns-v
DISTVERSION= 21.1
+PORTREVISION= 1
CATEGORIES= net security
MAINTAINER= yuri@FreeBSD.org
@@ -11,10 +12,9 @@
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= node:www/node \
- bash:shells/bash
+BUILD_DEPENDS= bash:shells/bash
-USES= gmake python
+USES= gmake nodejs:build python
USE_GITHUB= yes
GH_ACCOUNT= cjdelisle
USE_RC_SUBR= cjdns
diff --git a/security/greenbone-security-assistant/Makefile b/security/greenbone-security-assistant/Makefile
--- a/security/greenbone-security-assistant/Makefile
+++ b/security/greenbone-security-assistant/Makefile
@@ -1,6 +1,7 @@
PORTNAME= greenbone-security-assistant
DISTVERSIONPREFIX= v
DISTVERSION= 21.4.3
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= LOCAL/acm/gsa/:yarn_cache
DISTFILES= ${PORTNAME}-cache${EXTRACT_SUFX}:yarn_cache
@@ -10,8 +11,7 @@
LICENSE= AGPLv3+
-BUILD_DEPENDS= node:www/node16 \
- yarn:www/yarn-node16
+BUILD_DEPENDS= yarn:www/yarn
LIB_DEPENDS= libgvm_base.so:security/gvm-libs \
libgnutls.so:security/gnutls \
libgcrypt.so:security/libgcrypt \
@@ -20,7 +20,7 @@
RUN_DEPENDS= doxygen>0:devel/doxygen \
${PYTHON_PKGNAMEPREFIX}polib>=0:devel/py-polib@${PY_FLAVOR}
-USES= cmake gettext-runtime gnome pkgconfig python
+USES= cmake gettext-runtime gnome nodejs:build pkgconfig python
USE_GNOME= glib20 libxml2
USE_GITHUB= yes
diff --git a/textproc/kibana6/Makefile b/textproc/kibana6/Makefile
--- a/textproc/kibana6/Makefile
+++ b/textproc/kibana6/Makefile
@@ -1,5 +1,6 @@
PORTNAME= kibana
PORTVERSION= 6.8.16
+PORTREVISION= 1
DISTVERSIONSUFFIX= -darwin-x86_64
CATEGORIES= textproc www
MASTER_SITES= https://artifacts.elastic.co/downloads/kibana/ \
@@ -14,9 +15,7 @@
DEPRECATED= Uses EOL Python 2.7 via www/node10
EXPIRATION_DATE= 2021-06-23
-RUN_DEPENDS= node10>=10.15.2:www/node10
-
-USES= cpe
+USES= cpe nodejs:run,10
CPE_VENDOR= elastic
USE_RC_SUBR= ${PORTNAME}
diff --git a/textproc/kibana7/Makefile b/textproc/kibana7/Makefile
--- a/textproc/kibana7/Makefile
+++ b/textproc/kibana7/Makefile
@@ -3,7 +3,7 @@
PORTNAME= kibana
PORTVERSION= 7.15.1
DISTVERSIONSUFFIX= -darwin-x86_64
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= textproc www
MASTER_SITES= https://artifacts.elastic.co/downloads/kibana/ \
http://artifacts.elastic.co/downloads/kibana/
@@ -15,13 +15,11 @@
LICENSE= APACHE20
-BUILD_DEPENDS= node14>=14.17.6:www/node14 \
- npm-node14>0:www/npm-node14
+BUILD_DEPENDS= npm-node14>0:www/npm-node14
LIB_DEPENDS= libre2.so:devel/re2 \
libuv.so:devel/libuv
-RUN_DEPENDS= node14>=14.17.6:www/node14
-USES= compiler:c++14-lang cpe python:build
+USES= compiler:c++14-lang cpe nodejs:14,build,run python:build
CPE_VENDOR= elastic
USE_GITHUB= nodefault
diff --git a/textproc/opensearch-dashboards/Makefile b/textproc/opensearch-dashboards/Makefile
--- a/textproc/opensearch-dashboards/Makefile
+++ b/textproc/opensearch-dashboards/Makefile
@@ -1,5 +1,6 @@
PORTNAME= opensearch-dashboards
DISTVERSION= 1.1.0
+PORTREVISION= 1
DISTVERSIONSUFFIX= -linux-x64
CATEGORIES= textproc www
MASTER_SITES= https://artifacts.opensearch.org/releases/bundle/${PORTNAME}/${DISTVERSION}/
@@ -10,11 +11,9 @@
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-BUILD_DEPENDS= node14>=14.17.0:www/node14 \
- npm-node14>0:www/npm-node14
-RUN_DEPENDS= node14>=14.17.0:www/node14
+BUILD_DEPENDS= npm-node14>0:www/npm-node14
-USES= python:build
+USES= nodejs:14,build,run python:build
USE_RC_SUBR= ${PORTNAME}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
diff --git a/www/Makefile b/www/Makefile
--- a/www/Makefile
+++ b/www/Makefile
@@ -466,6 +466,7 @@
SUBDIR += npm
SUBDIR += npm-node14
SUBDIR += npm-node16
+ SUBDIR += npm-node17
SUBDIR += nspluginwrapper
SUBDIR += oauth2-proxy
SUBDIR += obhttpd
@@ -2366,6 +2367,7 @@
SUBDIR += yarn
SUBDIR += yarn-node14
SUBDIR += yarn-node16
+ SUBDIR += yarn-node17
SUBDIR += yarr
SUBDIR += yaws
SUBDIR += you-get
diff --git a/www/csso/Makefile b/www/csso/Makefile
--- a/www/csso/Makefile
+++ b/www/csso/Makefile
@@ -3,7 +3,7 @@
PORTNAME= csso
PORTVERSION= 1.3.9
DISTVERSIONPREFIX= v
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://nivit.altervista.org/FreeBSD/ports/distfiles/
@@ -13,7 +13,7 @@
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/MIT-LICENSE.txt
-RUN_DEPENDS= node:www/node
+USES= nodejs:run
GH_ACCOUNT= css
diff --git a/www/gitlab-ce/Makefile b/www/gitlab-ce/Makefile
--- a/www/gitlab-ce/Makefile
+++ b/www/gitlab-ce/Makefile
@@ -21,7 +21,7 @@
gitlab-shell>=13.21.1:devel/gitlab-shell \
gitlab-workhorse>=${PORTVERSION}:www/gitlab-workhorse \
redis>=6.0.14:databases/redis \
- yarn-node16>=1.10.0:www/yarn-node16 \
+ yarn>=1.10.0:www/yarn \
gtar>0:archivers/gtar \
bash>0:shells/bash \
rubygem-rails61>=6.1.4.1<6.1.4.2:www/rubygem-rails61 \
diff --git a/www/npm-node14/Makefile b/www/npm-node14/Makefile
--- a/www/npm-node14/Makefile
+++ b/www/npm-node14/Makefile
@@ -2,10 +2,9 @@
PKGNAMESUFFIX= -node14
-CONFLICTS_INSTALL= npm npm-node16
+CONFLICTS_INSTALL= npm npm-node16 npm-node17
-OPTIONS_EXCLUDE=NODE NODE16
-OPTIONS_SLAVE= NODE14
+USES= nodejs:14,run
MASTERDIR= ${.CURDIR}/../npm
diff --git a/www/npm-node16/Makefile b/www/npm-node16/Makefile
--- a/www/npm-node16/Makefile
+++ b/www/npm-node16/Makefile
@@ -2,10 +2,9 @@
PKGNAMESUFFIX= -node16
-CONFLICTS_INSTALL= npm
+CONFLICTS_INSTALL= npm npm-node14 npm-node17
-OPTIONS_EXCLUDE=NODE NODE14
-OPTIONS_SLAVE= NODE16
+USES= nodejs:16,run
MASTERDIR= ${.CURDIR}/../npm
diff --git a/www/npm-node17/Makefile b/www/npm-node17/Makefile
new file mode 100644
--- /dev/null
+++ b/www/npm-node17/Makefile
@@ -0,0 +1,11 @@
+# Created by: Matthias Fechner <mfechner@FreeBSD.org>
+
+PKGNAMESUFFIX= -node17
+
+CONFLICTS_INSTALL= npm npm-node14 npm-node16
+
+USES= nodejs:17,run
+
+MASTERDIR= ${.CURDIR}/../npm
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/npm/Makefile b/www/npm/Makefile
--- a/www/npm/Makefile
+++ b/www/npm/Makefile
@@ -2,6 +2,7 @@
PORTNAME= npm
PORTVERSION= 6.14.8
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= LOCAL/sunpoet
@@ -13,30 +14,20 @@
RUN_DEPENDS= gmake:devel/gmake
-USES= cpe python:3.5+ shebangfix tar:xz
+USES?= nodejs:run
+USES+= cpe python:3.5+ shebangfix tar:xz
NO_ARCH= yes
NO_BUILD= yes
REINPLACE_ARGS= -i ''
-CONFLICTS_INSTALL?= npm-node14 npm-node16
-
-OPTIONS_SINGLE= BACKEND
-OPTIONS_SINGLE_BACKEND= NODE NODE14 NODE16
-OPTIONS_DEFAULT=NODE
-NODE_DESC= Use www/node as backend
-NODE14_DESC= Use www/node14 as backend
-NODE16_DESC= Use www/node16 as backend
+CONFLICTS_INSTALL?= npm-node14 npm-node16 npm-node17
CPE_VENDOR= npmjs
SHEBANG_GLOB= *.py
SHEBANG_FILES= lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples
-NODE_RUN_DEPENDS= node>=0.8.0:www/node
-NODE14_RUN_DEPENDS= node14>=0.8.0:www/node14
-NODE16_RUN_DEPENDS= node16>=0.8.0:www/node16
-
.include <bsd.port.pre.mk>
.if ${ARCH} == i386
diff --git a/www/yarn-node14/Makefile b/www/yarn-node14/Makefile
--- a/www/yarn-node14/Makefile
+++ b/www/yarn-node14/Makefile
@@ -2,10 +2,9 @@
PKGNAMESUFFIX= -node14
-CONFLICTS_INSTALL= yarn
+CONFLICTS_INSTALL= yarn yarn-node16 yarn-node17
-OPTIONS_EXCLUDE= NODE NODE16
-OPTIONS_SLAVE= NODE14
+USES= nodejs:14,run
MASTERDIR= ${.CURDIR}/../yarn
diff --git a/www/yarn-node16/Makefile b/www/yarn-node16/Makefile
--- a/www/yarn-node16/Makefile
+++ b/www/yarn-node16/Makefile
@@ -2,10 +2,9 @@
PKGNAMESUFFIX= -node16
-CONFLICTS_INSTALL= yarn
+CONFLICTS_INSTALL= yarn yarn-node14 yarn-node17
-OPTIONS_EXCLUDE= NODE NODE14
-OPTIONS_SLAVE= NODE16
+USES= nodejs:16,run
MASTERDIR= ${.CURDIR}/../yarn
diff --git a/www/yarn-node17/Makefile b/www/yarn-node17/Makefile
new file mode 100644
--- /dev/null
+++ b/www/yarn-node17/Makefile
@@ -0,0 +1,11 @@
+# Created by: Matthias Fechner <mfechner@FreeBSD.org>
+
+PKGNAMESUFFIX= -node17
+
+CONFLICTS_INSTALL= yarn yarn-node14 yarn-node16
+
+USES= nodejs:17,run
+
+MASTERDIR= ${.CURDIR}/../yarn
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/yarn/Makefile b/www/yarn/Makefile
--- a/www/yarn/Makefile
+++ b/www/yarn/Makefile
@@ -1,7 +1,7 @@
PORTNAME= yarn
DISTVERSIONPREFIX= v
DISTVERSION= 1.22.17
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= https://yarnpkg.com/downloads/${PORTVERSION}/
@@ -11,26 +11,17 @@
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= cpe
+USES?= nodejs:run
+USES+= cpe
CPE_VENDOR= ${PORTNAME}pkg
-CONFLICTS_INSTALL?= yarn-node16 yarn-node14 yarn-node10
+CONFLICTS_INSTALL?= yarn-node17 yarn-node16 yarn-node14
OPTIONS_DEFINE= HADOOPCOMPAT
-OPTIONS_SINGLE= BACKEND
-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*
NO_ARCH= yes
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 8:37 PM (15 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33327549
Default Alt Text
D32790.id98297.diff (15 KB)
Attached To
Mode
D32790: Make DEFAULT_VERSION for nodejs available
Attached
Detach File
Event Timeline
Log In to Comment