public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, net-libs/nodejs/
Date: Sat, 16 Mar 2019 14:45:39 +0000 (UTC)	[thread overview]
Message-ID: <1552747534.d05b43bd91d46525a82cfc49b12ed4effc895153.jer@gentoo> (raw)

commit:     d05b43bd91d46525a82cfc49b12ed4effc895153
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 16 12:13:50 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Mar 16 14:45:34 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d05b43bd

net-libs/nodejs: Version 11.12.0

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-libs/nodejs/Manifest              |   1 +
 net-libs/nodejs/nodejs-11.12.0.ebuild | 209 ++++++++++++++++++++++++++++++++++
 profiles/package.mask                 |   3 +-
 3 files changed, 211 insertions(+), 2 deletions(-)

diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 68896f695d5..f6c449c3f90 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -3,6 +3,7 @@ DIST node-v10.15.2.tar.xz 20232972 BLAKE2B 3ffaa0890ddec6b9d00a0b3f32fc62e55a665
 DIST node-v10.15.3.tar.xz 20262632 BLAKE2B d65d4e274fa829be5cda1970b0ebe7081e8476334cb825e5727324c3202bc015f4ba39589608284d0f8c0b722079c06d1587de5299a3c81ccb7b0eacbdaccf84 SHA512 cf741f733af7a7e1fbd37b0f98110078494b4771dbdfccacfda95a5ea4cda6cdcea4f8d31dddcf27477213614e4ab6cf7d1a1f900cb92936333730737ac4f9e8
 DIST node-v11.10.1.tar.xz 22074212 BLAKE2B de4c224063050901a3898bb9d2a26dba8027b3722528c402d461f2ca892a80e230e16131e9c8b22d6fefbd44b79a6d78aef631934c80ed53f8601fd2d3405150 SHA512 8da793946d18c8368f12e786bc4fdcff0ac61237c95f896a49895d6433edcd42005d50237095fd2b1c69b51d56900d122528783338dbb97e5fcee9dcc9a5812c
 DIST node-v11.11.0.tar.xz 22094004 BLAKE2B 3ca03a659fc1104bf280510277a74167a2a188ba0798c4723730fb850cae3d4ddc4d5f4bbad88dc9dde8b7f57b02f5d9c47d047bb15668e3488e0a002e225cfb SHA512 c89fd154dfbaa999806429c6e416c4fa2f0d5f3cfb9ac6de8b21f9195681ae0170325ae6fd7ab811f4f394d03c1d56db77ae1c730d5e8ff6a64b9a6dfa2286e8
+DIST node-v11.12.0.tar.xz 22077236 BLAKE2B 1cd7252983c0e444e0ce183a11af0912c994b2e36a8f50a86ca543f59548629fb3b857a0d106340f44124637e06cf90b2e079a17a30c2bd8386bd6575fac1fd9 SHA512 54d19ee6cb5127298276287f536dca9d4c9389038bb23fc48e8ef0246bcfcf59961ae704a94c68eb67104a230e3b23cbb7c8559aca83f542b35a46b2797d31e4
 DIST node-v4.9.1.tar.xz 13250164 BLAKE2B 7a689b99bb4bf507f7f21dd2c096a5766d023a8174c0f468cab37365af1920b8700da04157e1a406917790524255ef32c243a74662fd50ef7d3567d189dac9cf SHA512 690c9fdf608e5194069a10955bdd94ec87cb1c308f13bc4d2cae92fa01436ace10fadf58f2e51d477dde6c570b23edc1c71fafea79bfc9cab2903eb2fa5f87aa
 DIST node-v6.14.4.tar.xz 15842824 BLAKE2B fc56364be64fe5824e2bb50d861ebf8f58f9895f2c9c108b8df3315b127ffb2755eac85c28165ac9779adab4611ce8f5ea1a5745f43ebaa1389e82b8215c6396 SHA512 1ead0c097ec125230dd631f19a5c3ec06a1371f9ca3b392b5ad08fcc227dd0142f33ad52f96890c2c17448a4951a635b9099dfff00d7d8b3ffb59b07904d1bfa
 DIST node-v6.17.0.tar.xz 15853760 BLAKE2B f1872b2ed43c447beff2b3278e49f9f10bbef58bba2640f6ecd889facfa4c5e5ae142f3b30721faae615df42c0870d7c09147930a259fa81c161b29559e2a340 SHA512 8ae9bfa0336a7d0d9f4a372330de1f877354a3d68bdd6977285787f81999012e42faf4ccef5981fe565ea9e2f18c5490b857bab29359fdf906b5a9fb14628858

diff --git a/net-libs/nodejs/nodejs-11.12.0.ebuild b/net-libs/nodejs/nodejs-11.12.0.ebuild
new file mode 100644
index 00000000000..010d4dffa4e
--- /dev/null
+++ b/net-libs/nodejs/nodejs-11.12.0.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
+
+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="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test"
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	inspector? ( icu ssl )
+	npm? ( ssl )
+"
+
+RDEPEND="
+	>=dev-libs/libuv-1.26.0:=
+	>=net-dns/c-ares-1.15.0
+	>=net-libs/http-parser-2.9.0:=
+	>=net-libs/nghttp2-1.34.0
+	sys-libs/zlib
+	icu? ( >=dev-libs/icu-63.1:= )
+	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
+	"${FILESDIR}"/${PN}-99999999-llhttp.patch
+)
+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() {
+	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 && 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
+		# Patch docs to make them offline readable
+		for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
+			sed -i '/fonts.googleapis.com/ d' $i;
+		done
+		# Install docs
+		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/profiles/package.mask b/profiles/package.mask
index ded0ba05140..ca22832a85e 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -285,8 +285,7 @@ app-arch/freeze
 # Jeroen Roovers <jer@gentoo.org> (31 Jan 2019)
 # Depends on =dev-libs/openssl-1.1.1*
 # bug #670574
-=net-libs/nodejs-11.10*
-=net-libs/nodejs-11.11*
+=net-libs/nodejs-11*
 
 # Dennis Lamm <expeditioneer@gentoo.org> (29 Jan 2019)
 # Depends on >=app-text/enchant-2.0.0 which is masked


             reply	other threads:[~2019-03-16 14:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-16 14:45 Jeroen Roovers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-08-13 22:57 [gentoo-commits] repo/gentoo:master commit in: profiles/, net-libs/nodejs/ Marek Szuba
2019-04-24  9:24 Jeroen Roovers
2019-02-15 10:59 Jeroen Roovers
2019-01-31 12:49 Jeroen Roovers

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=1552747534.d05b43bd91d46525a82cfc49b12ed4effc895153.jer@gentoo \
    --to=jer@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