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

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20