dev-ml/llvm-ocaml: Stop enforcing external lit for tests
authorMichał Górny <mgorny@gentoo.org>
Thu, 16 Nov 2017 17:00:19 +0000 (18:00 +0100)
committerMichał Górny <mgorny@gentoo.org>
Thu, 16 Nov 2017 21:52:07 +0000 (22:52 +0100)
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. Furthermore, in the current git version the additional
(fine-grained) test rules do not work correctly without llvm-lit, making
it impossible to run LLVM binding tests separately.

dev-ml/llvm-ocaml/llvm-ocaml-4.0.1.ebuild
dev-ml/llvm-ocaml/llvm-ocaml-5.0.9999.ebuild
dev-ml/llvm-ocaml/llvm-ocaml-9999.ebuild

index 6375c108d859c9f887ad1177a5843a75943ef5b0..5eda59e817ee8f54fac095d816c1471c94b608d0 100644 (file)
@@ -35,8 +35,7 @@ RDEPEND="
 DEPEND="${RDEPEND}
        dev-lang/perl
        dev-ml/findlib
-       test? ( dev-ml/ounit
-               $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )
+       test? ( dev-ml/ounit )
        !!<dev-python/configparser-3.3.0.2
        ${PYTHON_DEPS}"
 
@@ -48,11 +47,6 @@ S=${WORKDIR}/${MY_P/_/}.src
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
-python_check_deps() {
-       ! use test \
-               || has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
 pkg_setup() {
        LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
        python-any-r1_pkg_setup
@@ -92,10 +86,6 @@ src_configure() {
                # TODO: ocamldoc
        )
 
-       use test && mycmakeargs+=(
-               -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
-       )
-
        cmake-utils_src_configure
 
        local llvm_libdir=$(llvm-config --libdir)
index 0c2ad271f5c3d64868f4d929c6d65c7249fe8d8f..b7e7d9839de66260dcf1db66aae0e3e4d1a4d1bb 100644 (file)
@@ -37,8 +37,7 @@ RDEPEND="
 DEPEND="${RDEPEND}
        dev-lang/perl
        dev-ml/findlib
-       test? ( dev-ml/ounit
-               $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )
+       test? ( dev-ml/ounit )
        !!<dev-python/configparser-3.3.0.2
        ${PYTHON_DEPS}"
 
@@ -48,11 +47,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}]"
-}
-
 pkg_setup() {
        LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
        python-any-r1_pkg_setup
@@ -92,10 +86,6 @@ src_configure() {
                # TODO: ocamldoc
        )
 
-       use test && mycmakeargs+=(
-               -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
-       )
-
        # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
        # also: custom rules for OCaml do not work for CPPFLAGS
        use debug || local -x CFLAGS="${CFLAGS} -DNDEBUG"
index 7bb17679f8d149c6f1f23cbe25b9603551782a3d..2fa7019d717d7603caad990b4711778ae21d31e0 100644 (file)
@@ -38,8 +38,7 @@ RDEPEND="
 DEPEND="${RDEPEND}
        dev-lang/perl
        dev-ml/findlib
-       test? ( dev-ml/ounit
-               $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )
+       test? ( dev-ml/ounit )
        !!<dev-python/configparser-3.3.0.2
        ${PYTHON_DEPS}"
 
@@ -49,11 +48,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}]"
-}
-
 pkg_setup() {
        llvm_pkg_setup
        python-any-r1_pkg_setup
@@ -97,7 +91,6 @@ src_configure() {
        )
 
        use test && mycmakeargs+=(
-               -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
                -DLLVM_LIT_ARGS="-vv"
        )