public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Stefan Strogin" <steils@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/libressl:master commit in: net-libs/nodejs/
Date: Sun, 26 Jan 2020 11:41:35 +0000 (UTC)	[thread overview]
Message-ID: <1580038803.ae06b8a3d00a07936e6a19046158f64cbcefb611.steils@gentoo> (raw)

commit:     ae06b8a3d00a07936e6a19046158f64cbcefb611
Author:     Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 18:14:56 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 11:40:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ae06b8a3

net-libs/nodejs: version bump to 10.18.1, 12.14.0, 12.14.1-r1, 13.7.0-r1

Sync from gentoo.git.

Reported-by: Dennis Gaebler <dennis.gaebler <AT> uni-ulm.de>
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://github.com/gentoo/libressl/pull/316
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 net-libs/nodejs/Manifest                 |   4 +
 net-libs/nodejs/nodejs-10.18.1.ebuild    | 204 +++++++++++++++++++++++++++++
 net-libs/nodejs/nodejs-12.14.0.ebuild    | 212 +++++++++++++++++++++++++++++++
 net-libs/nodejs/nodejs-12.14.1-r1.ebuild | 212 +++++++++++++++++++++++++++++++
 net-libs/nodejs/nodejs-13.7.0-r1.ebuild  | 208 ++++++++++++++++++++++++++++++
 5 files changed, 840 insertions(+)

diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index aa3c452..6192396 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -1,10 +1,14 @@
 DIST node-v10.15.3.tar.xz 20262632 BLAKE2B d65d4e274fa829be5cda1970b0ebe7081e8476334cb825e5727324c3202bc015f4ba39589608284d0f8c0b722079c06d1587de5299a3c81ccb7b0eacbdaccf84 SHA512 cf741f733af7a7e1fbd37b0f98110078494b4771dbdfccacfda95a5ea4cda6cdcea4f8d31dddcf27477213614e4ab6cf7d1a1f900cb92936333730737ac4f9e8
+DIST node-v10.18.1.tar.xz 21920068 BLAKE2B 9dc0887a33f0888a347628e5bf15eb3687f15cba264a00317a15336fda48e41da9b4c45df6d0f223f2017c6b55b99eda0c4cd6f5913673da29c52a61450d03e2 SHA512 0979d264ef5286caea61a527771e2ac2fbe1b909a151061dbb7d9e0fde9461edd76b6060f55cfbd49d3ae2e7e10595a2eb4d2e98182e735e7df10940120fb9b6
 DIST node-v12.11.1.tar.xz 22852156 BLAKE2B 38205c3ad52ccac2656c72b31c5714268e4771375b13d7c113e4a5fe7e9530d2826c43aeaa3ed3e30210f504d37221f90f3fb2a15f4c5fbca8878d0f2639b9fa SHA512 9567ee592ea8a05f899755d5e1c934413532676c78a663a1a861a6fa882c7eecae411c05c4b034191b7266776341609c098fbccfcd93c93eba7b84d138eeffb9
 DIST node-v12.12.0.tar.xz 22836688 BLAKE2B 81ff202fb807c557a30eeb08a76a8e95e2faec300d360caac5ce177cdfcda3963bcea904f3e79f9ced9fe2219e7e1d4a760a9c4e69dfe5b670c737e2a598cf6a SHA512 91872784a7a7e7e1e0beeb1166eb1ddd7a5432271e9f62265815d4c5b5d831f269916954bb36724e65108c57d6a7ebac3a2a5be2e49f51f7904a7d549c92176b
 DIST node-v12.13.0.tar.xz 22862096 BLAKE2B b0121f45b535bac7baa0103db538070b4beb4b40a6c871c217eebfb1abb5a7821d83d46946047b3385af182f901c0390eb85134c9201be2d03b5745b297271f8 SHA512 a7aa8b1f010ea1df122d9d7b88ee0a9d10e0d79ae2f3d18c706ac6ce36e2e2039c21ea6f3dba3a22a79ed3f6069850a8a3c463dbd64e1e8f4a9dbe8901a89cc8
