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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Aug 17 05:54:09 2012 UTC (9 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump to 0.8.7

(Portage version: 2.2.0_alpha121/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.3.ebuild,v 1.1 2012/07/25 06:31:23 patrick Exp $
4
5 EAPI=3
6
7 PYTHON_DEPEND="2"
8
9 inherit python eutils 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 }
41
42 src_configure() {
43 # this is an autotools lookalike confuserator
44 ./configure --shared-v8 --prefix="${EPREFIX}"/usr --shared-v8-includes="${EPREFIX}"/usr/include --openssl-use-sys --shared-zlib || die
45 }
46
47 src_compile() {
48 emake || die
49 }
50
51 src_install() {
52 # there are no words to describe the epic idiocy of ...
53 # NOT using make but a JavaScript thingy to try to install things ... to the wrong place
54 # WHY U NO MAEK SENSE?!
55 #emake DESTDIR="${D}" install || die
56
57 mkdir -p "${ED}"/usr/include/node
58 mkdir -p "${ED}"/usr/bin
59 mkdir -p "${ED}"/lib/node_modules/npm
60 mkdir -p "${ED}"/lib/node
61 cp '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"
62 cp 'deps/uv/include/ares.h' 'deps/uv/include/ares_version.h' "${ED}"/usr/include/node || die "Failed to copy stuff"
63 cp 'out/Release/node' "${ED}"/usr/bin/node || die "Failed to copy stuff"
64 cp -R deps/npm/* "${ED}"/lib/node_modules/npm || die "Failed to copy stuff"
65 cp -R tools/wafadmin "${ED}"/lib/node/ || die "Failed to copy stuff"
66 cp 'tools/node-waf' "${ED}"/usr/bin/ || die "Failed to copy stuff"
67
68 # now add some extra stupid just because we can
69 # needs to be a symlink because of hardcoded paths ... no es bueno!
70 dosym /lib/node_modules/npm/bin/npm-cli.js /bin/npm
71 pax-mark -m "${ED}"/usr/bin/node
72 }
73
74 src_test() {
75 emake test || die
76 }

  ViewVC Help
Powered by ViewVC 1.1.13