From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7EB7C138331 for ; Wed, 5 Oct 2016 13:38:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 24266E0925; Wed, 5 Oct 2016 13:38:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E7460E0925 for ; Wed, 5 Oct 2016 13:38:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4A9F6341135 for ; Wed, 5 Oct 2016 13:38:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 728A924A8 for ; Wed, 5 Oct 2016 13:38:16 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1475674691.692417fccb61e9aaac344f9d3486d9859b4ba909.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxx/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/libcxx/libcxx-3.9.0.ebuild sys-libs/libcxx/libcxx-9999.ebuild X-VCS-Directories: sys-libs/libcxx/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 692417fccb61e9aaac344f9d3486d9859b4ba909 X-VCS-Branch: master Date: Wed, 5 Oct 2016 13:38:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b830bb67-f35e-4433-9c3e-34577857b9ff X-Archives-Hash: ff6558a93d4dc6b184536cd5ced951f5 commit: 692417fccb61e9aaac344f9d3486d9859b4ba909 Author: Michał Górny gentoo org> AuthorDate: Mon Oct 3 11:00:59 2016 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Oct 5 13:38:11 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=692417fc sys-libs/libcxx: Run tests without LLVM sources sys-libs/libcxx/libcxx-3.9.0.ebuild | 34 ++++++++++------------------------ 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 a559476..110038b 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 6d0328d..401a8ea 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