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

Diff of /eclass/go-mono.eclass

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

Revision 1.5 Revision 1.6
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/go-mono.eclass,v 1.5 2009/01/29 16:26:48 loki_val Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/go-mono.eclass,v 1.6 2009/05/03 12:19:35 loki_val Exp $
4 4
5# @ECLASS: go-mono.eclass 5# @ECLASS: go-mono.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# dotnet@gentoo.org 7# dotnet@gentoo.org
8# @BLURB: Common functionality for go-mono.org apps 8# @BLURB: Common functionality for go-mono.org apps
11 11
12 12
13inherit base versionator mono 13inherit base versionator mono
14 14
15 15
16NO_MONO_DEPEND=( 16PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
17 "dev-lang/mono"
18 "dev-dotnet/libgdiplus"
19)
20 17
21GO_MONO_REL_PV="$(get_version_component_range 1-2)" 18SVN_PN="${PN/mono-debugger/debugger}"
22 19
23if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}" 20ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src/mono"
24then
25 RDEPEND="=dev-lang/mono-${GO_MONO_REL_PV}*"
26 DEPEND="${RDEPEND}"
27fi
28 21
29# @ECLASS-VARIABLE: PRE_URI
30# @DESCRIPTION: If installing a preview, set this variable to the base
31# path on ximians's servers from which to install.
32
33DEPEND="${DEPEND}
34 >=dev-util/pkgconfig-0.23
35 userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
36
37if [[ "${GO_MONO_REL_PV}" = "2.4" ]]
38then
39 PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
40fi
41 22
42if [[ "${PV%_rc*}" != "${PV}" ]] 23if [[ "${PV%_rc*}" != "${PV}" ]]
43then 24then
44 GO_MONO_P="${P%_rc*}" 25 GO_MONO_P="${P%_rc*}"
45 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2" 26 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
47elif [[ "${PV%_pre*}" != "${PV}" ]] 28elif [[ "${PV%_pre*}" != "${PV}" ]]
48then 29then
49 GO_MONO_P="${P%_pre*}" 30 GO_MONO_P="${P%_pre*}"
50 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2" 31 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
51 S="${WORKDIR}/${GO_MONO_P}" 32 S="${WORKDIR}/${GO_MONO_P}"
33elif [[ "${PV}" == "9999" ]]
34then
35 GO_MONO_P=${P}
36 ESVN_REPO_URI="svn://anonsvn.mono-project.com/source/trunk/${SVN_PN}"
37 SRC_URI=""
38 inherit autotools subversion
39elif [[ "${PV%.9999}" != "${PV}" ]]
40then
41 GO_MONO_P=${P}
42 ESVN_REPO_URI="svn://anonsvn.mono-project.com/source/branches/mono-$(get_version_component_range 1)-$(get_version_component_range 2)/${SVN_PN}"
43 SRC_URI=""
44 inherit autotools subversion
52else 45else
53 GO_MONO_P=${P} 46 GO_MONO_P=${P}
54 SRC_URI="http://ftp.novell.com/pub/mono/sources/${PN}/${P}.tar.bz2" 47 SRC_URI="http://ftp.novell.com/pub/mono/sources/${PN}/${P}.tar.bz2"
55fi 48fi
56 49
50
51NO_MONO_DEPEND=( "dev-lang/mono" "dev-dotnet/libgdiplus" )
52
53if [[ "$(get_version_component_range 3)" != "9999" ]]
54then
55 GO_MONO_REL_PV="$(get_version_component_range 1-2)"
56
57else
58 GO_MONO_REL_PV="${PV}"
59fi
60
61if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
62then
63 RDEPEND="=dev-lang/mono-${GO_MONO_REL_PV}*"
64 DEPEND="${RDEPEND}"
65fi
66
67DEPEND="${DEPEND}
68 >=dev-util/pkgconfig-0.23
69 userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
70
57# @FUNCTION: go-mono_src_unpack 71# @FUNCTION: go-mono_src_unpack
58# @DESCRIPTION: Runs default() 72# @DESCRIPTION: Runs default()
59go-mono_src_unpack() { 73go-mono_src_unpack() {
74 if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
75 then
60 default 76 default
77 subversion_src_unpack
78 else
79 default
80 fi
61} 81}
62 82
63# @FUNCTION: go-mono_src_prepare 83# @FUNCTION: go-mono_src_prepare
64# @DESCRIPTION: Runs autopatch from base.eclass, if PATCHES is set. 84# @DESCRIPTION: Runs autopatch from base.eclass, if PATCHES is set.
65go-mono_src_prepare() { 85go-mono_src_prepare() {
86 if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
87 then
66 base_src_util autopatch 88 base_src_util autopatch
89 [[ "$EAUTOBOOTSTRAP" != "no" ]] && eautoreconf
90 else
91 base_src_util autopatch
92 fi
67} 93}
68 94
69# @FUNCTION: go-mono_src_configure 95# @FUNCTION: go-mono_src_configure
70# @DESCRIPTION: Runs econf, disabling static libraries and dependency-tracking. 96# @DESCRIPTION: Runs econf, disabling static libraries and dependency-tracking.
71go-mono_src_configure() { 97go-mono_src_configure() {
75} 101}
76 102
77# @FUNCTION: go-mono_src_configure 103# @FUNCTION: go-mono_src_configure
78# @DESCRIPTION: Runs default() 104# @DESCRIPTION: Runs default()
79go-mono_src_compile() { 105go-mono_src_compile() {
80 default 106 emake "$@" || die "emake failed"
81} 107}
82 108
83# @ECLASS-VARIABLE: DOCS 109# @ECLASS-VARIABLE: DOCS
84# @DESCRIPTION: Insert path of docs you want installed. If more than one, 110# @DESCRIPTION: Insert path of docs you want installed. If more than one,
85# consider using an array. 111# consider using an array.
86 112
87# @FUNCTION: go-mono_src_install 113# @FUNCTION: go-mono_src_install
88# @DESCRIPTION: Rune emake, installs common doc files, if DOCS is 114# @DESCRIPTION: Rune emake, installs common doc files, if DOCS is
89# set, installs those. Gets rid of .la files. 115# set, installs those. Gets rid of .la files.
90go-mono_src_install () { 116go-mono_src_install () {
91 emake -j1 DESTDIR="${D}" install || die "install failed" 117 emake -j1 DESTDIR="${D}" "$@" install || die "install failed"
92 mono_multilib_comply 118 mono_multilib_comply
93 local commondoc=( AUTHORS ChangeLog README TODO ) 119 local commondoc=( AUTHORS ChangeLog README TODO )
94 for docfile in "${commondoc[@]}" 120 for docfile in "${commondoc[@]}"
95 do 121 do
96 [[ -e "${docfile}" ]] && dodoc "${docfile}" 122 [[ -e "${docfile}" ]] && dodoc "${docfile}"

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20