commit:     1d2ecacd2d5c7b5b7a7169722b43d5a107844707
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 21 09:43:45 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Aug 22 15:11:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d2ecacd

sys-libs/compiler-rt: Add a stand-alone ebuild for compiler-rt

 sys-libs/compiler-rt/compiler-rt-9999.ebuild | 53 ++++++++++++++++++++++++++++
 sys-libs/compiler-rt/metadata.xml            | 10 ++++++
 2 files changed, 63 insertions(+)

diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild 
b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
new file mode 100644
index 0000000..7c93672
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+CMAKE_MIN_VERSION=3.4.3
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils git-r3 python-single-r1
+
+DESCRIPTION="Compiler runtime libraries for clang"
+HOMEPAGE="http://llvm.org/";
+SRC_URI=""
+EGIT_REPO_URI="http://llvm.org/git/compiler-rt.git
+       https://github.com/llvm-mirror/compiler-rt.git";
+
+LICENSE="UoI-NCSA"
+SLOT="0/${PV%.*}"
+KEYWORDS=""
+IUSE="+sanitize"
+
+RDEPEND="
+       ~sys-devel/llvm-${PV}
+       !<sys-devel/llvm-${PV}
+       sanitize? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+       ${PYTHON_DEPS}"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+src_configure() {
+       local clang_version=4.0.0
+       local libdir=$(get_libdir)
+       local mycmakeargs=(
+               # used to find cmake modules
+               -DLLVM_LIBDIR_SUFFIX="${libdir#lib}"
+               
-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${clang_version}"
+
+               # TODO: tests do not support standalone builds
+               -DCOMPILER_RT_INCLUDE_TESTS=OFF
+               -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
+       )
+
+       cmake-utils_src_configure
+}
+
+src_install() {
+       cmake-utils_src_install
+
+       use sanitize && python_doscript 
"${S}"/lib/asan/scripts/asan_symbolize.py
+}

diff --git a/sys-libs/compiler-rt/metadata.xml 
b/sys-libs/compiler-rt/metadata.xml
new file mode 100644
index 0000000..ea472dc
--- /dev/null
+++ b/sys-libs/compiler-rt/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>[email protected]</email>
+       </maintainer>
+       <use>
+               <flag name="sanitize">Build compiler-rt's sanitizers</flag>
+       </use>
+</pkgmetadata>

Reply via email to