/[gentoo-x86]/net-libs/nodejs/nodejs-0.8.6.ebuild
Gentoo

Contents of /net-libs/nodejs/nodejs-0.8.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Sep 24 05:06:00 2012 UTC (7 months, 3 weeks ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump

(Portage version: 2.2.0_alpha131/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/nodejs/nodejs-0.8.6.ebuild,v 1.1 2012/08/08 03:50:18 patrick Exp $
4
5 EAPI=3
6
7 PYTHON_DEPEND="2"
8
9 inherit python eutils multilib pax-utils
10
11 # omgwtf
12 RESTRICT="test"
13
14 DESCRIPTION="Evented IO for V8 Javascript"
15 HOMEPAGE="http://nodejs.org/"
16 SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz"
17
18 LICENSE="GPL-2"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86 ~x64-macos"
21 IUSE=""
22
23 DEPEND=">=dev-lang/v8-3.11.10
24 dev-libs/openssl"
25 RDEPEND="${DEPEND}"
26
27 S=${WORKDIR}/node-v${PV}
28
29 pkg_setup() {
30 python_set_active_version 2
31 python_pkg_setup
32 }
33
34 src_prepare() {
35 # fix compilation on Darwin
36 # http://code.google.com/p/gyp/issues/detail?id=260
37 sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
38 # Hardcoded braindamage extraction helper
39 #sed -i -e 's:wafdir = join(prefix, "lib", "node"):wafdir = "/lib/node/":' tools/node-waf || die
40 python_convert_shebangs 2 tools/node-waf || die
41 }
42
43 src_configure() {
44 # this is an autotools lookalike confuserator
45 ./configure --shared-v8 --prefix="${EPREFIX}"/usr --shared-v8-includes="${EPREFIX}"/usr/include --openssl-use-sys --shared-zlib || die
46 }
47
48 src_compile() {
49 emake || die
50 }
51
52 src_install() {
53 local MYLIB=$(get_libdir)
54 mkdir -p "${ED}"/usr/include/node
55 mkdir -p "${ED}"/usr/bin
56 mkdir -p "${ED}"/usr/"${MYLIB}"/node_modules/npm
57 mkdir -p "${ED}"/usr/"${MYLIB}"/node
58 cp 'src/eio-emul.h' 'src/ev-emul.h' 'src/node.h' 'src/node_buffer.h' 'src/node_object_wrap.h' 'src/node_version.h' "${ED}"/usr/include/node || die "Failed to copy stuff"
59 cp -R deps/uv/include/* "${ED}"/usr/include/node || die "Failed to copy stuff"
60 cp 'out/Release/node' "${ED}"/usr/bin/node || die "Failed to copy stuff"
61 cp -R deps/npm/* "${ED}"/usr/"${MYLIB}"/node_modules/npm || die "Failed to copy stuff"
62 cp -R tools/wafadmin "${ED}"/usr/"${MYLIB}"/node/ || die "Failed to copy stuff"
63 cp 'tools/node-waf' "${ED}"/usr/bin/ || die "Failed to copy stuff"
64
65 # now add some extra stupid just because we can
66 # needs to be a symlink because of hardcoded paths ... no es bueno!
67 dosym /usr/"${MYLIB}"/node_modules/npm/bin/npm-cli.js /usr/bin/npm
68 pax-mark -m "${ED}"/usr/bin/node
69 }
70
71 src_test() {
72 emake test || die
73 }

  ViewVC Help
Powered by ViewVC 1.1.13