net-libs/nodejs: add optional support for dtrace-based tracing
authorMarco Leogrande <dark.knight.ita@gmail.com>
Fri, 11 Nov 2016 04:16:00 +0000 (20:16 -0800)
committerMichał Górny <mgorny@gentoo.org>
Fri, 2 Dec 2016 19:13:29 +0000 (20:13 +0100)
NodeJS supports dtrace-based tracing, that can be used by
dev-util/systemtap and, more recently, dev-util/bcc. This support is
forcibly disabled in nodejs ebuilds.

This commit adds a systemtap USE flag to be able to turn on this
support conditionally. The name of this flag matches the choice done
for other ebuilds, like dev-db/mysql or app-emulation/qemu. Despite
what has been done in those ebuilds, however, a dependency on
dev-util/systemtap is not added: this is because, as of late,
systemtap is not the only consumer of those traces anymore.

Closes: https://github.com/gentoo/gentoo/pull/2803

net-libs/nodejs/metadata.xml
net-libs/nodejs/nodejs-7.2.0.ebuild

index e53bc814f6885107fe3af398e4f8266874c7f8d9..ddbfaa7ad24dc9d5ef2cee5bd8966c23ade1c47e 100644 (file)
@@ -16,5 +16,6 @@
        <use>
        <flag name="npm">Enable NPM package manager</flag>
        <flag name="snapshot">Enable snapshot creation for faster startup</flag>
+       <flag name="systemtap">Enable SystemTAP/DTrace tracing</flag>
        </use>
 </pkgmetadata>
index 4e7689015852a0c81a497ba04829d8546037a5bc..739af4d843d6c5524368a3c049914d958b231cce 100644 (file)
@@ -16,7 +16,7 @@ SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
 LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos"
-IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl test"
+IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl systemtap test"
 
 RDEPEND="icu? ( >=dev-libs/icu-56:= )
        npm? ( ${PYTHON_DEPS} )
@@ -109,7 +109,7 @@ src_configure() {
        "${PYTHON}" configure \
                --prefix="${EPREFIX}"/usr \
                --dest-cpu=${myarch} \
-               --without-dtrace \
+               $(use_with systemtap dtrace) \
                "${myconf[@]}" || die
 }