summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2009-10-05 13:11:12 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2009-10-05 13:11:12 +0000
commit2226ed4c6f903ea6430b85d944effaae5d9f8ed0 (patch)
treee2d659f5f1b9200621288d10fb7d8080d5dadb63 /sys-devel
parentx86 stable, bug 282290 (diff)
downloadgentoo-2-2226ed4c6f903ea6430b85d944effaae5d9f8ed0.tar.gz
gentoo-2-2226ed4c6f903ea6430b85d944effaae5d9f8ed0.tar.bz2
gentoo-2-2226ed4c6f903ea6430b85d944effaae5d9f8ed0.zip
Initial commit, thanks everyone in bug #186279 and others
(Portage version: 2.2_rc43/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm-gcc/ChangeLog10
-rw-r--r--sys-devel/llvm-gcc/llvm-gcc-2.6_pre2.ebuild71
-rw-r--r--sys-devel/llvm-gcc/metadata.xml19
3 files changed, 100 insertions, 0 deletions
diff --git a/sys-devel/llvm-gcc/ChangeLog b/sys-devel/llvm-gcc/ChangeLog
new file mode 100644
index 000000000000..5d1ff20fb804
--- /dev/null
+++ b/sys-devel/llvm-gcc/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-devel/llvm-gcc
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/ChangeLog,v 1.1 2009/10/05 13:11:12 voyageur Exp $
+
+*llvm-gcc-2.6_pre2 (05 Oct 2009)
+
+ 05 Oct 2009; Bernard Cafarelli <voyageur@gentoo.org>
+ +llvm-gcc-2.6_pre2.ebuild, +metadata.xml:
+ Initial commit, thanks everyone in bug #186279 and others
+
diff --git a/sys-devel/llvm-gcc/llvm-gcc-2.6_pre2.ebuild b/sys-devel/llvm-gcc/llvm-gcc-2.6_pre2.ebuild
new file mode 100644
index 000000000000..15108376e582
--- /dev/null
+++ b/sys-devel/llvm-gcc/llvm-gcc-2.6_pre2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/llvm-gcc-2.6_pre2.ebuild,v 1.1 2009/10/05 13:11:12 voyageur Exp $
+
+EAPI=2
+inherit multilib
+
+LLVM_GCC_VERSION=4.2
+MY_PV=${LLVM_GCC_VERSION}-${PV/_pre*}
+
+DESCRIPTION="LLVM C front-end"
+HOMEPAGE="http://llvm.org"
+#SRC_URI="http://llvm.org/releases/${PV}/${PN}-${MY_PV}.source.tar.gz"
+SRC_URI="http://llvm.org/prereleases/${PV/_pre*}/pre-release${PV/*_pre}/${PN}-${MY_PV}.source.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE="bootstrap fortran nls objc objc++ test"
+
+RDEPEND=">=sys-devel/llvm-$PV"
+DEPEND="${RDEPEND}
+ >=sys-apps/texinfo-4.2-r4
+ >=sys-devel/binutils-2.18
+ >=sys-devel/bison-1.875
+ test? ( dev-util/dejagnu )"
+
+S=${WORKDIR}/llvm-gcc${MY_PV}.source/obj
+
+src_prepare() {
+ #we keep the directory structure suggested by README.LLVM,
+ mkdir -p "${S}"
+}
+
+src_configure() {
+ # Target options are handled by econf
+
+ EXTRALANGS=""
+ use fortran && EXTRALANGS="${EXTRALANGS},fortran"
+ use objc && EXTRALANGS="${EXTRALANGS},objc"
+ use objc++ && EXTRALANGS="${EXTRALANGS},obj-c++"
+
+ ECONF_SOURCE="${WORKDIR}"/llvm-gcc${MY_PV}.source econf --prefix=/usr/$(get_libdir)/${PN}-${MY_PV} \
+ --program-prefix=${PN}-${MY_PV}- \
+ --enable-llvm=/usr --enable-languages=c,c++${EXTRALANGS} \
+ || die "configure failed"
+}
+
+src_compile() {
+ BUILDOPTIONS="LLVM_VERSION_INFO=${MY_PV}"
+ use bootstrap && BUILDOPTIONS="${BUILDOPTIONS} bootstrap"
+ emake ${BUILDOPTIONS} || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "installation failed"
+ rm -rf "${D}"/usr/share/man/man7
+ if ! use nls; then
+ einfo "nls USE flag disabled, not installing locale files"
+ rm -rf "${D}"/usr/share/locale
+ fi
+
+ # Add some symlinks
+ dodir /usr/bin
+ cd "${D}/usr/bin"
+ for X in c++ g++ cpp gcc gcov gccbug ; do
+ ln -s /usr/$(get_libdir)/${PN}-${MY_PV}/bin/${PN}-${MY_PV}-${X} llvm-${X}
+ done
+ use fortran && \
+ ln -s /usr/$(get_libdir)/${PN}-${MY_PV}/bin/${PN}-${MY_PV}-gfortran llvm-gfortran
+}
diff --git a/sys-devel/llvm-gcc/metadata.xml b/sys-devel/llvm-gcc/metadata.xml
new file mode 100644
index 000000000000..b9821afb85d3
--- /dev/null
+++ b/sys-devel/llvm-gcc/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>The llvm-gcc command is the LLVM C front end. It is a modified version of gcc that compiles C/ObjC programs into native objects, LLVM bitcode or LLVM assembly language, depending upon the options.
+
+By default, llvm-gcc compiles to native objects just like GCC does. If the -emit-llvm and -c options are given then it will generate LLVM bitcode files instead. If -emit-llvm and -S are given, then it will generate LLVM assembly.
+
+Being derived from the GNU Compiler Collection, llvm-gcc has many of gcc's features and accepts most of gcc's options. It handles a number of gcc's extensions to the C programming language. See the gcc documentation for details.</longdescription>
+ <use>
+ <flag name="bootstrap">Compile the final llvm-gcc executables with llvm-gcc itself</flag>
+ <flag name="objc">Build support for the Objective C code language</flag>
+ <flag name="objc++">Build support for the Objective C++ language</flag>
+ </use>
+</pkgmetadata>