We only need zlib & gdb at runtime. All the other deps in here
are for building & testing only, so drop them from RDEPEND.
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
sed -i 's:-Werror::' CMakeLists.txt || die #609192
}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTS=$(usex test)
+ )
+
+ cmake-utils_src_configure
+}