Skip to content

Commit

Permalink
dev-util/colorgcc: Stable for amd64. Retroactively mark stable for th…
Browse files Browse the repository at this point in the history
…e remaining arches using the ALLARCHES policy.

Also tidy up ebuild a bit.

Package-Manager: portage-2.2.28
  • Loading branch information
monsieurp committed Jul 21, 2016
1 parent 8351d68 commit 360801a
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions dev-util/colorgcc/colorgcc-1.3.2-r7.ebuild
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils

DESCRIPTION="Perl script to colorise the gcc output."
Expand All @@ -11,7 +11,7 @@ SRC_URI="mirror://gentoo/${P}.tar.gz"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
KEYWORDS="alpha amd64 hppa mips ppc sparc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE=""

DEPEND="dev-lang/perl"
Expand All @@ -29,19 +29,19 @@ src_prepare() {
}

src_install() {
dobin colorgcc || die
dodir /etc/colorgcc /usr/lib/colorgcc/bin
insinto /etc/colorgcc
doins colorgccrc || die
dobin "${PN}"
dodir "/etc/${PN}" "/usr/lib/${PN}/bin"
insinto "/etc/${PN}"
doins "${PN}rc"
einfo "Scanning for compiler front-ends"
into /usr/lib/colorgcc/bin
for a in gcc cc c++ g++ ${CHOST}-gcc ${CHOST}-c++ ${CHOST}-g++ ; do
if [ -n "$(type -p ${a})" ]; then
dosym /usr/bin/colorgcc /usr/lib/colorgcc/bin/${a}
fi
into "/usr/lib/${PN}/bin"
local COMPILERS=( gcc cc c++ g++ ${CHOST}-gcc ${CHOST}-c++ ${CHOST}-g++ )
for c in "${COMPILERS[@]}"; do
[[ -n "$(type -p ${c})" ]] && \
dosym "/usr/bin/${PN}" "/usr/lib/${PN}/bin/${c}"
done

dodoc CREDITS ChangeLog || die
dodoc CREDITS ChangeLog
}

pkg_postinst() {
Expand All @@ -59,7 +59,10 @@ pkg_postinst() {
elog "/usr/lib/colorgcc/bin *NOT* /usr/bin/wrappers. You'll need to"
elog "change any PATH settings that referred to the old location."
echo

# portage won't delete the old symlinks for users that are upgrading
# because the old symlinks still point to /usr/bin/colorgcc which exists...
[ -d "${EROOT}"/usr/bin/wrappers ] && rm -fr "${EROOT}"/usr/bin/wrappers
if [[ -d "${EROOT}"/usr/bin/wrappers ]]; then
rm -frv "${EROOT}"/usr/bin/wrappers || die
fi
}

0 comments on commit 360801a

Please sign in to comment.