diff options
author | Michał Górny <mgorny@gentoo.org> | 2016-10-03 13:00:59 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-10-05 15:38:11 +0200 |
commit | 692417fccb61e9aaac344f9d3486d9859b4ba909 (patch) | |
tree | 8fcae78a3cd2841385d17e391d56e5dc8087b582 /sys-libs/libcxx | |
parent | sys-libs/libcxx: Support sys-libs/libcxxabi (diff) | |
download | gentoo-692417fccb61e9aaac344f9d3486d9859b4ba909.tar.gz gentoo-692417fccb61e9aaac344f9d3486d9859b4ba909.tar.bz2 gentoo-692417fccb61e9aaac344f9d3486d9859b4ba909.zip |
sys-libs/libcxx: Run tests without LLVM sources
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r-- | sys-libs/libcxx/libcxx-3.9.0.ebuild | 34 | ||||
-rw-r--r-- | sys-libs/libcxx/libcxx-9999.ebuild | 35 |
2 files changed, 21 insertions, 48 deletions
diff --git a/sys-libs/libcxx/libcxx-3.9.0.ebuild b/sys-libs/libcxx/libcxx-3.9.0.ebuild index a55947619831..110038bf4280 100644 --- a/sys-libs/libcxx/libcxx-3.9.0.ebuild +++ b/sys-libs/libcxx/libcxx-3.9.0.ebuild @@ -19,13 +19,10 @@ inherit ${SCM} cmake-multilib python-any-r1 toolchain-funcs DESCRIPTION="New implementation of the C++ standard library, targeting C++11" HOMEPAGE="http://libcxx.llvm.org/" if [[ ${PV} != 9999 ]] ; then - SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz - test? ( http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.xz )" + SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz" S="${WORKDIR}/${P}.src" - LLVM_S="${WORKDIR}/llvm-${PV}.src" else SRC_URI="" - LLVM_S="${WORKDIR}/llvm" fi LICENSE="|| ( UoI-NCSA MIT )" @@ -46,7 +43,7 @@ RDEPEND="libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP # which removes the need for MULTILIB_USEDEP DEPEND="${RDEPEND} test? ( >=sys-devel/clang-3.9.0 - ${PYTHON_DEPS} ) + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') ) app-arch/xz-utils >=sys-devel/llvm-3.9.0" @@ -62,8 +59,12 @@ PATCHES=( "${FILESDIR}/${PN}-3.9-cmake-static-lib.patch" ) +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + pkg_setup() { - use test && python_setup + use test && python-any-r1_pkg_setup if ! use libcxxrt && ! tc-is-gcc ; then eerror "To build ${PN} against libsupc++, you have to use gcc. Other" @@ -79,23 +80,6 @@ pkg_setup() { fi } -src_unpack() { - [[ ${PV} != 9999 ]] && default && return - - if use test; then - # needed for tests - git-r3_fetch "http://llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" - fi - git-r3_fetch - - if use test; then - git-r3_checkout http://llvm.org/git/llvm.git \ - "${WORKDIR}"/llvm - fi - git-r3_checkout -} - src_configure() { NATIVE_LIBDIR=$(get_libdir) cmake-multilib_src_configure @@ -131,7 +115,9 @@ multilib_src_configure() { ) if use test; then mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR=${LLVM_S} + # this can be any directory, it just needs to exist... + -DLLVM_MAIN_SRC_DIR="${T}" + -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit ) fi cmake-utils_src_configure diff --git a/sys-libs/libcxx/libcxx-9999.ebuild b/sys-libs/libcxx/libcxx-9999.ebuild index 6d0328d954e8..401a8ea58555 100644 --- a/sys-libs/libcxx/libcxx-9999.ebuild +++ b/sys-libs/libcxx/libcxx-9999.ebuild @@ -19,13 +19,10 @@ inherit ${SCM} cmake-multilib python-any-r1 toolchain-funcs DESCRIPTION="New implementation of the C++ standard library, targeting C++11" HOMEPAGE="http://libcxx.llvm.org/" if [[ ${PV} != 9999 ]] ; then - SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz - test? ( http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.xz )" + SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz" S="${WORKDIR}/${P}.src" - LLVM_S="${WORKDIR}/llvm-${PV}.src" else SRC_URI="" - LLVM_S="${WORKDIR}/llvm" fi LICENSE="|| ( UoI-NCSA MIT )" @@ -49,7 +46,7 @@ RDEPEND=" # which removes the need for MULTILIB_USEDEP DEPEND="${RDEPEND} test? ( >=sys-devel/clang-3.9.0 - ${PYTHON_DEPS} ) + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') ) app-arch/xz-utils >=sys-devel/llvm-3.9.0" @@ -61,8 +58,12 @@ PATCHES=( "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch" ) +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + pkg_setup() { - use test && python_setup + use test && python-any-r1_pkg_setup if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then eerror "To build ${PN} against libsupc++, you have to use gcc. Other" @@ -78,23 +79,6 @@ pkg_setup() { fi } -src_unpack() { - [[ ${PV} != 9999 ]] && default && return - - if use test; then - # needed for tests - git-r3_fetch "http://llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" - fi - git-r3_fetch - - if use test; then - git-r3_checkout http://llvm.org/git/llvm.git \ - "${WORKDIR}"/llvm - fi - git-r3_checkout -} - src_configure() { NATIVE_LIBDIR=$(get_libdir) cmake-multilib_src_configure @@ -133,7 +117,10 @@ multilib_src_configure() { ) if use test; then mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR=${LLVM_S} + # this can be any directory, it just needs to exist... + # FIXME: remove this once https://reviews.llvm.org/D25093 is merged + -DLLVM_MAIN_SRC_DIR="${T}" + -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit ) fi cmake-utils_src_configure |