net-libs/nodejs: Fix build with USE=-npm
authorJonathan Callen <jcallen@gentoo.org>
Thu, 8 Oct 2015 22:52:30 +0000 (18:52 -0400)
committerJonathan Callen <jcallen@gentoo.org>
Thu, 8 Oct 2015 22:53:08 +0000 (18:53 -0400)
Gentoo-Bug: 562518
Package-Manager: portage-2.2.22

net-libs/nodejs/nodejs-4.1.1.ebuild

index af811ba7c96432e3a22a5933695c3f65eb8635da..fb66363b44b2f41440f008cf69135c53ed249ae5 100644 (file)
@@ -119,9 +119,11 @@ src_compile() {
 src_install() {
        local LIBDIR="${ED}/usr/$(get_libdir)"
        emake install DESTDIR="${ED}" PREFIX=/usr
-       use npm && dodoc -r "${LIBDIR}"/node_modules/npm/html
-       rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die
-       find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or -name "LICENCE*" -delete || die
+       if use npm; then
+               dodoc -r "${LIBDIR}"/node_modules/npm/html
+               rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die
+               find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or -name "LICENCE*" -delete || die
+       fi
 
        # set up a symlink structure that npm expects..
        dodir /usr/include/node/deps/{v8,uv}