Mercurial > hg > portage
annotate net-libs/nodejs/nodejs-5.4.0.ebuild @ 462:d9b3090466c7
remove outdated ebuild that relies on Qt4
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 28 Aug 2018 07:28:27 +0200 |
parents | 757d9b59e20b |
children |
rev | line source |
---|---|
408
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
1 # Copyright 1999-2015 Gentoo Foundation |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
2 # Distributed under the terms of the GNU General Public License v2 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
3 # $Id$ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
4 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
5 EAPI=5 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
6 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
7 PYTHON_COMPAT=( python2_7 ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
8 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
9 inherit flag-o-matic pax-utils python-single-r1 toolchain-funcs |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
10 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
11 DESCRIPTION="Evented IO for V8 Javascript" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
12 HOMEPAGE="http://nodejs.org/" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
13 SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
14 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
15 LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
16 SLOT="0" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
17 KEYWORDS="~amd64 ~arm ~x86 ~x64-macos" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
18 IUSE="debug icu +npm snapshot +ssl" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
19 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
20 RDEPEND="icu? ( >=dev-libs/icu-55:= ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
21 ${PYTHON_DEPS} |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
22 >=net-libs/http-parser-2.5:= |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
23 >=dev-libs/libuv-1.6.1:= |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
24 >=dev-libs/openssl-1.0.2d:0=[-bindist] |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
25 sys-libs/zlib |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
26 " |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
27 DEPEND="${RDEPEND} |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
28 !!net-libs/iojs" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
29 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
30 S="${WORKDIR}/node-v${PV}" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
31 REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
32 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
33 pkg_pretend() { |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
34 if [[ ${MERGE_TYPE} != "binary" ]] ; then |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
35 if ! test-flag-CXX -std=c++11 ; then |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
36 die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
37 fi |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
38 fi |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
39 } |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
40 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
41 src_prepare() { |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
42 tc-export CC CXX PKG_CONFIG |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
43 export V=1 # Verbose build |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
44 export BUILDTYPE=Release |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
45 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
46 # fix compilation on Darwin |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
47 # https://code.google.com/p/gyp/issues/detail?id=260 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
48 sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
49 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
50 # make sure we use python2.* while using gyp |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
51 sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
52 sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
53 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
54 # less verbose install output (stating the same as portage, basically) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
55 sed -i -e "/print/d" tools/install.py || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
56 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
57 # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
58 local LIBDIR=$(get_libdir) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
59 sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
60 sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
61 sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
62 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
63 # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
64 # seem sandbox related either (invoking it from a sandbox works fine). |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
65 # The issue is that no stdin handle is openened when asked for one. |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
66 # It doesn't really belong upstream , so it'll just be removed until someone |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
67 # with more gentoo-knowledge than me (jbergstroem) figures it out. |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
68 rm test/parallel/test-stdout-close-unref.js || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
69 # AssertionError: 1 == 2 (on line 97) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
70 rm test/parallel/test-cluster-disconnect.js || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
71 # AssertionError: Client never errored |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
72 rm test/parallel/test-tls-hello-parser-failure.js || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
73 # --- TIMEOUT --- |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
74 rm test/parallel/test-child-process-fork-net.js \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
75 test/parallel/test-child-process-fork-net2.js \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
76 test/parallel/test-child-process-recv-handle.js \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
77 test/parallel/test-cluster-dgram-1.js \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
78 test/parallel/test-cluster-send-deadlock.js \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
79 test/parallel/test-cluster-shared-handle-bind-error.js \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
80 test/parallel/test-dgram-exclusive-implicit-bind.js \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
81 test/parallel/test-tls-ticket-cluster.js || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
82 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
83 # debug builds. change install path, remove optimisations and override buildtype |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
84 if use debug; then |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
85 sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
86 BUILDTYPE=Debug |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
87 fi |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
88 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
89 epatch_user |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
90 } |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
91 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
92 src_configure() { |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
93 local myarch="" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
94 local myconf+=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
95 use npm || myconf+=( --without-npm ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
96 use icu && myconf+=( --with-intl=system-icu ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
97 use snapshot && myconf+=( --with-snapshot ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
98 use ssl || myconf+=( --without-ssl ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
99 use debug && myconf+=( --debug ) |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
100 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
101 case ${ABI} in |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
102 x86) myarch="ia32";; |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
103 amd64) myarch="x64";; |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
104 x32) myarch="x32";; |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
105 arm) myarch="arm";; |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
106 arm64) myarch="arm64";; |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
107 *) die "Unrecognized ARCH ${ARCH}";; |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
108 esac |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
109 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
110 GYP_DEFINES="linux_use_gold_flags=0 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
111 linux_use_bundled_binutils=0 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
112 linux_use_bundled_gold=0" \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
113 "${PYTHON}" configure \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
114 --prefix="${EPREFIX}"/usr \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
115 --dest-cpu=${myarch} \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
116 --without-dtrace \ |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
117 "${myconf[@]}" || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
118 } |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
119 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
120 src_compile() { |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
121 emake -C out mksnapshot |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
122 pax-mark m "out/${BUILDTYPE}/mksnapshot" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
123 emake -C out |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
124 } |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
125 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
126 src_install() { |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
127 local LIBDIR="${ED}/usr/$(get_libdir)" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
128 emake install DESTDIR="${ED}" PREFIX=/usr |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
129 if use npm; then |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
130 dodoc -r "${LIBDIR}"/node_modules/npm/html |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
131 rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
132 find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or -name "LICENCE*" -delete || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
133 fi |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
134 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
135 # set up a symlink structure that npm expects.. |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
136 dodir /usr/include/node/deps/{v8,uv} |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
137 dosym . /usr/include/node/src |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
138 for var in deps/{uv,v8}/include; do |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
139 dosym ../.. /usr/include/node/${var} |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
140 done |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
141 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
142 pax-mark -m "${ED}"/usr/bin/node |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
143 } |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
144 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
145 src_test() { |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
146 out/${BUILDTYPE}/cctest || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
147 declare -xl TESTTYPE="${BUILDTYPE}" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
148 "${PYTHON}" tools/test.py --mode=${TESTTYPE} -J message parallel sequential || die |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
149 } |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
150 |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
151 pkg_postinst() { |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
152 einfo "When using node-gyp to install native modules, you can avoid" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
153 einfo "having to download the full tarball by doing the following:" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
154 einfo "" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
155 einfo "node-gyp --nodedir /usr/include/node <command>" |
757d9b59e20b
add an ebuild for the latest node version
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
156 } |