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

Diff of /eclass/mono.eclass

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

Revision 1.11 Revision 1.12
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.11 2009/01/05 17:12:34 loki_val Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.12 2009/01/14 17:17:17 loki_val 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
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 local dir finddirs=() 46 local dir finddirs=() mv_command=${mv_command:-mv}
47 if [[ -d "${D}/usr/lib" && "$(get_libdir)" != "lib" ]] 47 if [[ -d "${D}/usr/lib" && "$(get_libdir)" != "lib" ]]
48 then 48 then
49 if ! [[ -d "${D}"/usr/"$(get_libdir)" ]] 49 if ! [[ -d "${D}"/usr/"$(get_libdir)" ]]
50 then 50 then
51 mkdir "${D}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${D}/usr/$(get_libdir)" 51 mkdir "${D}"/usr/"$(get_libdir)" || die "Couldn't mkdir ${D}/usr/$(get_libdir)"
52 fi 52 fi
53 cp -ar "${D}"/usr/lib/* "${D}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed" 53 ${mv_command} "${D}"/usr/lib/* "${D}"/usr/"$(get_libdir)"/ || die "Moving files into correct libdir failed"
54 rm -rf "${D}"/usr/lib 54 rm -rf "${D}"/usr/lib
55 for dir in "${D}"/usr/"$(get_libdir)"/pkgconfig "${D}"/usr/share/pkgconfig 55 for dir in "${D}"/usr/"$(get_libdir)"/pkgconfig "${D}"/usr/share/pkgconfig
56 do 56 do
57 [[ -d "${dir}" ]] && finddirs=( "${finddirs[@]}" "${dir}" ) 57 [[ -d "${dir}" ]] && finddirs=( "${finddirs[@]}" "${dir}" )
58 done 58 done
60 then 60 then
61 sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \ 61 sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \
62 $(find "${finddirs[@]}" -name '*.pc') \ 62 $(find "${finddirs[@]}" -name '*.pc') \
63 || die "Sedding some sense into pkgconfig files failed." 63 || die "Sedding some sense into pkgconfig files failed."
64 fi 64 fi
65 if [[ -d "${D}/usr/bin" ]]
66 then
67 for exe in "${D}/usr/bin"/*
68 do
69 if [[ "$(file "${exe}")" == *"shell script text"* ]]
70 then
71 sed -r -i -e ":/lib(/|$): s:/lib(/|$):/$(get_libdir)\1:" \
72 "${exe}" || die "Sedding some sense into ${exe} failed"
73 fi
74 done
75 fi
65 76
66 fi 77 fi
67} 78}

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20