---
sys-devel/icecream/icecream-1.0.0-r2.ebuild | 13 +++++++++++++
1 file changed, 13 insertions(+)
changes in v2: do not apply magic when ROOT!=/
diff --git a/sys-devel/icecream/icecream-1.0.0-r2.ebuild
b/sys-devel/icecream/icecream-1.0.0-r2.ebuild
index 187928a2290d..96a3c171e8a0 100644
--- a/sys-devel/icecream/icecream-1.0.0-r2.ebuild
+++ b/sys-devel/icecream/icecream-1.0.0-r2.ebuild
@@ -17,6 +17,7 @@ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
IUSE=""
RDEPEND="
+ dev-util/shadowman
sys-libs/libcap-ng
"
DEPEND="${RDEPEND}"
@@ -52,3 +53,15 @@ src_install() {
insinto /usr/share/shadowman/tools
newins - icecc <<<'/usr/libexec/icecc/bin'
}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
+ eselect compiler-shadow remove icecc
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${ROOT} == / ]]; then
+ eselect compiler-shadow update icecc
+ fi
+}
--
2.14.1