-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-
-inherit eutils
+EAPI=7
DESCRIPTION="Perl script to colorise the gcc output."
HOMEPAGE="http://schlueters.de/colorgcc.html"
SRC_URI="mirror://gentoo/${P}.tar.gz"
-SLOT="0"
LICENSE="GPL-2"
+SLOT="0"
KEYWORDS="~alpha amd64 hppa ~mips ppc sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE=""
DEPEND="dev-lang/perl"
RDEPEND="${DEPEND}"
"${FILESDIR}"/${P}-nohang.patch
)
-src_prepare() {
- epatch "${PATCHES[@]}"
-}
-
src_install() {
- dobin "${PN}"
- dodir "/etc/${PN}" "/usr/lib/${PN}/bin"
- insinto "/etc/${PN}"
- doins "${PN}rc"
+ dobin ${PN}
+
+ insinto /etc/${PN}
+ doins ${PN}rc
+
einfo "Scanning for compiler front-ends"
- into "/usr/lib/${PN}/bin"
- local COMPILERS=( gcc cc c++ g++ ${CHOST}-gcc ${CHOST}-c++ ${CHOST}-g++ )
+ dodir /usr/lib/${PN}/bin
+ local c 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}"
+ dosym ../../../bin/${PN} /usr/lib/${PN}/bin/${c}
done
- dodoc CREDITS ChangeLog
+ einstalldocs
}
pkg_postinst() {
---- colorgcc.orig 1999-04-29 10:16:08.000000000 -0700
-+++ colorgcc 2003-04-11 16:38:52.000000000 -0700
+--- a/colorgcc
++++ b/colorgcc
@@ -88,16 +88,16 @@
#
# 1.0.0 Initial Version
+ waitpid($compiler_pid, 0);
+ exit ($? >> 8);
+}
---- colorgccrc.orig 1999-04-29 10:16:08.000000000 -0700
-+++ colorgccrc 2003-02-12 17:38:38.000000000 -0800
+--- a/colorgccrc
++++ b/colorgccrc
@@ -20,12 +20,14 @@
# For example, srcColor: bold cyan on_yellow
#
errorMessageColor: bold red
-
-
---- INSTALL.orig 1999-04-29 10:16:08.000000000 -0700
-+++ INSTALL 2003-04-07 17:12:25.000000000 -0700
+--- a/INSTALL
++++ b/INSTALL
@@ -27,9 +27,9 @@
When "g++" is invoked, colorgcc is run instead. colorgcc looks at the
program name to figure out which compiler to use.