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

Contents of /eclass/mono.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (hide annotations) (download)
Mon Aug 22 04:46:32 2011 UTC (3 years, 3 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +3 -4 lines
fix random bugs in eclass documentation, and convert to new @AUTHOR tag

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

  ViewVC Help
Powered by ViewVC 1.1.20