Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 74 lines (57 sloc) 1.489 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/nodejs/nodejs-0.6.7.ebuild,v 1.1 2012/01/11 07:44:30 patrick Exp $

EAPI="2"

inherit eutils toolchain-funcs

# omgwtf
RESTRICT="test"

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="~x86 ~amd64 ~arm"
IUSE=""

DEPEND=">=dev-lang/v8-3.5.10.22
<dev-lang/v8-3.7
dev-libs/openssl"
RDEPEND="${DEPEND}"

S=${WORKDIR}/node-v${PV}

src_configure() {

if tc-is-cross-compiler ; then

local ROOT=/usr/$CHOST

export AR=$(tc-getAR)
export AS=$(tc-getAS)
export CC=$(tc-getCC)
export CPP=$(tc-getCPP)
export CXX=$(tc-getCXX)
export LD=$(tc-getLD)
export NM=$(tc-getNM)
export PKG_CONFIG=$(tc-getPKG_CONFIG)
export RANLIB=$(tc-getRANLIB)

./configure \
--shared-v8 \
--shared-v8-includes=$ROOT/usr/include \
--shared-v8-libpath=$ROOT/usr/lib \
--prefix=/usr \
--dest-cpu=${ARCH} \
--openssl-includes=$ROOT/usr/include \
--openssl-libpath=$ROOT/usr/lib \
--without-snapshot || die
else
# this is a waf confuserator
# What about --shared-openssl
./configure \
--shared-v8 --prefix=/usr || die
fi
}

src_compile() {
emake || die
}

src_install() {
# FIXME: remove docs from /usr/lib/node_modules
emake DESTDIR="${D}" install || die
}

src_test() {
emake test || die
}

Something went wrong with that request. Please try again.