# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # todo # 1. optionally add IUSE=debug # 2. update LICENSE EAPI=5 PYTHON_COMPAT=( python2_6 python2_7 ) inherit python-any-r1 pax-utils DESCRIPTION="Evented IO for V8 Javascript" HOMEPAGE="http://nodejs.org/" SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~arm ~x86 ~x64-macos" IUSE="" DEPEND="dev-libs/openssl" RDEPEND="${DEPEND}" S=${WORKDIR}/node-v${PV} src_prepare() { # fix compilation on Darwin # http://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 } src_configure() { "${PYTHON}" configure --prefix="${EPREFIX}"/usr --openssl-use-sys --shared-zlib || die } src_compile() { emake || die } src_install() { # the install script adds /usr , so don't below "${PYTHON}" tools/install.py install "${ED}" dohtml -r "${ED}"/usr/lib/node_modules/npm/html/* rm -rf "${ED}"/usr/lib/node_modules/npm/doc "${ED}"/usr/lib/node_modules/npm/html rm -rf "${ED}"/usr/lib/dtrace pax-mark -m "${ED}"/usr/bin/node } src_test() { "${PYTHON}" tools/test.py --mode=release simple message || die }