summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/go-mono.eclass
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/go-mono.eclass')
-rw-r--r--eclass/go-mono.eclass137
1 files changed, 137 insertions, 0 deletions
diff --git a/eclass/go-mono.eclass b/eclass/go-mono.eclass
new file mode 100644
index 000000000000..81ee68e5b5e8
--- /dev/null
+++ b/eclass/go-mono.eclass
@@ -0,0 +1,137 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: go-mono.eclass
+# @MAINTAINER:
+# dotnet@gentoo.org
+# @BLURB: Common functionality for go-mono.org apps
+# @DESCRIPTION:
+# Common functionality needed by all go-mono.org apps.
+
+inherit base versionator mono
+
+PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
+
+GIT_PN="${PN/mono-debugger/debugger}"
+
+ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src/mono"
+
+GO_MONO_SUB_BRANCH=${GO_MONO_SUB_BRANCH}
+
+if [[ "${PV%_rc*}" != "${PV}" ]]
+then
+ GO_MONO_P="${P%_rc*}"
+ SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/${GO_MONO_P}"
+elif [[ "${PV%_pre*}" != "${PV}" ]]
+then
+ GO_MONO_P="${P%_pre*}"
+ SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/${GO_MONO_P}"
+elif [[ "${PV}" == "9999" ]]
+then
+ GO_MONO_P=${P}
+ EGIT_REPO_URI="http://github.com/mono/${GIT_PN}.git"
+ SRC_URI=""
+ inherit autotools git
+elif [[ "${PV%.9999}" != "${PV}" ]]
+then
+ GO_MONO_P=${P}
+ EGIT_REPO_URI="http://github.com/mono/${GIT_PN}.git"
+ EGIT_BRANCH="mono-$(get_version_component_range 1)-$(get_version_component_range 2)${GO_MONO_SUB_BRANCH}"
+ SRC_URI=""
+ inherit autotools git
+else
+ GO_MONO_P=${P}
+ SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+fi
+
+
+NO_MONO_DEPEND=( "dev-lang/mono" "dev-dotnet/libgdiplus" "dev-dotnet/gluezilla" )
+
+if [[ "$(get_version_component_range 3)" != "9999" ]]
+then
+ GO_MONO_REL_PV="$(get_version_component_range 1-2)"
+
+else
+ GO_MONO_REL_PV="${PV}"
+fi
+
+if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
+then
+ RDEPEND=">=dev-lang/mono-${GO_MONO_REL_PV}"
+ DEPEND="${RDEPEND}"
+fi
+
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
+
+# @FUNCTION: go-mono_src_unpack
+# @DESCRIPTION:
+# Runs default()
+go-mono_src_unpack() {
+ if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
+ then
+ default
+ git_src_unpack
+ else
+ default
+ fi
+}
+
+# @FUNCTION: go-mono_src_prepare
+# @DESCRIPTION:
+# Runs autopatch from base.eclass, if PATCHES is set.
+go-mono_src_prepare() {
+ if [[ "${PV%.9999}" != "${PV}" || "${PV}" == "9999" ]]
+ then
+ base_src_prepare
+ [[ "$EAUTOBOOTSTRAP" != "no" ]] && eautoreconf
+ else
+ base_src_prepare
+ fi
+}
+
+# @FUNCTION: go-mono_src_configure
+# @DESCRIPTION:
+# Runs econf, disabling static libraries and dependency-tracking.
+go-mono_src_configure() {
+ econf --disable-dependency-tracking \
+ --disable-static \
+ "$@"
+}
+
+# @FUNCTION: go-mono_src_compile
+# @DESCRIPTION:
+# Runs emake.
+go-mono_src_compile() {
+ emake "$@" || die "emake failed"
+}
+
+# @ECLASS-VARIABLE: DOCS
+# @DESCRIPTION:
+# Insert path of docs you want installed. If more than one,
+# consider using an array.
+
+# @FUNCTION: go-mono_src_install
+# @DESCRIPTION:
+# Rune emake, installs common doc files, if DOCS is
+# set, installs those. Gets rid of .la files.
+go-mono_src_install () {
+ emake -j1 DESTDIR="${D}" "$@" install || die "install failed"
+ mono_multilib_comply
+ local commondoc=( AUTHORS ChangeLog README TODO )
+ for docfile in "${commondoc[@]}"
+ do
+ [[ -e "${docfile}" ]] && dodoc "${docfile}"
+ done
+ if [[ "${DOCS[@]}" ]]
+ then
+ dodoc "${DOCS[@]}" || die "dodoc DOCS failed"
+ fi
+ find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
+}
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install