diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2015-04-21 22:24:48 +0300 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2015-04-21 22:24:48 +0300 |
commit | b70efef53cc9de063fe3974dd56d672a92e57a9f (patch) | |
tree | afd40e71be8de842afd562eda001b21abc9019c3 /sys-devel/gcc-config/gcc-config-1.4.1-r1.ebuild | |
parent | 0fc61a35b43840a592037ab8bf88af6142527e3c (diff) | |
parent | 9a2973bcf4baaf0fa7848cd93e45ea1b7cd1a110 (diff) |
Merge branch 'master' of github.com:Rogentos/kogaion-desktop
Diffstat (limited to 'sys-devel/gcc-config/gcc-config-1.4.1-r1.ebuild')
-rw-r--r-- | sys-devel/gcc-config/gcc-config-1.4.1-r1.ebuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/sys-devel/gcc-config/gcc-config-1.4.1-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.4.1-r1.ebuild new file mode 100644 index 00000000..6d2ddbe8 --- /dev/null +++ b/sys-devel/gcc-config/gcc-config-1.4.1-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.4.1-r1.ebuild,v 1.1 2011/04/28 23:27:02 halcy0n Exp $ + +inherit flag-o-matic toolchain-funcs multilib + +# Version of .c wrapper to use +W_VER="1.5.1" + +DESCRIPTION="Utility to change the gcc compiler being used" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" +IUSE="" + +RDEPEND="!app-admin/eselect-compiler" + +S=${WORKDIR} + +src_unpack() { + cp "${FILESDIR}"/wrapper-${W_VER}.c "${S}"/wrapper.c || die +} + +src_compile() { + strip-flags + emake CC="$(tc-getCC)" wrapper || die "compile wrapper" +} + +src_install() { + newbin "${FILESDIR}"/${PN}-${PV} ${PN} || die "install gcc-config" + sed -i \ + -e "s:@GENTOO_LIBDIR@:$(get_libdir):g" \ + "${D}"/usr/bin/${PN} + + exeinto /usr/$(get_libdir)/misc + newexe wrapper gcc-config || die "install wrapper" +} + +pkg_postinst() { + # Scrub eselect-compiler remains + if [[ -e ${ROOT}/etc/env.d/05compiler ]] ; then + rm -f "${ROOT}"/etc/env.d/05compiler + fi + + # Make sure old versions dont exist #79062 + rm -f "${ROOT}"/usr/sbin/gcc-config + + # Do we have a valid multi ver setup ? + if gcc-config --get-current-profile &>/dev/null ; then + # We not longer use the /usr/include/g++-v3 hacks, as + # it is not needed ... + [[ -L ${ROOT}/usr/include/g++ ]] && rm -f "${ROOT}"/usr/include/g++ + [[ -L ${ROOT}/usr/include/g++-v3 ]] && rm -f "${ROOT}"/usr/include/g++-v3 + gcc-config $(/usr/bin/gcc-config --get-current-profile) + fi +} |