| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.6.ebuild,v 1.8 2012/06/14 15:15:01 jer Exp $
|
| 4 |
|
| 5 |
inherit unpacker toolchain-funcs multilib
|
| 6 |
|
| 7 |
DESCRIPTION="utility to manage compilers"
|
| 8 |
HOMEPAGE="http://git.overlays.gentoo.org/gitweb/?p=proj/gcc-config.git"
|
| 9 |
SRC_URI="mirror://gentoo/${P}.tar.xz
|
| 10 |
http://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
|
| 11 |
|
| 12 |
LICENSE="GPL-2"
|
| 13 |
SLOT="0"
|
| 14 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
| 15 |
IUSE=""
|
| 16 |
|
| 17 |
src_compile() {
|
| 18 |
emake CC="$(tc-getCC)" || die
|
| 19 |
}
|
| 20 |
|
| 21 |
src_install() {
|
| 22 |
emake \
|
| 23 |
DESTDIR="${D}" \
|
| 24 |
PV="${PV}" \
|
| 25 |
SUBLIBDIR="$(get_libdir)" \
|
| 26 |
install || die
|
| 27 |
}
|
| 28 |
|
| 29 |
pkg_postinst() {
|
| 30 |
# Scrub eselect-compiler remains
|
| 31 |
rm -f "${ROOT}"/etc/env.d/05compiler &
|
| 32 |
|
| 33 |
# Make sure old versions dont exist #79062
|
| 34 |
rm -f "${ROOT}"/usr/sbin/gcc-config &
|
| 35 |
|
| 36 |
# We not longer use the /usr/include/g++-v3 hacks, as
|
| 37 |
# it is not needed ...
|
| 38 |
rm -f "${ROOT}"/usr/include/g++{,-v3} &
|
| 39 |
|
| 40 |
# Do we have a valid multi ver setup ?
|
| 41 |
local x
|
| 42 |
for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
|
| 43 |
gcc-config ${x}
|
| 44 |
done
|
| 45 |
|
| 46 |
wait
|
| 47 |
}
|