+DIST node-v12.14.0.tar.xz 23244684 BLAKE2B 0e25cbba5e256b139efd45908236f008834afdf01f57a8e84c7e55ba950e56b786cd52eba9a02986eb0e1d38cbf6df38e1cd719d7dcd8085e8c71767adf8155e SHA512 12e887709a54be911c5a81ab7b7be995247b47ebbd2954ca942f9ed8a784ae1a8e4bdb2613e5bb671196f9101d8861cd29e10650a3f0c414db4d096df94b309b
+DIST node-v12.14.1.tar.xz 23258936 BLAKE2B 125289ce3e342c2e5e7bbb6f0b1af109f0ba8fbf2d6630f2cdc4aa31c25a3d846afe773e84daed9824360a6680a2d21378af4fbc42c6337399a143f92850a82f SHA512 2e2b6fa8351b59450ab5491b5e31dc36ce4d9be13c55a14e6e4d95a82cc8334f9fc35261a56a8843903f8021ff333a333bb4d5f24c92b5d7483d4779c3d88342
 DIST node-v13.4.0.tar.xz 32685788 BLAKE2B 4dfa1a6279ad26c0226a8bcdbf5e64c4fce686cacca805302f1a4dc113b60f96340fdb9968bdcd10db71a2c80007f5e0b94fe2cf78590aa9d62e5de61901ce81 SHA512 25da5a8561b6d811c78f23bd9bffa3789c4bca35270c350ed028ca6c72b59cf6e71997873d7fee024b6abc9cc1a000b0dc9bc6b6963128e198e36c8379bb2b8f
 DIST node-v13.5.0.tar.xz 32706024 BLAKE2B 570b2d676919cb333e2f36529e886039f7abfc4f7cd705cabbb2a1115918aa9ffc9d1e54a90e8deac09488f248c007721c090ed0500f113af81b2cda2e8248be SHA512 85bad55334e6ef63be0dbf90cef856c0a0835aa1b32e6ffc418b6a52f88f7ee266505f769f4204c000c766869cd85f7d914c9a3592dd52bcabdb6cb906f433e3
 DIST node-v13.6.0.tar.xz 32706824 BLAKE2B 69e66354570e057fe215830a2d5bd157e5decfd1e58e4ead4304e0dfcf64e5adfe48503f3bf54afe2cc27df581a0f2ae79e9b730257ceb70c412bd2a47fa5603 SHA512 e7dc8356ac1b167cc32055e209f13cee82c9251440b6a6cc99b26c91f9625e11bd025cfc1c22b6ece95ea178640209a7c8700d678678b3e8bad26080aa2762c6
+DIST node-v13.7.0.tar.xz 32739116 BLAKE2B 2bc4331a059d18f37f41bb472bb19d864366cebae32b6be18d9c14ab91019fbfa6dcb2a8c3c1c256ddd54773d801e852e1820d90bc3b55f3509bfa8e5425121d SHA512 e2a9b0b6c6e038b9c5c55b51531ed30e8767dd492d3c5c50a0de764f7a97f22a3fcb65c4f50adff62219b076e0c688f1320dc87061fbb751a867746e22c60ccf
 DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42
 DIST node-v8.16.2.tar.xz 18531368 BLAKE2B aec2f6257ab9237097e590b70b2e8615b664576b3af2f176260f26460f4f50bb1e00c2aff477a32cdb9ebf83f8b4eadc3ccdc2df431e359904fe4375513fb6c1 SHA512 8b0d4a089a5c80869971ceeffbef3ca03f4de4f53452a9fd16cbd189e5d76c7fdef475c144848c8d657256b41e342c020e11f6acd1880dde92ed0d0e8cf9e600
 DIST node-v8.17.0.tar.xz 19013844 BLAKE2B 2f35f61ccc2d67132441dace8b59df6565e5df9e14e6798ab0cb0a024493182881708368248964db30e1213fa7b66301bd73b5146944129d7b14cd2b5b1a9583 SHA512 9f7b0b5695e882b4f727802ad855d398da596f908e64263902781e01f6222a4044be48c104eb76182ddb525dedfc4b28ccd07d64dfa126c462a248d9e8b49fca

