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

Diff of /eclass/mono.eclass

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

Revision 1.13 Revision 1.15
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2011 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.13 2009/03/08 15:46:54 loki_val Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.15 2011/08/22 04:46:32 vapier 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 packages
9# packages
10# @DESCRIPTION: 9# @DESCRIPTION:
11# The mono eclass contains common environment settings that are useful for 10# The mono eclass contains common environment settings that are useful for
12# dotnet packages. Currently, it provides no functions, just exports 11# dotnet packages. Currently, it provides no functions, just exports
13# MONO_SHARED_DIR and sets LC_ALL in order to prevent errors during compilation 12# MONO_SHARED_DIR and sets LC_ALL in order to prevent errors during compilation
14# of dotnet packages. 13# of dotnet packages.
33# "Access Violations Arise When Emerging Mono-Related Packages with MONO_AOT_CACHE" 32# "Access Violations Arise When Emerging Mono-Related Packages with MONO_AOT_CACHE"
34 33
35unset MONO_AOT_CACHE 34unset MONO_AOT_CACHE
36 35
37egacinstall() { 36egacinstall() {
37 use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
38 gacutil -i "${1}" \ 38 gacutil -i "${1}" \
39 -root "${D}"/usr/$(get_libdir) \ 39 -root "${ED}"/usr/$(get_libdir) \
40 -gacdir /usr/$(get_libdir) \ 40 -gacdir /usr/$(get_libdir) \
41 -package ${2:-${GACPN:-${PN}}} \ 41 -package ${2:-${GACPN:-${PN}}} \
42 || die "installing ${1} into the Global Assembly Cache failed" 42 || die "installing ${1} into the Global Assembly Cache failed"
43} 43}
44 44
45mono_multilib_comply() { 45mono_multilib_comply() {
46 use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
46 local dir finddirs=() mv_command=${mv_command:-mv} 47 local dir finddirs=() mv_command=${mv_command:-mv}
47 if [[ -d "${D}/usr/lib" && "$(get_libdir)" != "lib" ]] 48 if [[ -d "${ED}/usr/lib" && "$(get_libdir)" != "lib" ]]
48 then 49 then
49 if ! [[ -d "${D}"/usr/"$(get_libdir)" ]] 50 if ! [[ -d "${ED}"/usr/"$(get_libdir)" ]]
50 then 51 then
51 mkdir "${D}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${D}/usr/$(get_libdir)" 52 mkdir "${ED}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${ED}/usr/$(get_libdir)"
52 fi 53 fi
53 ${mv_command} "${D}"/usr/lib/* "${D}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed" 54 ${mv_command} "${ED}"/usr/lib/* "${ED}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed"
54 rm -rf "${D}"/usr/lib 55 rm -rf "${ED}"/usr/lib
55 for dir in "${D}"/usr/"$(get_libdir)"/pkgconfig "${D}"/usr/share/pkgconfig 56 for dir in "${ED}"/usr/"$(get_libdir)"/pkgconfig "${ED}"/usr/share/pkgconfig
56 do 57 do
57 58
58 if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]] 59 if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]]
59 then 60 then
60 pushd "${dir}" &> /dev/null 61 pushd "${dir}" &> /dev/null
62 *.pc \ 63 *.pc \
63 || die "Sedding some sense into pkgconfig files failed." 64 || die "Sedding some sense into pkgconfig files failed."
64 popd "${dir}" &> /dev/null 65 popd "${dir}" &> /dev/null
65 fi 66 fi
66 done 67 done
67 if [[ -d "${D}/usr/bin" ]] 68 if [[ -d "${ED}/usr/bin" ]]
68 then 69 then
69 for exe in "${D}/usr/bin"/* 70 for exe in "${ED}/usr/bin"/*
70 do 71 do
71 if [[ "$(file "${exe}")" == *"shell script text"* ]] 72 if [[ "$(file "${exe}")" == *"shell script text"* ]]
72 then 73 then
73 sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \ 74 sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \
74 "${exe}" || die "Sedding some sense into ${exe} failed" 75 "${exe}" || die "Sedding some sense into ${exe} failed"

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20