2e21d1d022
(Portage version: 2.2.0_alpha78-r1/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)
49 lines
1.3 KiB
Bash
49 lines
1.3 KiB
Bash
# Copyright 1999-2011 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: /var/cvsroot/gentoo-x86/sys-devel/dragonegg/dragonegg-3.0_rc4.ebuild,v 1.2 2011/11/30 10:35:01 voyageur Exp $
|
|
|
|
EAPI=4
|
|
inherit multilib
|
|
|
|
DESCRIPTION="GCC plugin that uses LLVM for optimization and code generation"
|
|
HOMEPAGE="http://dragonegg.llvm.org/"
|
|
SRC_URI="http://llvm.org/releases/${PV}/${P}.tar.gz"
|
|
|
|
LICENSE="GPL-2"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm ~x86"
|
|
IUSE=""
|
|
|
|
DEPEND="|| ( sys-devel/gcc:4.5[lto]
|
|
>=sys-devel/gcc-4.6 )
|
|
~sys-devel/llvm-${PV}"
|
|
RDEPEND="${DEPEND}"
|
|
|
|
S=${WORKDIR}/${P}.src
|
|
|
|
src_prepare() {
|
|
# Remove in final 3.0
|
|
sed -e "s/\(^REVISION:=\).*/\1${P}/" \
|
|
-i Makefile || die "Setting revision failed"
|
|
}
|
|
|
|
src_compile() {
|
|
# GCC: compiler to use plugin with
|
|
emake CC="$(tc-getCC)" GCC="$(tc-getCC)" CXX="$(tc-getCXX)" VERBOSE=1
|
|
}
|
|
|
|
src_install() {
|
|
# Install plugin in llvm lib directory
|
|
exeinto /usr/$(get_libdir)/llvm
|
|
doexe dragonegg.so
|
|
|
|
dodoc README
|
|
}
|
|
|
|
pkg_postinst() {
|
|
elog "To use dragonegg, run gcc as usual, with an extra command line argument:"
|
|
elog " -fplugin=/usr/$(get_libdir)/llvm/dragonegg.so"
|
|
elog "If you change the active gcc profile, or update gcc to a new version,"
|
|
elog "you will have to remerge this package to update the plugin"
|
|
}
|