commit: 360801aac57f8e571f42ecb981d769f014b37763
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 21 19:13:39 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Jul 21 19:18:58 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=360801aa
dev-util/colorgcc: Stable for amd64. Retroactively mark stable for the
remaining arches using the ALLARCHES policy.
Also tidy up ebuild a bit.
Package-Manager: portage-2.2.28
dev-util/colorgcc/colorgcc-1.3.2-r7.ebuild | 31 ++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/dev-util/colorgcc/colorgcc-1.3.2-r7.ebuild
b/dev-util/colorgcc/colorgcc-1.3.2-r7.ebuild
index 2a18254..8693fd4 100644
--- a/dev-util/colorgcc/colorgcc-1.3.2-r7.ebuild
+++ b/dev-util/colorgcc/colorgcc-1.3.2-r7.ebuild
@@ -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."
@@ -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"
@@ -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() {
@@ -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
}