dev-util/rr: clean up build/test deps
authorMike Frysinger <vapier@gentoo.org>
Mon, 13 Feb 2017 21:09:39 +0000 (16:09 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 13 Feb 2017 21:19:13 +0000 (16:19 -0500)
We only need zlib & gdb at runtime.  All the other deps in here
are for building & testing only, so drop them from RDEPEND.

dev-util/rr/rr-4.5.0.ebuild

index 6624a538149afd56bdd6aad97e955ea38aea1b3c..b83875db0e0a91be23d3b4cf9f6cd1addeb38549 100644 (file)
@@ -16,15 +16,18 @@ SRC_URI="https://github.com/mozilla/${PN}/archive/${PV}.tar.gz -> mozilla-${P}.t
 LICENSE="MIT BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-python/pexpect[${PYTHON_USEDEP}]
-               sys-libs/zlib
-               ${PYTHON_DEPS}"
-
-RDEPEND="
-       sys-devel/gdb[xml]
-       ${DEPEND}"
+IUSE="test"
+
+DEPEND="sys-libs/zlib"
+RDEPEND="${DEPEND}
+       sys-devel/gdb[xml]"
+# Add all the deps needed only at build/test time.
+DEPEND+="
+       test? (
+               dev-python/pexpect[${PYTHON_USEDEP}]
+               sys-devel/gdb[xml]
+       )
+       ${PYTHON_DEPS}"
 
 pkg_setup() {
        if use kernel_linux; then
@@ -39,3 +42,11 @@ src_prepare() {
 
        sed -i 's:-Werror::' CMakeLists.txt || die #609192
 }
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTS=$(usex test)
+       )
+
+       cmake-utils_src_configure
+}