aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorArsenShnurkov <ArsenShnurkov@users.noreply.github.com>2017-04-28 11:44:40 +0300
committerArsenShnurkov <ArsenShnurkov@users.noreply.github.com>2017-04-28 11:44:40 +0300
commit010eb4ed29fb941490c189e93dc42cc7a8caeb56 (patch)
tree881aa705d3532291b9d28e6ebe373fe6fda0993a /eclass
parentnew versions of build (diff)
downloaddotnet-010eb4ed29fb941490c189e93dc42cc7a8caeb56.tar.gz
dotnet-010eb4ed29fb941490c189e93dc42cc7a8caeb56.tar.bz2
dotnet-010eb4ed29fb941490c189e93dc42cc7a8caeb56.zip
GAC installing moved to pkg_postinst/pkg_prerm
Diffstat (limited to '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
}