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

Contents of /eclass/go-mono.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Jan 20 15:22:24 2009 UTC (5 years, 6 months ago) by loki_val
Branch: MAIN
Changes since 1.2: +2 -2 lines
Add exception for findutils dependency for BSDs since they bring their own.

1 loki_val 1.1 # Copyright 1999-2008 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 loki_val 1.3 # $Header: /var/cvsroot/gentoo-x86/eclass/go-mono.eclass,v 1.2 2009/01/20 14:48:54 loki_val 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    
13     inherit base versionator mono
14    
15    
16     NO_MONO_DEPEND=(
17     "dev-lang/mono"
18     "dev-dotnet/libgdiplus"
19     "dev-dotnet/gluezilla"
20     )
21    
22     GO_MONO_REL_PV="$(get_version_component_range 1-2)"
23    
24     if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
25     then
26     RDEPEND="=dev-lang/mono-${GO_MONO_REL_PV}*"
27     DEPEND="${RDEPEND}"
28     fi
29    
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    
34     DEPEND="${DEPEND}
35 loki_val 1.2 >=dev-util/pkgconfig-0.23
36 loki_val 1.3 userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
37 loki_val 1.1
38     if [[ "${GO_MONO_REL_PV}" = "2.2" ]]
39     then
40     PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
41     fi
42    
43     if [[ "${PV%_rc*}" != "${PV}" ]]
44     then
45     GO_MONO_P="${P%_rc*}"
46     SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P} -> ${P}.tar.bz2"
47     S="${WORKDIR}/${GO_MONO_P}"
48     elif [[ "${PV%_pre*}" != "${PV}" ]]
49     then
50     GO_MONO_P="${P%_pre*}"
51     SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P} -> ${P}.tar.bz2"
52     S="${WORKDIR}/${GO_MONO_P}"
53     else
54     GO_MONO_P=${P}
55     SRC_URI="http://ftp.novell.com/pub/mono/sources/${PN}/${P}.tar.bz2"
56     fi
57    
58     # @FUNCTION: go-mono_src_unpack
59     # @DESCRIPTION: Runs default()
60     go-mono_src_unpack() {
61     default
62     }
63    
64     # @FUNCTION: go-mono_src_prepare
65     # @DESCRIPTION: Runs autopatch from base.eclass, if PATCHES is set.
66     go-mono_src_prepare() {
67     base_src_util autopatch
68     }
69    
70     # @FUNCTION: go-mono_src_configure
71     # @DESCRIPTION: Runs econf, disabling static libraries and dependency-tracking.
72     go-mono_src_configure() {
73     econf --disable-dependency-tracking \
74     --disable-static \
75     "$@"
76     }
77    
78     # @FUNCTION: go-mono_src_configure
79     # @DESCRIPTION: Runs default()
80     go-mono_src_compile() {
81     default
82     }
83    
84     # @ECLASS-VARIABLE: DOCS
85     # @DESCRIPTION: Insert path of docs you want installed. If more than one,
86     # consider using an array.
87    
88     # @FUNCTION: go-mono_src_install
89     # @DESCRIPTION: Rune emake, installs common doc files, if DOCS is
90     # set, installs those. Gets rid of .la files.
91     go-mono_src_install () {
92     emake -j1 DESTDIR="${D}" install || die "install failed"
93     mono_multilib_comply
94     local commondoc=( AUTHORS ChangeLog README TODO )
95     for docfile in "${commondoc[@]}"
96     do
97     [[ -e "${docfile}" ]] && dodoc "${docfile}"
98     done
99     if [[ "${DOCS[@]}" ]]
100     then
101     dodoc "${DOCS[@]}" || die "dodoc DOCS failed"
102     fi
103     find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
104     }
105    
106     EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20