During compile time, nodejs compiles a "snapshot bin" to continue the build process. During cross-compiling, the bin cannot be run. This patch/ebuild add snapshot USE flags to enable/disable on configure time. Reproducible: Always
Created attachment 355488 [details, diff] ebuild patch to add snapshot use flag on ebuild 0.10.15
Created attachment 355492 [details] full ebuild 0.10.15 with snapshot use flag
Comment on attachment 355492 [details] full ebuild 0.10.15 with snapshot use flag --- nodejs-0.10.15.ebuild 2013-08-01 06:21:25.000000000 +0200 +++ - 2013-08-11 14:22:21.566761956 +0200 @@ -18,7 +18,7 @@ LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" SLOT="0" KEYWORDS="~amd64 ~arm ~x86 ~x64-macos" -IUSE="+npm" +IUSE="+npm +snapshot" RDEPEND="dev-libs/openssl" DEPEND="${RDEPEND} @@ -41,6 +41,7 @@ src_configure() { local myconf="" ! use npm && myconf="--without-npm" + ! use snapshot && myconf="--without-snapshot" "${PYTHON}" configure --prefix="${EPREFIX}"/usr \ --openssl-use-sys --shared-zlib --without-dtrace ${myconf} || die
LGTM. Only possible feedback would be if there's a better way of figuring out that we're cross-compiling other than a USE flag?
The --without-snapshot flag is not only a cross-compilation option. The "snapshot" feature speed up the node.js boot time, it's a feature you could be disable if you want.
Created attachment 355686 [details, diff] ebuild patch to add snapshot use flag on ebuild 0.10.15 (fixed) fixed patch, the snapshot set override previous option (bug when use -npm with -snapshot)
+ 17 Aug 2013; Patrick Lauer <patrick@gentoo.org> +nodejs-0.10.16-r1.ebuild, + -nodejs-0.10.16.ebuild, metadata.xml: + Add snapshot useflag for #480372