Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-libs/iojs: iojs-2.2.1.ebuild ChangeLog
Date: Tue, 02 Jun 2015 09:21:48
Message-Id: 20150602092141.D2EB7A19@oystercatcher.gentoo.org
1 mgorny 15/06/02 09:21:41
2
3 Modified: ChangeLog
4 Added: iojs-2.2.1.ebuild
5 Log:
6 Version bump. Fixes bug #550882. https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/137 by jbergstroem.
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.20 net-libs/iojs/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/iojs/ChangeLog?rev=1.20&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/iojs/ChangeLog?rev=1.20&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/iojs/ChangeLog?r1=1.19&r2=1.20
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-libs/iojs/ChangeLog,v
20 retrieving revision 1.19
21 retrieving revision 1.20
22 diff -u -r1.19 -r1.20
23 --- ChangeLog 26 May 2015 10:18:33 -0000 1.19
24 +++ ChangeLog 2 Jun 2015 09:21:41 -0000 1.20
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-libs/iojs
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-libs/iojs/ChangeLog,v 1.19 2015/05/26 10:18:33 mgorny Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-libs/iojs/ChangeLog,v 1.20 2015/06/02 09:21:41 mgorny Exp $
30 +
31 +*iojs-2.2.1 (02 Jun 2015)
32 +
33 + 02 Jun 2015; Michał Górny <mgorny@g.o> +iojs-2.2.1.ebuild:
34 + Version bump. Fixes bug #550882. https://github.com/gentoo/gentoo-portage-
35 + rsync-mirror/pull/137 by jbergstroem.
36
37 *iojs-2.1.0 (26 May 2015)
38
39
40
41
42 1.1 net-libs/iojs/iojs-2.2.1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/iojs/iojs-2.2.1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/iojs/iojs-2.2.1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: iojs-2.2.1.ebuild
48 ===================================================================
49 # Copyright 1999-2015 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-libs/iojs/iojs-2.2.1.ebuild,v 1.1 2015/06/02 09:21:41 mgorny Exp $
52
53 EAPI=5
54
55 PYTHON_COMPAT=( python2_7 )
56
57 MY_PV="v${PV}"
58 MY_P="${PN}-${MY_PV}"
59
60 inherit flag-o-matic pax-utils python-single-r1 toolchain-funcs
61
62 DESCRIPTION="An npm compatible platform originally based on node.js"
63 HOMEPAGE="http://iojs.org/"
64 SRC_URI="http://iojs.org/dist/${MY_PV}/${MY_P}.tar.xz"
65
66 LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
67 SLOT="0"
68 KEYWORDS="~amd64 ~arm ~x86 ~x64-macos"
69 IUSE="bundled-libs debug icu +npm snapshot +ssl"
70
71 RDEPEND="icu? ( dev-libs/icu )
72 ${PYTHON_DEPS}
73 !bundled-libs? (
74 >=net-libs/http-parser-2.5
75 >=dev-libs/libuv-1.5.0
76 >=dev-libs/openssl-1.0.2a[-bindist]
77 )"
78 DEPEND="${RDEPEND}
79 !!net-libs/nodejs"
80 S="${WORKDIR}/${MY_P}"
81 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
82
83 pkg_pretend() {
84 if ! test-flag-CXX -std=c++11 ; then
85 die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
86 fi
87 }
88
89 src_prepare() {
90 tc-export CC CXX PKG_CONFIG
91 export V=1 # Verbose build
92 export BUILDTYPE=Release
93
94 # fix compilation on Darwin
95 # http://code.google.com/p/gyp/issues/detail?id=260
96 sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
97
98 # make sure we use python2.* while using gyp
99 sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
100 sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
101
102 # less verbose install output (stating the same as portage, basically)
103 sed -i -e "/print/d" tools/install.py || die
104
105 # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
106 local LIBDIR=$(get_libdir)
107 sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
108 sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
109 sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
110
111 # Avoid a test that I've only been able to reproduce from emerge. It doesnt
112 # seem sandbox related either (invoking it from a sandbox works fine).
113 # The issue is that no stdin handle is openened when asked for one.
114 # It doesn't really belong upstream , so it'll just be removed until someone
115 # with more gentoo-knowledge than me (jbergstroem) figures it out.
116 rm test/parallel/test-stdout-close-unref.js || die
117
118 # debug builds. change install path, remove optimisations and override buildtype
119 if use debug; then
120 sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
121 BUILDTYPE=Debug
122 fi
123 }
124
125 src_configure() {
126 local myconf=()
127 local myarch=""
128 use bundled-libs || myconf+=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
129 use npm || myconf+=( --without-npm )
130 use icu && myconf+=( --with-intl=system-icu )
131 use snapshot && myconf+=( --with-snapshot )
132 use ssl || myconf+=( --without-ssl )
133 use debug && myconf+=( --debug )
134
135 case ${ABI} in
136 x86) myarch="ia32";;
137 amd64) myarch="x64";;
138 x32) myarch="x32";;
139 arm) myarch="arm";;
140 arm64) myarch="arm64";;
141 *) die "Unrecognized ARCH ${ARCH}";;
142 esac
143
144 "${PYTHON}" configure \
145 --prefix="${EPREFIX}"/usr \
146 --dest-cpu=${myarch} \
147 --without-dtrace \
148 "${myconf[@]}" || die
149 }
150
151 src_compile() {
152 emake -C out mksnapshot
153 pax-mark m "out/${BUILDTYPE}/mksnapshot"
154 emake -C out
155 }
156
157 src_install() {
158 local LIBDIR="${ED}/usr/$(get_libdir)"
159 emake install DESTDIR="${ED}" PREFIX=/usr
160 use npm && dodoc -r "${LIBDIR}"/node_modules/npm/html
161 rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die
162 find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or -name "LICENCE*" -delete || die
163
164 # set up a symlink structure that npm expects..
165 dodir /usr/include/node/deps/{v8,uv}
166 dosym . /usr/include/node/src
167 for var in deps/{uv,v8}/include; do
168 dosym ../.. /usr/include/node/${var}
169 done
170
171 pax-mark -m "${ED}"/usr/bin/iojs
172 }
173
174 src_test() {
175 out/${BUILDTYPE}/cctest || die
176 declare -xl TESTTYPE="${BUILDTYPE}"
177 "${PYTHON}" tools/test.py --mode=${TESTTYPE} -J message parallel sequential || die
178 }
179
180 pkg_postinst() {
181 einfo "When using node-gyp to install native modules, you can avoid"
182 einfo "having to download the full tarball by doing the following:"
183 einfo ""
184 einfo "node-gyp --nodedir /usr/include/node <command>"
185 }