sys-devel/llvm: Use installed lit for tests
authorMichał Górny <mgorny@gentoo.org>
Sat, 1 Oct 2016 11:35:18 +0000 (13:35 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sat, 1 Oct 2016 13:05:57 +0000 (15:05 +0200)
sys-devel/llvm/llvm-9999.ebuild

index 6af306ea7bc7d083fc80ab06cdab66ea7c081a3a..471783794b0672e8f7862b7a34e91f446f533af7 100644 (file)
@@ -51,6 +51,7 @@ DEPEND="${RDEPEND}
        libffi? ( virtual/pkgconfig )
        ocaml? ( dev-ml/findlib
                test? ( dev-ml/ounit ) )
+       test? ( $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
        !!<dev-python/configparser-3.3.0.2
        ${PYTHON_DEPS}"
 
@@ -58,6 +59,11 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
        || ( ${ALL_LLVM_TARGETS[*]} )
        multitarget? ( ${ALL_LLVM_TARGETS[*]} )"
 
+python_check_deps() {
+       ! use test \
+               || has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
 pkg_pretend() {
        # in megs
        # !debug !multitarget -O2       400
@@ -168,6 +174,10 @@ multilib_src_configure() {
                )
 #      fi
 
+       use test && mycmakeargs+=(
+               -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
+       )
+
        if multilib_is_native_abi; then
                mycmakeargs+=(
                        -DLLVM_BUILD_DOCS=$(usex doc)