/[gentoo-x86]/eclass/mono.eclass
Gentoo

Diff of /eclass/mono.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 Revision 1.11
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.10 2008/12/26 00:37:47 loki_val Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.11 2009/01/05 17:12:34 loki_val Exp $
4 4
5# @ECLASS: mono.eclass 5# @ECLASS: mono.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# dotnet@gentoo.org 7# dotnet@gentoo.org
8# @BLURB: common settings and functions for mono and dotnet related 8# @BLURB: common settings and functions for mono and dotnet related
10# @DESCRIPTION: 10# @DESCRIPTION:
11# The mono eclass contains common environment settings that are useful for 11# The mono eclass contains common environment settings that are useful for
12# dotnet packages. Currently, it provides no functions, just exports 12# dotnet packages. Currently, it provides no functions, just exports
13# MONO_SHARED_DIR and sets LC_ALL in order to prevent errors during compilation 13# MONO_SHARED_DIR and sets LC_ALL in order to prevent errors during compilation
14# of dotnet packages. 14# of dotnet packages.
15
16inherit multilib
15 17
16# >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the 18# >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
17# shared dir to ${T} so that ${T}/.wapi can be used during the install process. 19# shared dir to ${T} so that ${T}/.wapi can be used during the install process.
18export MONO_SHARED_DIR="${T}" 20export MONO_SHARED_DIR="${T}"
19 21
29 31
30# Fix bug 83020: 32# Fix bug 83020:
31# "Access Violations Arise When Emerging Mono-Related Packages with MONO_AOT_CACHE" 33# "Access Violations Arise When Emerging Mono-Related Packages with MONO_AOT_CACHE"
32 34
33unset MONO_AOT_CACHE 35unset MONO_AOT_CACHE
36
37egacinstall() {
38 gacutil -i "${1}" \
39 -root "${D}"/usr/$(get_libdir) \
40 -gacdir /usr/$(get_libdir) \
41 -package ${2:-${GACPN:-${PN}}} \
42 || die "installing ${1} into the Global Assembly Cache failed"
43}
44
45mono_multilib_comply() {
46 local dir finddirs=()
47 if [[ -d "${D}/usr/lib" && "$(get_libdir)" != "lib" ]]
48 then
49 if ! [[ -d "${D}"/usr/"$(get_libdir)" ]]
50 then
51 mkdir "${D}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${D}/usr/$(get_libdir)"
52 fi
53 cp -ar "${D}"/usr/lib/* "${D}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed"
54 rm -rf "${D}"/usr/lib
55 for dir in "${D}"/usr/"$(get_libdir)"/pkgconfig "${D}"/usr/share/pkgconfig
56 do
57 [[ -d "${dir}" ]] && finddirs=( "${finddirs[@]}" "${dir}" )
58 done
59 if ! [[ -z "${finddirs[@]// /}" ]]
60 then
61 sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \
62 $(find "${finddirs[@]}" -name '*.pc') \
63 || die "Sedding some sense into pkgconfig files failed."
64 fi
65
66 fi
67}

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20