diff --git a/net-libs/nodejs/nodejs-10.18.1.ebuild b/net-libs/nodejs/nodejs-10.18.1.ebuild
new file mode 100644
index 0000000..f7b8687
--- /dev/null
+++ b/net-libs/nodejs/nodejs-10.18.1.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
+HOMEPAGE="https://nodejs.org/"
+SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
+IUSE="bundled-ssl cpu_flags_x86_sse2 debug doc icu inspector libressl +npm +snapshot +ssl systemtap test"
+REQUIRED_USE="
+	bundled-ssl? ( ssl )
+	inspector? ( icu ssl )
+	libressl? ( bundled-ssl )
+	npm? ( ssl )
+"
+
+RDEPEND="
+	>=dev-libs/libuv-1.28.0:=
+	>=net-dns/c-ares-1.15.0
+	>=net-libs/http-parser-2.9.0:=
+	>=net-libs/nghttp2-1.39.2
+	sys-libs/zlib
+	icu? ( >=dev-libs/icu-64.2:= )
+	ssl? (
+		!bundled-ssl? ( >=dev-libs/openssl-1.1.1:0= )
+	)
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+	systemtap? ( dev-util/systemtap )
+	test? ( net-misc/curl )
+"
+PATCHES=(
+	"${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
+)
+RESTRICT="test"
+S="${WORKDIR}/node-v${PV}"
+
+pkg_pretend() {
+	(use x86 && ! use cpu_flags_x86_sse2) && \
+		die "Your CPU doesn't support the required SSE2 instruction."
+
+	( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
+		die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
+}
+
+src_prepare() {
+	tc-export CC CXX PKG_CONFIG
+	export V=1
+	export BUILDTYPE=Release
+
+	# fix compilation on Darwin
+	# https://code.google.com/p/gyp/issues/detail?id=260
+	sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
+
+	# make sure we use python2.* while using gyp
+	sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
+	sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
+
+	# less verbose install output (stating the same as portage, basically)
+	sed -i -e "/print/d" tools/install.py || die
+
+	# proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
+	local LIBDIR=$(get_libdir)
+	sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
+	sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
+
+	# Avoid writing a depfile, not useful
+	sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
+
+	sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die
+
+	# Avoid a test that I've only been able to reproduce from emerge. It doesnt
+	# seem sandbox related either (invoking it from a sandbox works fine).
+	# The issue is that no stdin handle is openened when asked for one.
+	# It doesn't really belong upstream , so it'll just be removed until someone
+	# with more gentoo-knowledge than me (jbergstroem) figures it out.
+	rm test/parallel/test-stdout-close-unref.js || die
+
+	# debug builds. change install path, remove optimisations and override buildtype
+	if use debug; then
+		sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
+		BUILDTYPE=Debug
+	fi
+
+	default
+}
+
+src_configure() {
+	xdg_environment_reset
+
+	local myconf=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib )
+	use debug && myconf+=( --debug )
+	use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
+	use inspector || myconf+=( --without-inspector )
+	use npm || myconf+=( --without-npm )
+	use snapshot && myconf+=( --with-snapshot )
+	use ssl && ( use bundled-ssl || myconf+=( --shared-openssl ) ) || myconf+=( --without-ssl )
+
+	local myarch=""
+	case ${ABI} in
+		amd64) myarch="x64";;
+		arm) myarch="arm";;
+		arm64) myarch="arm64";;
+		ppc64) myarch="ppc64";;
+		x32) myarch="x32";;
+		x86) myarch="ia32";;
+		*) myarch="${ABI}";;
+	esac
+
+	GYP_DEFINES="linux_use_gold_flags=0
+		linux_use_bundled_binutils=0
+		linux_use_bundled_gold=0" \
+	"${PYTHON}" configure \
+		--prefix="${EPREFIX}"/usr \
+		--dest-cpu=${myarch} \
+		$(use_with systemtap dtrace) \
+		"${myconf[@]}" || die
+}
+
+src_compile() {
+	emake -C out mksnapshot
+	pax-mark m "out/${BUILDTYPE}/mksnapshot"
+	emake -C out
+}
+
+src_install() {
+	local LIBDIR="${ED}/usr/$(get_libdir)"
+	emake install DESTDIR="${D}"
+	pax-mark -m "${ED}"/usr/bin/node
+
+	# set up a symlink structure that node-gyp expects..
+	dodir /usr/include/node/deps/{v8,uv}
+	dosym . /usr/include/node/src
+	for var in deps/{uv,v8}/include; do
+		dosym ../.. /usr/include/node/${var}
+	done
+
+	if use doc; then
+		docinto html
+		dodoc -r "${S}"/doc/*
+	fi
+
+	if use npm; then
+		dodir /etc/npm
+
+		# Install bash completion for `npm`
+		# We need to temporarily replace default config path since
+		# npm otherwise tries to write outside of the sandbox
+		local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
+		sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
+		local tmp_npm_completion_file="$(emktemp)"
+		"${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
+		newbashcomp "${tmp_npm_completion_file}" npm
+		sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
+
+		# Move man pages
+		doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
+
+		# Clean up
+		rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
+		rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
+
+		local find_exp="-or -name"
+		local find_name=()
+		for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
+			".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
+			"*.md" "*.markdown" "*.bat" "*.cmd"; do
+			find_name+=( ${find_exp} "${match}" )
+		done
+
+		# Remove various development and/or inappropriate files and
+		# useless docs of dependend packages.
+		find "${LIBDIR}"/node_modules \
+			\( -type d -name examples \) -or \( -type f \( \
+				-iname "LICEN?E*" \
+				"${find_name[@]}" \
+			\) \) -exec rm -rf "{}" \;
+	fi
+
+	mv "${D}"/usr/share/doc/node "${D}"/usr/share/doc/${PF} || die
+}
+
+src_test() {
+	out/${BUILDTYPE}/cctest || die
+	"${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
+}
+
+pkg_postinst() {
+	einfo "The global npm config lives in /etc/npm. This deviates slightly"
+	einfo "from upstream which otherwise would have it live in /usr/etc/."
+	einfo ""
+	einfo "Protip: When using node-gyp to install native modules, you can"
+	einfo "avoid having to download extras by doing the following:"
+	einfo "$ node-gyp --nodedir /usr/include/node <command>"
+}

diff --git a/net-libs/nodejs/nodejs-12.14.0.ebuild b/net-libs/nodejs/nodejs-12.14.0.ebuild
new file mode 100644
index 0000000..f465fac
--- /dev/null
+++ b/net-libs/nodejs/nodejs-12.14.0.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{2_7,3_{6,7}} )
+PYTHON_REQ_USE="threads(+)"
+inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
+HOMEPAGE="https://nodejs.org/"
+SRC_URI="
+	https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz
+"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos"
+IUSE="bundled-ssl cpu_flags_x86_sse2 debug doc icu inspector libressl +npm +snapshot +ssl systemtap test"
+REQUIRED_USE="
+	bundled-ssl? ( ssl )
+	inspector? ( icu ssl )
+	libressl? ( bundled-ssl )
+	npm? ( ssl )
+"
+
+RDEPEND="
+	>=dev-libs/libuv-1.33.1:=
+	>=net-dns/c-ares-1.15.0
+	>=net-libs/http-parser-2.9.0:=
+	>=net-libs/nghttp2-1.39.2
+	sys-libs/zlib
+	icu? ( >=dev-libs/icu-64.2:= )
+	ssl? (
+		!bundled-ssl? ( >=dev-libs/openssl-1.1.1:0= )
+	)
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	systemtap? ( dev-util/systemtap )
+	test? ( net-misc/curl )
+"
+DEPEND="
+	${RDEPEND}
+"
+PATCHES=(
+	"${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
+	"${FILESDIR}"/${PN}-99999999-llhttp.patch
+)
+RESTRICT="test"
+S="${WORKDIR}/node-v${PV}"
+
+pkg_pretend() {
+	(use x86 && ! use cpu_flags_x86_sse2) && \
+		die "Your CPU doesn't support the required SSE2 instruction."
+
+	( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
+		die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
+}
+
+src_prepare() {
+	tc-export CC CXX PKG_CONFIG
+	export V=1
+	export BUILDTYPE=Release
+
+	# fix compilation on Darwin
+	# https://code.google.com/p/gyp/issues/detail?id=260
+	sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
+
+	# less verbose install output (stating the same as portage, basically)
+	sed -i -e "/print/d" tools/install.py || die
+
+	# proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
+	local LIBDIR=$(get_libdir)
+	sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
+	sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
+
+	# Avoid writing a depfile, not useful
+	sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
+
+	sed -i -e "/'-O3'/d" common.gypi node.gypi || die
+
+	# Avoid a test that I've only been able to reproduce from emerge. It doesnt
+	# seem sandbox related either (invoking it from a sandbox works fine).
+	# The issue is that no stdin handle is openened when asked for one.
+	# It doesn't really belong upstream , so it'll just be removed until someone
+	# with more gentoo-knowledge than me (jbergstroem) figures it out.
+	rm test/parallel/test-stdout-close-unref.js || die
+
+	# debug builds. change install path, remove optimisations and override buildtype
+	if use debug; then
+		sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
+		BUILDTYPE=Debug
+	fi
+
+	default
+}
+
+src_configure() {
+	xdg_environment_reset
+
+	local myconf=(
+		--shared-cares
+		--shared-http-parser
+		--shared-libuv
+		--shared-nghttp2
+		--shared-zlib
+	)
+	use debug && myconf+=( --debug )
+	use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
+	use inspector || myconf+=( --without-inspector )
+	use npm || myconf+=( --without-npm )
+	use snapshot && myconf+=( --with-snapshot )
+	use ssl && ( use bundled-ssl || myconf+=( --shared-openssl --openssl-use-def-ca-store ) ) || myconf+=( --without-ssl )
+
+	local myarch=""
+	case ${ABI} in
+		amd64) myarch="x64";;
+		arm) myarch="arm";;
+		arm64) myarch="arm64";;
+		ppc64) myarch="ppc64";;
+		x32) myarch="x32";;
+		x86) myarch="ia32";;
+		*) myarch="${ABI}";;
+	esac
+
+	GYP_DEFINES="linux_use_gold_flags=0
+		linux_use_bundled_binutils=0
+		linux_use_bundled_gold=0" \
+	"${EPYTHON}" configure.py \
+		--prefix="${EPREFIX}"/usr \
+		--dest-cpu=${myarch} \
+		$(use_with systemtap dtrace) \
+		"${myconf[@]}" || die
+}
+
+src_compile() {
+	emake -C out mksnapshot
+	pax-mark m "out/${BUILDTYPE}/mksnapshot"
+	emake -C out
+}
+
+src_install() {
+	local LIBDIR="${ED}/usr/$(get_libdir)"
+	default
+
+	pax-mark -m "${ED}"/usr/bin/node
+
+	# set up a symlink structure that node-gyp expects..
+	dodir /usr/include/node/deps/{v8,uv}
+	dosym . /usr/include/node/src
+	for var in deps/{uv,v8}/include; do
+		dosym ../.. /usr/include/node/${var}
+	done
+
+	if use doc; then
+		docinto html
+		dodoc -r "${S}"/doc/*
+	fi
+
+	if use npm; then
+		dodir /etc/npm
+
+		# Install bash completion for `npm`
+		# We need to temporarily replace default config path since
+		# npm otherwise tries to write outside of the sandbox
+		local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
+		sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
+		local tmp_npm_completion_file="$(emktemp)"
+		"${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
+		newbashcomp "${tmp_npm_completion_file}" npm
+		sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
+
+		# Move man pages
+		doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
+
+		# Clean up
+		rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
+		rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
+
+		local find_exp="-or -name"
+		local find_name=()
+		for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
+			".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
+			"*.md" "*.markdown" "*.bat" "*.cmd"; do
+			find_name+=( ${find_exp} "${match}" )
+		done
+
+		# Remove various development and/or inappropriate files and
+		# useless docs of dependend packages.
+		find "${LIBDIR}"/node_modules \
+			\( -type d -name examples \) -or \( -type f \( \
+				-iname "LICEN?E*" \
+				"${find_name[@]}" \
+			\) \) -exec rm -rf "{}" \;
+	fi
+
+	mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
+}
+
+src_test() {
+	out/${BUILDTYPE}/cctest || die
+	"${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
+}
+
+pkg_postinst() {
+	elog "The global npm config lives in /etc/npm. This deviates slightly"
+	elog "from upstream which otherwise would have it live in /usr/etc/."
+	elog ""
+	elog "Protip: When using node-gyp to install native modules, you can"
+	elog "avoid having to download extras by doing the following:"
+	elog "$ node-gyp --nodedir /usr/include/node <command>"
+}

diff --git a/net-libs/nodejs/nodejs-12.14.1-r1.ebuild b/net-libs/nodejs/nodejs-12.14.1-r1.ebuild
new file mode 100644
index 0000000..c98b726
--- /dev/null
+++ b/net-libs/nodejs/nodejs-12.14.1-r1.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{2_7,3_{6,7}} )
+PYTHON_REQ_USE="threads(+)"
+inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
+HOMEPAGE="https://nodejs.org/"
+SRC_URI="
+	https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz
+"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
+IUSE="bundled-ssl cpu_flags_x86_sse2 debug doc icu inspector libressl +npm +snapshot +ssl systemtap test"
+REQUIRED_USE="
+	bundled-ssl? ( ssl )
+	inspector? ( icu ssl )
+	libressl? ( bundled-ssl )
+	npm? ( ssl )
+"
+
+RDEPEND="
+	>=dev-libs/libuv-1.33.1:=
+	>=net-dns/c-ares-1.15.0
+	>=net-libs/http-parser-2.9.0:=
+	>=net-libs/nghttp2-1.40.0
+	sys-libs/zlib
+	icu? ( >=dev-libs/icu-64.2:= )
+	ssl? (
+		!bundled-ssl? ( >=dev-libs/openssl-1.1.1:0= )
+	)
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	systemtap? ( dev-util/systemtap )
+	test? ( net-misc/curl )
+"
+DEPEND="
+	${RDEPEND}
+"
+PATCHES=(
+	"${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
+	"${FILESDIR}"/${PN}-99999999-llhttp.patch
+)
+RESTRICT="test"
+S="${WORKDIR}/node-v${PV}"
+
+pkg_pretend() {
+	(use x86 && ! use cpu_flags_x86_sse2) && \
+		die "Your CPU doesn't support the required SSE2 instruction."
+
+	( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
+		die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
+}
+
+src_prepare() {
+	tc-export CC CXX PKG_CONFIG
+	export V=1
+	export BUILDTYPE=Release
+
+	# fix compilation on Darwin
+	# https://code.google.com/p/gyp/issues/detail?id=260
+	sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
+
+	# less verbose install output (stating the same as portage, basically)
+	sed -i -e "/print/d" tools/install.py || die
+
+	# proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
+	local LIBDIR=$(get_libdir)
+	sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
+	sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
+
+	# Avoid writing a depfile, not useful
+	sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
+
+	sed -i -e "/'-O3'/d" common.gypi node.gypi || die
+
+	# Avoid a test that I've only been able to reproduce from emerge. It doesnt
+	# seem sandbox related either (invoking it from a sandbox works fine).
+	# The issue is that no stdin handle is openened when asked for one.
+	# It doesn't really belong upstream , so it'll just be removed until someone
+	# with more gentoo-knowledge than me (jbergstroem) figures it out.
+	rm test/parallel/test-stdout-close-unref.js || die
+
+	# debug builds. change install path, remove optimisations and override buildtype
+	if use debug; then
+		sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
+		BUILDTYPE=Debug
+	fi
+
+	default
+}
+
+src_configure() {
+	xdg_environment_reset
+
+	local myconf=(
+		--shared-cares
+		--shared-http-parser
+		--shared-libuv
+		--shared-nghttp2
+		--shared-zlib
+	)
+	use debug && myconf+=( --debug )
+	use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
+	use inspector || myconf+=( --without-inspector )
+	use npm || myconf+=( --without-npm )
+	use snapshot || myconf+=( --without-node-snapshot )
+	use ssl && ( use bundled-ssl || myconf+=( --shared-openssl --openssl-use-def-ca-store ) ) || myconf+=( --without-ssl )
+
+	local myarch=""
+	case ${ABI} in
+		amd64) myarch="x64";;
+		arm) myarch="arm";;
+		arm64) myarch="arm64";;
+		ppc64) myarch="ppc64";;
+		x32) myarch="x32";;
+		x86) myarch="ia32";;
+		*) myarch="${ABI}";;
+	esac
+
+	GYP_DEFINES="linux_use_gold_flags=0
+		linux_use_bundled_binutils=0
+		linux_use_bundled_gold=0" \
+	"${EPYTHON}" configure.py \
+		--prefix="${EPREFIX}"/usr \
+		--dest-cpu=${myarch} \
+		$(use_with systemtap dtrace) \
+		"${myconf[@]}" || die
+}
+
+src_compile() {
+	emake -C out mksnapshot
+	pax-mark m "out/${BUILDTYPE}/mksnapshot"
+	emake -C out
+}
+
+src_install() {
+	local LIBDIR="${ED}/usr/$(get_libdir)"
+	default
+
+	pax-mark -m "${ED}"/usr/bin/node
+
+	# set up a symlink structure that node-gyp expects..
+	dodir /usr/include/node/deps/{v8,uv}
+	dosym . /usr/include/node/src
+	for var in deps/{uv,v8}/include; do
+		dosym ../.. /usr/include/node/${var}
+	done
+
+	if use doc; then
+		docinto html
+		dodoc -r "${S}"/doc/*
+	fi
+
+	if use npm; then
+		dodir /etc/npm
+
+		# Install bash completion for `npm`
+		# We need to temporarily replace default config path since
+		# npm otherwise tries to write outside of the sandbox
+		local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
+		sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
+		local tmp_npm_completion_file="$(emktemp)"
+		"${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
+		newbashcomp "${tmp_npm_completion_file}" npm
+		sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
+
+		# Move man pages
+		doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
+
+		# Clean up
+		rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
+		rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
+
+		local find_exp="-or -name"
+		local find_name=()
+		for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
+			".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
+			"*.md" "*.markdown" "*.bat" "*.cmd"; do
+			find_name+=( ${find_exp} "${match}" )
+		done
+
+		# Remove various development and/or inappropriate files and
+		# useless docs of dependend packages.
+		find "${LIBDIR}"/node_modules \
+			\( -type d -name examples \) -or \( -type f \( \
+				-iname "LICEN?E*" \
+				"${find_name[@]}" \
+			\) \) -exec rm -rf "{}" \;
+	fi
+
+	mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
+}
+
+src_test() {
+	out/${BUILDTYPE}/cctest || die
+	"${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
+}
+
+pkg_postinst() {
+	elog "The global npm config lives in /etc/npm. This deviates slightly"
+	elog "from upstream which otherwise would have it live in /usr/etc/."
+	elog ""
+	elog "Protip: When using node-gyp to install native modules, you can"
+	elog "avoid having to download extras by doing the following:"
+	elog "$ node-gyp --nodedir /usr/include/node <command>"
+}

diff --git a/net-libs/nodejs/nodejs-13.7.0-r1.ebuild b/net-libs/nodejs/nodejs-13.7.0-r1.ebuild
new file mode 100644
index 0000000..9e81066
--- /dev/null
+++ b/net-libs/nodejs/nodejs-13.7.0-r1.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{2_7,3_{6,7}} )
+PYTHON_REQ_USE="threads(+)"
+inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
+HOMEPAGE="https://nodejs.org/"
+SRC_URI="
+	https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz
+"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
+IUSE="bundled-ssl cpu_flags_x86_sse2 debug doc icu inspector libressl +npm pax_kernel +snapshot +ssl systemtap test"
+REQUIRED_USE="
+	bundled-ssl? ( ssl )
+	inspector? ( icu ssl )
+	libressl? ( bundled-ssl )
+	npm? ( ssl )
+"
+
+RDEPEND="
+	>=dev-libs/libuv-1.34.1:=
+	>=net-dns/c-ares-1.15.0
+	>=net-libs/nghttp2-1.40.0
+	sys-libs/zlib
+	icu? ( >=dev-libs/icu-64.2:= )
+	ssl? (
+		!bundled-ssl? ( >=dev-libs/openssl-1.1.1:0= )
+	)
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	systemtap? ( dev-util/systemtap )
+	test? ( net-misc/curl )
+	pax_kernel? ( sys-apps/elfix )
+"
+DEPEND="
+	${RDEPEND}
+"
+PATCHES=(
+	"${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
+)
+RESTRICT="test"
+S="${WORKDIR}/node-v${PV}"
+
+pkg_pretend() {
+	(use x86 && ! use cpu_flags_x86_sse2) && \
+		die "Your CPU doesn't support the required SSE2 instruction."
+
+	( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
+		die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
+}
+
+src_prepare() {
+	tc-export CC CXX PKG_CONFIG
+	export V=1
+	export BUILDTYPE=Release
+
+	# fix compilation on Darwin
+	# https://code.google.com/p/gyp/issues/detail?id=260
+	sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
+
+	# less verbose install output (stating the same as portage, basically)
+	sed -i -e "/print/d" tools/install.py || die
+
+	# proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
+	local LIBDIR=$(get_libdir)
+	sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
+	sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
+
+	# Avoid writing a depfile, not useful
+	sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
+
+	sed -i -e "/'-O3'/d" common.gypi node.gypi || die
+
+	# Avoid a test that I've only been able to reproduce from emerge. It doesnt
+	# seem sandbox related either (invoking it from a sandbox works fine).
+	# The issue is that no stdin handle is openened when asked for one.
+	# It doesn't really belong upstream , so it'll just be removed until someone
+	# with more gentoo-knowledge than me (jbergstroem) figures it out.
+	rm test/parallel/test-stdout-close-unref.js || die
+
+	# debug builds. change install path, remove optimisations and override buildtype
+	if use debug; then
+		sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
+		BUILDTYPE=Debug
+	fi
+
+	# We need to disable mprotect on two files when it builds Bug 694100.
+	use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.2.0-paxmarking.patch )
+
+	default
+}
+
+src_configure() {
+	xdg_environment_reset
+
+	local myconf=(
+		--shared-cares --shared-libuv --shared-nghttp2 --shared-zlib
+	)
+	use debug && myconf+=( --debug )
+	use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
+	use inspector || myconf+=( --without-inspector )
+	use npm || myconf+=( --without-npm )
+	use snapshot || myconf+=( --without-node-snapshot )
+	use ssl && ( use bundled-ssl || myconf+=( --shared-openssl --openssl-use-def-ca-store ) ) || myconf+=( --without-ssl )
+
+	local myarch=""
+	case ${ABI} in
+		amd64) myarch="x64";;
+		arm) myarch="arm";;
+		arm64) myarch="arm64";;
+		ppc64) myarch="ppc64";;
+		x32) myarch="x32";;
+		x86) myarch="ia32";;
+		*) myarch="${ABI}";;
+	esac
+
+	GYP_DEFINES="linux_use_gold_flags=0
+		linux_use_bundled_binutils=0
+		linux_use_bundled_gold=0" \
+	"${EPYTHON}" configure.py \
+		--prefix="${EPREFIX}"/usr \
+		--dest-cpu=${myarch} \
+		$(use_with systemtap dtrace) \
+		"${myconf[@]}" || die
+}
+
+src_compile() {
+	emake -C out
+}
+
+src_install() {
+	local LIBDIR="${ED}/usr/$(get_libdir)"
+	default
+
+	pax-mark -m "${ED}"/usr/bin/node
+
+	# set up a symlink structure that node-gyp expects..
+	dodir /usr/include/node/deps/{v8,uv}
+	dosym . /usr/include/node/src
+	for var in deps/{uv,v8}/include; do
+		dosym ../.. /usr/include/node/${var}
+	done
+
+	if use doc; then
+		docinto html
+		dodoc -r "${S}"/doc/*
+	fi
+
+	if use npm; then
+		dodir /etc/npm
+
+		# Install bash completion for `npm`
+		# We need to temporarily replace default config path since
+		# npm otherwise tries to write outside of the sandbox
+		local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
+		sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
+		local tmp_npm_completion_file="$(emktemp)"
+		"${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
+		newbashcomp "${tmp_npm_completion_file}" npm
+		sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
+
+		# Move man pages
+		doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
+
+		# Clean up
+		rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
+		rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
+
+		local find_exp="-or -name"
+		local find_name=()
+		for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
+			".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
+			"*.md" "*.markdown" "*.bat" "*.cmd"; do
+			find_name+=( ${find_exp} "${match}" )
+		done
+
+		# Remove various development and/or inappropriate files and
+		# useless docs of dependend packages.
+		find "${LIBDIR}"/node_modules \
+			\( -type d -name examples \) -or \( -type f \( \
+				-iname "LICEN?E*" \
+				"${find_name[@]}" \
+			\) \) -exec rm -rf "{}" \;
+	fi
+
+	mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
+}
+
+src_test() {
+	out/${BUILDTYPE}/cctest || die
+	"${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
+}
+
+pkg_postinst() {
+	elog "The global npm config lives in /etc/npm. This deviates slightly"
+	elog "from upstream which otherwise would have it live in /usr/etc/."
+	elog ""
+	elog "Protip: When using node-gyp to install native modules, you can"
+	elog "avoid having to download extras by doing the following:"
+	elog "$ node-gyp --nodedir /usr/include/node <command>"
+}


             reply	other threads:[~2020-01-26 11:41 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 11:41 Stefan Strogin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-19 21:43 [gentoo-commits] repo/proj/libressl:master commit in: net-libs/nodejs/ Stefan Strogin
2020-02-19 21:43 Stefan Strogin
2020-02-16  7:03 Stefan Strogin
2020-02-06 19:32 Stefan Strogin
2020-02-06 19:32 Stefan Strogin
2020-01-26 12:01 Stefan Strogin
2020-01-09 18:29 Stefan Strogin
2020-01-09 18:29 Stefan Strogin
2019-12-30  9:08 Stefan Strogin
2019-12-30  9:08 Stefan Strogin
2019-12-20  2:26 Stefan Strogin
2019-10-18 13:05 Stefan Strogin
2019-10-18 13:05 Stefan Strogin
2019-10-18 13:05 Stefan Strogin
2019-10-10 20:07 Stefan Strogin
2019-10-03 11:39 Stefan Strogin
2019-09-28  9:51 Stefan Strogin
2019-09-28  9:51 Stefan Strogin
2019-09-05  9:16 Stefan Strogin
2019-09-05  9:16 Stefan Strogin
2019-08-27 17:14 Stefan Strogin
2019-08-27 17:14 Stefan Strogin
2019-08-27 17:14 Stefan Strogin
2019-08-20  3:31 Stefan Strogin
2019-08-17  2:22 Stefan Strogin
2019-08-17  2:22 Stefan Strogin
2019-04-18  1:27 Stefan Strogin
2019-04-17  4:47 Stefan Strogin
2019-04-17  4:47 Stefan Strogin
2019-03-25  6:27 Stefan Strogin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1580038803.ae06b8a3d00a07936e6a19046158f64cbcefb611.steils@gentoo \
    --to=steils@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox