summaryrefslogtreecommitdiff
blob: cdc77b0742f9c07bc538aa4f58d6d9449cb1a2b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.2.2.ebuild,v 1.1 2002/12/16 04:19:05 azarah Exp $

S="${WORKDIR}/${P}"
DESCRIPTION="Utility to change the gcc compiler being used."
SRC_URI=""
HOMEPAGE="http://www.gentoo.org/"

KEYWORDS="x86 ppc sparc alpha"
SLOT="0"
LICENSE="GPL-2"

DEPEND="virtual/glibc"


src_install() {
	newsbin ${FILESDIR}/${PN}-${PV} ${PN}

	# Install wrappers .. these are shared with the gcc ebuilds
	# currently .. will remove when the new gcc have propagated ...
	if [ -L ${ROOT}/lib/cpp ]
	then
		exeinto /lib
		doexe ${FILESDIR}/cpp
	fi
	if [ -L ${ROOT}/usr/bin/cc ]
	then
		exeinto /usr/bin
		doexe ${FILESDIR}/cc
	fi
}

pkg_postinst() {

	# Do we have a valid multi ver setup ?
	if ${ROOT}/usr/sbin/gcc-config --get-current-profile > /dev/null
	then
		# /usr/bin/cpp borks things if present ...
		if [ -L ${ROOT}/usr/bin/cpp -o -f ${ROOT}/usr/bin/cpp ]
		then
			rm -f ${ROOT}/usr/bin/cpp
		fi

		# We not longer use the /usr/include/g++-v3 hacks, as
		# it is not needed ...
		if [ -L ${ROOT}/usr/include/g++ ]
		then
			rm -f ${ROOT}/usr/include/g++
		fi
		if [ -L ${ROOT}/usr/include/g++-v3 ]
		then
			rm -f ${ROOT}/usr/include/g++-v3
		fi
	fi
}