aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/gac.eclass')
-rw-r--r--eclass/gac.eclass24
1 files changed, 14 insertions, 10 deletions
diff --git a/eclass/gac.eclass b/eclass/gac.eclass
index 7830c0c..aed7d6b 100644
--- a/eclass/gac.eclass
+++ b/eclass/gac.eclass
@@ -35,27 +35,31 @@ egacinstall() {
}
# @FUNCTION: egacadd
-# @DESCRIPTION: install package to GAC
+# @DESCRIPTION: install package to GAC in pkg_postinst phase
+# the idea is to allow registration in GAC for binary packages for different PREFIX-es
+# see http://arsenshnurkov.github.io/gentoo-mono-handbook/gac.htm
egacadd() {
if use gac; then
- use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
+ GACROOT="${PREFIX}/usr/$(get_libdir)"
+ GACDIR="/usr/$(get_libdir)/mono/gac"
+ einfo egacadd: GACROOT="${GACROOT}", GACDIR="${GACDIR}"
gacutil -i "${1}" \
- -root "${ED}"/usr/$(get_libdir) \
- -gacdir /usr/$(get_libdir) \
+ -root ${GACROOT} \
+ -gacdir "${GACDIR}" \
-package ${2:-${GACPN:-${PN}}} \
|| die "installing ${1} into the Global Assembly Cache failed"
fi
}
# @FUNCTION: egacdel
-# @DESCRIPTION: remove package from GAC
+# @DESCRIPTION: remove package from GAC in pkg_prerm phase
+# see notes for egacadd()
egacdel() {
if use gac; then
- use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
- gacutil -u "${1}" \
- -root "${ED}"/usr/$(get_libdir) \
- -gacdir /usr/$(get_libdir) \
- -package ${2:-${GACPN:-${PN}}}
+ GACROOT="${PREFIX}/usr/$(get_libdir)"
+ GACDIR="/usr/$(get_libdir)/mono/gac"
+ einfo gacutil -u "${1}" -root "${GACROOT}" -gacdir "${GACDIR}"
+ gacutil -u "${1}" -root "${GACROOT}" -gacdir "${GACDIR}"
# don't die
fi
}