From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-994968-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 67BFB138330
	for <garchives@archives.gentoo.org>; Thu,  4 Jan 2018 12:31:04 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 289F7E080E;
	Thu,  4 Jan 2018 12:31:03 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E75EAE0809
	for <gentoo-commits@lists.gentoo.org>; Thu,  4 Jan 2018 12:31:02 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 7FF91335C07
	for <gentoo-commits@lists.gentoo.org>; Thu,  4 Jan 2018 12:31:01 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 19252147
	for <gentoo-commits@lists.gentoo.org>; Thu,  4 Jan 2018 12:31:00 +0000 (UTC)
From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" <jer@gentoo.org>
Message-ID: <1515069053.59df7be6122b825f167bdfc7b761a0667348ba1b.jer@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nodejs/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-libs/nodejs/Manifest net-libs/nodejs/nodejs-0.12.18.ebuild
X-VCS-Directories: net-libs/nodejs/
X-VCS-Committer: jer
X-VCS-Committer-Name: Jeroen Roovers
X-VCS-Revision: 59df7be6122b825f167bdfc7b761a0667348ba1b
X-VCS-Branch: master
Date: Thu,  4 Jan 2018 12:31:00 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 0a9d7df7-3eca-4f88-bc1f-1d13aa43b40a
X-Archives-Hash: e3893b51f733815cdcf3196af45d7ecd

commit:     59df7be6122b825f167bdfc7b761a0667348ba1b
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  4 12:27:00 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Jan  4 12:30:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59df7be6

net-libs/nodejs: Version 0.12.18.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-libs/nodejs/Manifest              |   1 +
 net-libs/nodejs/nodejs-0.12.18.ebuild | 124 ++++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 2a27ec2a9ba..e75e396b7cb 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -1,4 +1,5 @@
 DIST node-v0.12.17.tar.gz 19938029 BLAKE2B 0118fb016c70afc9940c3b9e2fbed9fd3a56ae7fd8bff6f2ec69320f1e3a71868f7e882783871e842d163b5195628040736e679ca715ebddc6eb6a76fff1288f SHA512 86c22b17f57018083b07096beeca10e6dfa7569b3d1a25a3b12dd82796db3c9536e6136e0dd0ff62b4de116413f3722b36ce396faa46d8640f80ab09ccfcbca7
+DIST node-v0.12.18.tar.gz 19842591 BLAKE2B f94f4de6e2875267be194580c645087a262b90da99f10d651a22838c041da07056df81204bb04ce8da083a080062509dcca4d1e3ac2250d651ead8a4cc025028 SHA512 6866608a43eb213f3b715ea0fcc28983fd959ab679c567a1b464f62acd936506f2bce88ea48a60209d8ef8d98259f4b47cd3434893eb4ff82a132775edb37b7b
 DIST node-v4.8.5.tar.xz 13316060 BLAKE2B fb32f176b9d4add3e9695f0bee7ebd0bba66770d479b1fade572de4694566603f08875da6ff97a1904edd1156708b58670fb1c4717e213aab6ad44ae5d470f40 SHA512 64d936ca14648b5648dedb41f2ee8d39466788762d335fbfc9ce4cb7484d05b6c24ad912fb4b1579a08f466be50b129a96be700fd89cbca5e1de84baa63ddd12
 DIST node-v4.8.7.tar.xz 13370828 BLAKE2B b1ee93a586b66f8582783b1be50667547afe4bf48038ebc0b8148db55542cbc0520ac84ef88e4a7f453cabc245f484c32dbc238c1932bbc708791ceeb5c9d2ab SHA512 25837a31023747723b146c45984a5b2096b61c0aa43cbf45fc8ff50b4bd5079bd0bc9f1dfd3fb076817448dc5537eb93ffb2f345280b7756ba93b67ad757c696
 DIST node-v6.11.5.tar.xz 15699404 BLAKE2B ba2df91bf5ef38cedb60b42919cf56f16807e619a81876fc92a5741e49da7ec91c4239d00f549c5e80d0bb8282bb9b396dd984507916cd18d61b403a3a7cef94 SHA512 62490725ef7957294c1bddf21ef0626c7472876791210168116501255ecee58457e9de9b044e10033706243299bbfd1495efeca169596fbf26f5eeba6d8fa4c9

diff --git a/net-libs/nodejs/nodejs-0.12.18.ebuild b/net-libs/nodejs/nodejs-0.12.18.ebuild
new file mode 100644
index 00000000000..4bfc66c6f8c
--- /dev/null
+++ b/net-libs/nodejs/nodejs-0.12.18.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# has known failures. sigh.
+RESTRICT="test"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit pax-utils python-single-r1 toolchain-funcs
+
+DESCRIPTION="Evented IO for V8 Javascript"
+HOMEPAGE="http://nodejs.org/"
+SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~x64-macos"
+IUSE="debug icu +npm +snapshot +ssl"
+
+RDEPEND="icu? ( dev-libs/icu )
+	${PYTHON_DEPS}
+	ssl? ( dev-libs/openssl:0=[-bindist] )
+	>=net-libs/http-parser-2.6.1
+	>=dev-libs/libuv-1.4.2"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/node-v${PV}"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+	tc-export CC CXX PKG_CONFIG
+	export V=1 # Verbose build
+	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/|| 'python'/|| '${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}'/" lib/module.js || die
+	sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
+
+	default
+
+	# 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
+}
+
+src_configure() {
+	local myconf=()
+	local myarch=""
+	use debug && myconf+=( --debug )
+	use icu && myconf+=( --with-intl=system-icu )
+	use npm || myconf+=( --without-npm )
+	use snapshot || myconf+=( --without-snapshot )
+	use ssl || myconf+=( --without-ssl )
+
+	case ${ABI} in
+		x86) myarch="ia32";;
+		amd64) myarch="x64";;
+		arm) myarch="arm";;
+		*) die "Unrecognized ARCH ${ARCH}";;
+	esac
+
+	"${PYTHON}" configure \
+		--prefix="${EPREFIX}"/usr \
+		--dest-cpu=${myarch} \
+		--shared-openssl \
+		--shared-libuv \
+		--shared-http-parser \
+		--shared-zlib \
+		--without-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="${ED}" PREFIX=/usr
+	use npm && dodoc -r "${LIBDIR}"/node_modules/npm/html
+	rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die
+	find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or -name "LICENCE*" -delete
+
+	# set up a symlink structure that npm 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
+
+	pax-mark -m "${ED}"/usr/bin/node
+}
+
+src_test() {
+	declare -xl TESTTYPE="${BUILDTYPE}"
+	"${PYTHON}" tools/test.py --mode=${TESTTYPE} -J message simple || die
+}
+
+pkg_postinst() {
+	einfo "When using node-gyp to install native modules, you can avoid"
+	einfo "having to download the full tarball by doing the following:"
+	einfo ""
+	einfo "node-gyp --nodedir /usr/include/node <command>"
+}