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

Contents of /eclass/go-mono.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide annotations) (download)
Mon Aug 22 04:46:32 2011 UTC (3 years ago) by vapier
Branch: MAIN
Changes since 1.11: +14 -8 lines
fix random bugs in eclass documentation, and convert to new @AUTHOR tag

1 vapier 1.12 # Copyright 1999-2011 Gentoo Foundation
2 loki_val 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.12 # $Header: /var/cvsroot/gentoo-x86/eclass/go-mono.eclass,v 1.11 2011/08/18 09:05:54 ali_bush Exp $
4 loki_val 1.1
5     # @ECLASS: go-mono.eclass
6     # @MAINTAINER:
7     # dotnet@gentoo.org
8     # @BLURB: Common functionality for go-mono.org apps
9     # @DESCRIPTION:
10     # Common functionality needed by all go-mono.org apps.
11    
12     inherit base versionator mono
13    
14 loki_val 1.6 PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
15 loki_val 1.1
16 pacho 1.9 GIT_PN="${PN/mono-debugger/debugger}"
17 loki_val 1.1
18 loki_val 1.6 ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src/mono"
19 loki_val 1.1
20 loki_val 1.7 GO_MONO_SUB_BRANCH=${GO_MONO_SUB_BRANCH}
21 loki_val 1.1
22     if [[ "${PV%_rc*}" != "${PV}" ]]
23     then
24     GO_MONO_P="${P%_rc*}"
25 loki_val 1.4 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
26 loki_val 1.1 S="${WORKDIR}/${GO_MONO_P}"
27     elif [[ "${PV%_pre*}" != "${PV}" ]]
28     then
29     GO_MONO_P="${P%_pre*}"
30 loki_val 1.4 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
31 loki_val 1.1 S="${WORKDIR}/${GO_MONO_P}"
32 loki_val 1.6 elif [[ "${PV}" == "9999" ]]
33     then
34     GO_MONO_P=${P}
35 pacho 1.9 EGIT_REPO_URI="http://github.com/mono/${GIT_PN}.git"
36 loki_val 1.6 SRC_URI=""
37 pacho 1.9 inherit autotools git
38 loki_val 1.6 elif [[ "${PV%.9999}" != "${PV}" ]]
39     then
40     GO_MONO_P=${P}
41 pacho 1.9 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 loki_val 1.6 SRC_URI=""
44 pacho 1.9 inherit autotools git
45 loki_val 1.1 else
46     GO_MONO_P=${P}
47 ali_bush 1.11 SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
48 loki_val 1.1 fi
49    
50 loki_val 1.6
51 loki_val 1.10 NO_MONO_DEPEND=( "dev-lang/mono" "dev-dotnet/libgdiplus" "dev-dotnet/gluezilla" )
52 loki_val 1.6
53     if [[ "$(get_version_component_range 3)" != "9999" ]]
54     then
55     GO_MONO_REL_PV="$(get_version_component_range 1-2)"
56    
57     else
58     GO_MONO_REL_PV="${PV}"
59     fi
60    
61     if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
62     then
63     RDEPEND="=dev-lang/mono-${GO_MONO_REL_PV}*"
64     DEPEND="${RDEPEND}"
65     fi
66    
67     DEPEND="${DEPEND}
68     >=dev-util/pkgconfig-0.23
69     userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
70    
71 loki_val 1.1 # @FUNCTION: go-mono_src_unpack
72 vapier 1.12 # @DESCRIPTION:
73     # Runs default()
74 loki_val 1.1 go-mono_src_unpack() {
75 loki_val 1.6 if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
76     then
77     default
78 pacho 1.9 git_src_unpack
79 loki_val 1.6 else
80     default
81     fi
82 loki_val 1.1 }
83    
84     # @FUNCTION: go-mono_src_prepare
85 vapier 1.12 # @DESCRIPTION:
86     # Runs autopatch from base.eclass, if PATCHES is set.
87 loki_val 1.1 go-mono_src_prepare() {
88 loki_val 1.6 if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
89     then
90 scarabeus 1.8 base_src_prepare
91 loki_val 1.6 [[ "$EAUTOBOOTSTRAP" != "no" ]] && eautoreconf
92     else
93 scarabeus 1.8 base_src_prepare
94 loki_val 1.6 fi
95 loki_val 1.1 }
96    
97     # @FUNCTION: go-mono_src_configure
98 vapier 1.12 # @DESCRIPTION:
99     # Runs econf, disabling static libraries and dependency-tracking.
100 loki_val 1.1 go-mono_src_configure() {
101     econf --disable-dependency-tracking \
102     --disable-static \
103     "$@"
104     }
105    
106     # @FUNCTION: go-mono_src_configure
107 vapier 1.12 # @DESCRIPTION:
108     # Runs default()
109 loki_val 1.1 go-mono_src_compile() {
110 loki_val 1.6 emake "$@" || die "emake failed"
111 loki_val 1.1 }
112    
113     # @ECLASS-VARIABLE: DOCS
114 vapier 1.12 # @DESCRIPTION:
115     # Insert path of docs you want installed. If more than one,
116 loki_val 1.1 # consider using an array.
117    
118     # @FUNCTION: go-mono_src_install
119 vapier 1.12 # @DESCRIPTION:
120     # Rune emake, installs common doc files, if DOCS is
121 loki_val 1.1 # set, installs those. Gets rid of .la files.
122     go-mono_src_install () {
123 loki_val 1.6 emake -j1 DESTDIR="${D}" "$@" install || die "install failed"
124 loki_val 1.1 mono_multilib_comply
125     local commondoc=( AUTHORS ChangeLog README TODO )
126     for docfile in "${commondoc[@]}"
127     do
128     [[ -e "${docfile}" ]] && dodoc "${docfile}"
129     done
130     if [[ "${DOCS[@]}" ]]
131     then
132     dodoc "${DOCS[@]}" || die "dodoc DOCS failed"
133     fi
134     find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
135     }
136    
137     EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20