Skip to content

Commit

Permalink
Merge branch 'master' of git.funtoo.org:funtoo-overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Vinichenko committed May 18, 2013
2 parents 0fbb008 + b8bca0a commit b8c2cbf
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions net-libs/nodejs/nodejs-0.11.2.ebuild
Expand Up @@ -14,10 +14,10 @@ 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"
IUSE="v8"

RDEPEND="dev-libs/openssl
v8? ( dev-lang/v8 )"
v8? ( >=dev-lang/v8-3.18.5.1 )"
DEPEND="${RDEPEND}
$(python_abi_depend virtual/python-json)"

Expand All @@ -33,15 +33,18 @@ src_prepare() {

# less verbose install output (stating the same as portage, basically)
sed -i -e "/print/d" tools/install.py || die
sed -i -e "s~/usr/local~/usr~" 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
--prefix="${EPREFIX}"/usr --shared-openssl --shared-zlib || die
else
./configure --prefix="${EPREFIX}"/usr --openssl-use-sys --shared-zlib || die
./configure --prefix="${EPREFIX}"/usr --shared-openssl --shared-zlib || die
fi
sed -i -e "s~/usr/local~/usr~g" out/Makefile || die
sed -i -e "s~/usr/local~/usr~g" Makefile || die
}

src_compile() {
Expand All @@ -64,3 +67,11 @@ src_install() {
src_test() {
./tools/test.py --mode=release simple message || die
}

pkg_postinst() {
if ! use v8 ; then
elog "${PN} has been compiled against internal v8"
elog "to use system v8 you will need to emerge a"
elog "version >=dev-lag/v8-3.18"
fi
}

0 comments on commit b8c2cbf

Please sign in to comment.