dev-util/colorgcc: Stable for amd64. Retroactively mark stable for the remaining...
authorPatrice Clement <monsieurp@gentoo.org>
Thu, 21 Jul 2016 19:13:39 +0000 (21:13 +0200)
committerPatrice Clement <monsieurp@gentoo.org>
Thu, 21 Jul 2016 19:18:58 +0000 (21:18 +0200)
Also tidy up ebuild a bit.

Package-Manager: portage-2.2.28

dev-util/colorgcc/colorgcc-1.3.2-r7.ebuild

index 2a18254b4bbc30c23d8226173adf27d8835954fd..8693fd480e5b5817f14cc33a34927dd100703b03 100644 (file)
@@ -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
 }