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

Contents of /eclass/go-mono.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sun May 3 12:19:35 2009 UTC (5 years, 2 months ago) by loki_val
Branch: MAIN
Changes since 1.5: +53 -27 lines
Eclass updated to support SVN ebuilds, plus nitpicks.

1 # Copyright 1999-2008 Gentoo Foundation
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 $
4
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
13 inherit base versionator mono
14
15
16 PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
17
18 SVN_PN="${PN/mono-debugger/debugger}"
19
20 ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src/mono"
21
22
23 if [[ "${PV%_rc*}" != "${PV}" ]]
24 then
25 GO_MONO_P="${P%_rc*}"
26 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
27 S="${WORKDIR}/${GO_MONO_P}"
28 elif [[ "${PV%_pre*}" != "${PV}" ]]
29 then
30 GO_MONO_P="${P%_pre*}"
31 SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
32 S="${WORKDIR}/${GO_MONO_P}"
33 elif [[ "${PV}" == "9999" ]]
34 then
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
39 elif [[ "${PV%.9999}" != "${PV}" ]]
40 then
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
45 else
46 GO_MONO_P=${P}
47 SRC_URI="http://ftp.novell.com/pub/mono/sources/${PN}/${P}.tar.bz2"
48 fi
49
50
51 NO_MONO_DEPEND=( "dev-lang/mono" "dev-dotnet/libgdiplus" )
52
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 # @FUNCTION: go-mono_src_unpack
72 # @DESCRIPTION: Runs default()
73 go-mono_src_unpack() {
74 if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
75 then
76 default
77 subversion_src_unpack
78 else
79 default
80 fi
81 }
82
83 # @FUNCTION: go-mono_src_prepare
84 # @DESCRIPTION: Runs autopatch from base.eclass, if PATCHES is set.
85 go-mono_src_prepare() {
86 if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
87 then
88 base_src_util autopatch
89 [[ "$EAUTOBOOTSTRAP" != "no" ]] && eautoreconf
90 else
91 base_src_util autopatch
92 fi
93 }
94
95 # @FUNCTION: go-mono_src_configure
96 # @DESCRIPTION: Runs econf, disabling static libraries and dependency-tracking.
97 go-mono_src_configure() {
98 econf --disable-dependency-tracking \
99 --disable-static \
100 "$@"
101 }
102
103 # @FUNCTION: go-mono_src_configure
104 # @DESCRIPTION: Runs default()
105 go-mono_src_compile() {
106 emake "$@" || die "emake failed"
107 }
108
109 # @ECLASS-VARIABLE: DOCS
110 # @DESCRIPTION: Insert path of docs you want installed. If more than one,
111 # consider using an array.
112
113 # @FUNCTION: go-mono_src_install
114 # @DESCRIPTION: Rune emake, installs common doc files, if DOCS is
115 # set, installs those. Gets rid of .la files.
116 go-mono_src_install () {
117 emake -j1 DESTDIR="${D}" "$@" install || die "install failed"
118 mono_multilib_comply
119 local commondoc=( AUTHORS ChangeLog README TODO )
120 for docfile in "${commondoc[@]}"
121 do
122 [[ -e "${docfile}" ]] && dodoc "${docfile}"
123 done
124 if [[ "${DOCS[@]}" ]]
125 then
126 dodoc "${DOCS[@]}" || die "dodoc DOCS failed"
127 fi
128 find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
129 }
130
131 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20