-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dan Molik
committed
May 17, 2013
1 parent
0a5d601
commit c9dac77
Showing
3 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5-progress | ||
|
||
RESTRICT="test" | ||
PYTHON_MULTIPLE_ABIS="1" | ||
PYTHON_RESTRICTED_ABIS="3.* *-jython *-pypy-*" | ||
inherit python pax-utils | ||
|
||
DESCRIPTION="Evented IO for V8 Javascript" | ||
HOMEPAGE="http://nodejs.org/" | ||
SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz" | ||
|
||
LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" | ||
SLOT="0" | ||
KEYWORDS="~*" | ||
IUSE="" | ||
|
||
RDEPEND="dev-libs/openssl" | ||
DEPEND="${RDEPEND} | ||
$(python_abi_depend virtual/python-json)" | ||
|
||
S=${WORKDIR}/node-v${PV} | ||
|
||
src_prepare() { | ||
# fix compilation on Darwin | ||
# http://code.google.com/p/gyp/issues/detail?id=260 | ||
sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die | ||
|
||
# make sure we use python2.* while using gyp | ||
sed -i -e "s/python/python2/" deps/npm/node_modules/node-gyp/gyp/gyp || die | ||
|
||
# less verbose install output (stating the same as portage, basically) | ||
sed -i -e "/print/d" tools/install.py || die | ||
} | ||
|
||
src_configure() { | ||
./configure --prefix="${EPREFIX}"/usr --openssl-use-sys --shared-zlib || die | ||
} | ||
|
||
src_compile() { | ||
emake out/Makefile | ||
emake -C out mksnapshot | ||
pax-mark m out/Release/mksnapshot | ||
emake | ||
} | ||
|
||
src_install() { | ||
./tools/install.py install "${ED}" | ||
|
||
dohtml -r "${ED}"/usr/lib/node_modules/npm/html/* | ||
rm -rf "${ED}"/usr/lib/node_modules/npm/doc "${ED}"/usr/lib/node_modules/npm/html | ||
rm -rf "${ED}"/usr/lib/dtrace | ||
|
||
pax-mark -m "${ED}"/usr/bin/node | ||
} | ||
|
||
src_test() { | ||
./tools/test.py --mode=release simple message || die | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5-progress | ||
|
||
RESTRICT="test" | ||
PYTHON_MULTIPLE_ABIS="1" | ||
PYTHON_RESTRICTED_ABIS="3.* *-jython *-pypy-*" | ||
inherit python pax-utils | ||
|
||
DESCRIPTION="Evented IO for V8 Javascript" | ||
HOMEPAGE="http://nodejs.org/" | ||
SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz" | ||
|
||
LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" | ||
SLOT="0" | ||
KEYWORDS="~*" | ||
IUSE="+v8" | ||
|
||
RDEPEND="dev-libs/openssl | ||
v8? ( dev-lang/v8 )" | ||
DEPEND="${RDEPEND} | ||
$(python_abi_depend virtual/python-json)" | ||
|
||
S=${WORKDIR}/node-v${PV} | ||
|
||
src_prepare() { | ||
# fix compilation on Darwin | ||
# http://code.google.com/p/gyp/issues/detail?id=260 | ||
sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die | ||
|
||
# make sure we use python2.* while using gyp | ||
sed -i -e "s/python/python2/" deps/npm/node_modules/node-gyp/gyp/gyp || die | ||
|
||
# less verbose install output (stating the same as portage, basically) | ||
sed -i -e "/print/d" tools/install.py || die | ||
} | ||
|
||
src_configure() { | ||
if use v8 ; then | ||
./configure --shared-v8 --shared-v8-libpath="${EPREFIX}"/usr/lib --shared-v8-includes="${EPREFIX}"/usr/include \ | ||
--prefix="${EPREFIX}"/usr --openssl-use-sys --shared-zlib || die | ||
else | ||
./configure --prefix="${EPREFIX}"/usr --openssl-use-sys --shared-zlib || die | ||
fi | ||
} | ||
|
||
src_compile() { | ||
emake out/Makefile | ||
# emake -C out mksnapshot | ||
# pax-mark m out/Release/mksnapshot | ||
emake || die | ||
} | ||
|
||
src_install() { | ||
./tools/install.py install "${ED}" | ||
|
||
dohtml -r "${ED}"/usr/lib/node_modules/npm/html/* | ||
rm -rf "${ED}"/usr/lib/node_modules/npm/doc "${ED}"/usr/lib/node_modules/npm/html | ||
rm -rf "${ED}"/usr/lib/dtrace | ||
|
||
pax-mark -m "${ED}"/usr/bin/node | ||
} | ||
|
||
src_test() { | ||
./tools/test.py --mode=release simple message || die | ||
} |