# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Clang C/C++ compiler" HOMEPAGE="http://clang.llvm.org/" # Hardcoding version into SRC_URI because I have no idea at all how upstream is going to version this # the tarball is -2.6, but there are also references to this release as -1.0 # Fetching LLVM as well: see http://llvm.org/bugs/show_bug.cgi?id=4840 SRC_URI="http://llvm.org/prereleases/2.6/llvm-2.6.tar.gz http://llvm.org/prereleases/2.6/clang-2.6.tar.gz" # See http://www.opensource.org/licenses/UoI-NCSA.php LICENSE="UoI-NCSA" SLOT="0" KEYWORDS="~amd64" IUSE="analyzer" # TODO: I don't think there are any non-system deps, but verify that # Note: for LTO support, clang will depend on binutils with gold plugins, and LLVM built after that - http://llvm.org/docs/GoldPlugin.html DEPEND="" S="${WORKDIR}/llvm-2.6" src_unpack() { unpack ${A} mv clang-2.6 "${S}/tools/clang" } src_compile() { cd "${S}" econf --enable-optimized emake clang-only || die "emake failed" } src_install() { cd "${S}/tools/clang" emake DESTDIR="${D}" install || die "emake install failed" if use analyzer ; then dobin utils/scan-build dobin utils/ccc-analyzer dobin tools/scan-view/scan-view fi }