diff options
Diffstat (limited to 'sys-devel/lld/lld-5.0.1_rc2.ebuild')
-rw-r--r-- | sys-devel/lld/lld-5.0.1_rc2.ebuild | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/sys-devel/lld/lld-5.0.1_rc2.ebuild b/sys-devel/lld/lld-5.0.1_rc2.ebuild new file mode 100644 index 000000000000..5d89edc60527 --- /dev/null +++ b/sys-devel/lld/lld-5.0.1_rc2.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-utils llvm python-any-r1 + +MY_P=${P/_/}.src +LLVM_P=llvm-${PV/_/}.src + +DESCRIPTION="The LLVM linker (link editor)" +HOMEPAGE="https://llvm.org/" +SRC_URI="http://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz + test? ( http://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )" + +LICENSE="UoI-NCSA" +SLOT="0" +KEYWORDS="" +IUSE="test" + +RDEPEND="~sys-devel/llvm-${PV}" +DEPEND="${RDEPEND} + test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )" + +S=${WORKDIR}/${MY_P} + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup + use test && python-any-r1_pkg_setup +} + +src_unpack() { + einfo "Unpacking ${MY_P}.tar.xz ..." + tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die + + if use test; then + einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." + tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ + "${LLVM_P}"/utils/{lit,unittest} || die + mv "${LLVM_P}" llvm || die + fi +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + + -DLLVM_INCLUDE_TESTS=$(usex test) + ) + use test && mycmakeargs+=( + -DLLVM_BUILD_TESTS=ON + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLIT_COMMAND="${EPREFIX}/usr/bin/lit" + ) + + cmake-utils_src_configure +} + +src_test() { + cmake-utils_src_make check-lld +} |