/[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.14
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.13 2009/03/08 15:46:54 loki_val Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.14 2011/03/25 09:43:42 angelos 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
33# "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"
34 34
35unset MONO_AOT_CACHE 35unset MONO_AOT_CACHE
36 36
37egacinstall() { 37egacinstall() {
38 use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
38 gacutil -i "${1}" \ 39 gacutil -i "${1}" \
39 -root "${D}"/usr/$(get_libdir) \ 40 -root "${ED}"/usr/$(get_libdir) \
40 -gacdir /usr/$(get_libdir) \ 41 -gacdir /usr/$(get_libdir) \
41 -package ${2:-${GACPN:-${PN}}} \ 42 -package ${2:-${GACPN:-${PN}}} \
42 || die "installing ${1} into the Global Assembly Cache failed" 43 || die "installing ${1} into the Global Assembly Cache failed"
43} 44}
44 45
45mono_multilib_comply() { 46mono_multilib_comply() {
47 use !prefix && has "${EAPI:-0}" 0 1 2 && ED="${D}"
46 local dir finddirs=() mv_command=${mv_command:-mv} 48 local dir finddirs=() mv_command=${mv_command:-mv}
47 if [[ -d "${D}/usr/lib" && "$(get_libdir)" != "lib" ]] 49 if [[ -d "${ED}/usr/lib" && "$(get_libdir)" != "lib" ]]
48 then 50 then
49 if ! [[ -d "${D}"/usr/"$(get_libdir)" ]] 51 if ! [[ -d "${ED}"/usr/"$(get_libdir)" ]]
50 then 52 then
51 mkdir "${D}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${D}/usr/$(get_libdir)" 53 mkdir "${ED}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${ED}/usr/$(get_libdir)"
52 fi 54 fi
53 ${mv_command} "${D}"/usr/lib/* "${D}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed" 55 ${mv_command} "${ED}"/usr/lib/* "${ED}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed"
54 rm -rf "${D}"/usr/lib 56 rm -rf "${ED}"/usr/lib
55 for dir in "${D}"/usr/"$(get_libdir)"/pkgconfig "${D}"/usr/share/pkgconfig 57 for dir in "${ED}"/usr/"$(get_libdir)"/pkgconfig "${ED}"/usr/share/pkgconfig
56 do 58 do
57 59
58 if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]] 60 if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]]
59 then 61 then
60 pushd "${dir}" &> /dev/null 62 pushd "${dir}" &> /dev/null
62 *.pc \ 64 *.pc \
63 || die "Sedding some sense into pkgconfig files failed." 65 || die "Sedding some sense into pkgconfig files failed."
64 popd "${dir}" &> /dev/null 66 popd "${dir}" &> /dev/null
65 fi 67 fi
66 done 68 done
67 if [[ -d "${D}/usr/bin" ]] 69 if [[ -d "${ED}/usr/bin" ]]
68 then 70 then
69 for exe in "${D}/usr/bin"/* 71 for exe in "${ED}/usr/bin"/*
70 do 72 do
71 if [[ "$(file "${exe}")" == *"shell script text"* ]] 73 if [[ "$(file "${exe}")" == *"shell script text"* ]]
72 then 74 then
73 sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \ 75 sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \
74 "${exe}" || die "Sedding some sense into ${exe} failed" 76 "${exe}" || die "Sedding some sense into ${exe} failed"

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

  ViewVC Help
Powered by ViewVC 1.1.20