commit:     bffe6a1dd3106ea8c2c1a1a0527f3f650c303341
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 16 16:53:29 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Nov 16 21:52:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bffe6a1d

sys-devel/llvm: Stop enforcing external lit for tests

Modify the ebuild to no longer enforce externally installed
dev-python/lit for tests, effectively causing the build system to use
the bundled copy of lit (along with llvm-lit). While using the external
package is more canonical, its disadvantages outweight the gain.

Most notably, lit is not slotted in Gentoo and the behavior of lit
frequently changes subtly which caused us to require a major version
match between LLVM and lit. As a result, attempting to build multiple
slots of LLVM with tests enabled cause package collisions. Building both
LLVM and lit simultaneously causes a circular dependency.

Since lit comes from the same package as LLVM itself and LLVM requires
explicit python-any-r1 use anyway, using the bundled copy has no added
cost. It reduces the risk of breakage resulting from skipping llvm-lit
wrapper and solves the forementioned problems caused by depending
on dev-python/lit.

The external package is still useful for projects that do not require
LLVM sources.

 sys-devel/llvm/llvm-4.0.1.ebuild    | 10 ----------
 sys-devel/llvm/llvm-5.0.9999.ebuild | 10 ----------
 sys-devel/llvm/llvm-9999.ebuild     |  7 -------
 3 files changed, 27 deletions(-)

diff --git a/sys-devel/llvm/llvm-4.0.1.ebuild b/sys-devel/llvm/llvm-4.0.1.ebuild
index 4e3e2dcbed0..6eca3552280 100644
--- a/sys-devel/llvm/llvm-4.0.1.ebuild
+++ b/sys-devel/llvm/llvm-4.0.1.ebuild
@@ -53,7 +53,6 @@ DEPEND="${RDEPEND}
        doc? ( dev-python/sphinx )
        gold? ( sys-libs/binutils-libs )
        libffi? ( virtual/pkgconfig )
-       test? ( $(python_gen_any_dep 
"~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )
        !!<dev-python/configparser-3.3.0.2
        ${PYTHON_DEPS}"
 # There are no file collisions between these versions but having :0
@@ -71,11 +70,6 @@ S=${WORKDIR}/${P/_/}.src
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
-python_check_deps() {
-       ! use test \
-               || has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
 src_prepare() {
        # Fix llvm-config for shared linking and sane flags
        # https://bugs.gentoo.org/show_bug.cgi?id=565358
@@ -133,10 +127,6 @@ 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)

diff --git a/sys-devel/llvm/llvm-5.0.9999.ebuild 
b/sys-devel/llvm/llvm-5.0.9999.ebuild
index cbd8b43b170..3bf676e4360 100644
--- a/sys-devel/llvm/llvm-5.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-5.0.9999.ebuild
@@ -55,7 +55,6 @@ DEPEND="${RDEPEND}
        doc? ( dev-python/sphinx )
        gold? ( sys-libs/binutils-libs )
        libffi? ( virtual/pkgconfig )
-       test? ( $(python_gen_any_dep 
"~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )
        !!<dev-python/configparser-3.3.0.2
        ${PYTHON_DEPS}"
 # There are no file collisions between these versions but having :0
@@ -71,11 +70,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
-python_check_deps() {
-       ! use test \
-               || has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
 src_prepare() {
        # Fix llvm-config for shared linking and sane flags
        # https://bugs.gentoo.org/show_bug.cgi?id=565358
@@ -133,10 +127,6 @@ 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)

diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 64f66a7d6c0..af9daf563fa 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -57,7 +57,6 @@ DEPEND="${RDEPEND}
        doc? ( dev-python/sphinx )
        gold? ( sys-libs/binutils-libs )
        libffi? ( virtual/pkgconfig )
-       test? ( $(python_gen_any_dep 
"~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )
        !!<dev-python/configparser-3.3.0.2
        ${PYTHON_DEPS}"
 # There are no file collisions between these versions but having :0
@@ -73,11 +72,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
-python_check_deps() {
-       ! use test \
-               || has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
 src_prepare() {
        # Fix llvm-config for shared linking and sane flags
        # https://bugs.gentoo.org/show_bug.cgi?id=565358
@@ -139,7 +133,6 @@ multilib_src_configure() {
 #      fi
 
        use test && mycmakeargs+=(
-               -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
                -DLLVM_LIT_ARGS="-vv"
        )
 

Reply via email to