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

Contents of /eclass/mono.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Sun Mar 8 15:46:54 2009 UTC (5 years, 6 months ago) by loki_val
Branch: MAIN
Changes since 1.12: +10 -8 lines
Fix mono_multilib_comply for the case where an empty pkgconfig directory is installed.

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.12 2009/01/14 17:17:17 loki_val Exp $
4
5 # @ECLASS: mono.eclass
6 # @MAINTAINER:
7 # dotnet@gentoo.org
8 # @BLURB: common settings and functions for mono and dotnet related
9 # packages
10 # @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
16 inherit multilib
17
18 # >=mono-0.92 versions using mcs -pkg:foo-sharp require shared memory, so we set the
19 # shared dir to ${T} so that ${T}/.wapi can be used during the install process.
20 export MONO_SHARED_DIR="${T}"
21
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
27 # Monodevelop-using applications need this to be set or they will try to create config
28 # files in the user's ~ dir.
29
30 export XDG_CONFIG_HOME="${T}"
31
32 # Fix bug 83020:
33 # "Access Violations Arise When Emerging Mono-Related Packages with MONO_AOT_CACHE"
34
35 unset MONO_AOT_CACHE
36
37 egacinstall() {
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
45 mono_multilib_comply() {
46 local dir finddirs=() mv_command=${mv_command:-mv}
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 ${mv_command} "${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
58 if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]]
59 then
60 pushd "${dir}" &> /dev/null
61 sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \
62 *.pc \
63 || die "Sedding some sense into pkgconfig files failed."
64 popd "${dir}" &> /dev/null
65 fi
66 done
67 if [[ -d "${D}/usr/bin" ]]
68 then
69 for exe in "${D}/usr/bin"/*
70 do
71 if [[ "$(file "${exe}")" == *"shell script text"* ]]
72 then
73 sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \
74 "${exe}" || die "Sedding some sense into ${exe} failed"
75 fi
76 done
77 fi
78
79 fi
80 }

  ViewVC Help
Powered by ViewVC 1.1.20