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

Contents of /eclass/mono.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations) (download)
Fri Mar 25 09:43:42 2011 UTC (3 years, 8 months ago) by angelos
Branch: MAIN
Changes since 1.13: +12 -10 lines
Support EAPI >=3 in mono.eclass

1 compnerd 1.8 # Copyright 1999-2008 Gentoo Foundation
2 foser 1.1 # Distributed under the terms of the GNU General Public License v2
3 angelos 1.14 # $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.13 2009/03/08 15:46:54 loki_val Exp $
4 compnerd 1.8
5     # @ECLASS: mono.eclass
6     # @MAINTAINER:
7     # dotnet@gentoo.org
8     # @BLURB: common settings and functions for mono and dotnet related
9 jurek 1.7 # packages
10 compnerd 1.8 # @DESCRIPTION:
11     # The mono eclass contains common environment settings that are useful for
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
14     # of dotnet packages.
15 foser 1.1
16 loki_val 1.11 inherit multilib
17    
18 swegener 1.6 # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
19 latexer 1.2 # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
20 compnerd 1.8 export MONO_SHARED_DIR="${T}"
21 jurek 1.7
22     # Building mono, nant and many other dotnet packages is known to fail if LC_ALL
23     # variable is not set to C. To prevent this all mono related packages will be
24     # build with LC_ALL=C (see bugs #146424, #149817)
25     export LC_ALL=C
26 loki_val 1.9
27 loki_val 1.10 # Monodevelop-using applications need this to be set or they will try to create config
28     # files in the user's ~ dir.
29 loki_val 1.9
30     export XDG_CONFIG_HOME="${T}"
31 loki_val 1.10
32     # Fix bug 83020:
33     # "Access Violations Arise When Emerging Mono-Related Packages with MONO_AOT_CACHE"
34    
35     unset MONO_AOT_CACHE
36 loki_val 1.11
37     egacinstall() {
38 angelos 1.14 use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
39 loki_val 1.11 gacutil -i "${1}" \
40 angelos 1.14 -root "${ED}"/usr/$(get_libdir) \
41 loki_val 1.11 -gacdir /usr/$(get_libdir) \
42     -package ${2:-${GACPN:-${PN}}} \
43     || die "installing ${1} into the Global Assembly Cache failed"
44     }
45    
46     mono_multilib_comply() {
47 angelos 1.14 use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
48 loki_val 1.12 local dir finddirs=() mv_command=${mv_command:-mv}
49 angelos 1.14 if [[ -d "${ED}/usr/lib" && "$(get_libdir)" != "lib" ]]
50 loki_val 1.11 then
51 angelos 1.14 if ! [[ -d "${ED}"/usr/"$(get_libdir)" ]]
52 loki_val 1.11 then
53 angelos 1.14 mkdir "${ED}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${ED}/usr/$(get_libdir)"
54 loki_val 1.11 fi
55 angelos 1.14 ${mv_command} "${ED}"/usr/lib/* "${ED}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed"
56     rm -rf "${ED}"/usr/lib
57     for dir in "${ED}"/usr/"$(get_libdir)"/pkgconfig "${ED}"/usr/share/pkgconfig
58 loki_val 1.11 do
59 loki_val 1.13
60     if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]]
61     then
62     pushd "${dir}" &> /dev/null
63     sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \
64     *.pc \
65     || die "Sedding some sense into pkgconfig files failed."
66     popd "${dir}" &> /dev/null
67     fi
68 loki_val 1.11 done
69 angelos 1.14 if [[ -d "${ED}/usr/bin" ]]
70 loki_val 1.12 then
71 angelos 1.14 for exe in "${ED}/usr/bin"/*
72 loki_val 1.12 do
73     if [[ "$(file "${exe}")" == *"shell script text"* ]]
74     then
75     sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \
76     "${exe}" || die "Sedding some sense into ${exe} failed"
77     fi
78     done
79     fi
80 loki_val 1.11
81     fi
82     }

  ViewVC Help
Powered by ViewVC 1.1.20