aboutsummaryrefslogtreecommitdiff
blob: 2f9dada36be9689fe67820f17f8361f05c24dc09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

# @ECLASS: fake.eclass
# @MAINTAINER: cynede@gentoo.org
# @BLURB: Common functionality for fake apps
# @DESCRIPTION: Common functionality needed by fake build system.

inherit dotnet eutils

# @ECLASS_VARIABLE: FAKE_DEPEND
# @DESCRIPTION Set false to net depend on fake
: ${FAKE_NO_DEPEND:=}

[[ -n $FAKE_DEPEND ]] && DEPEND+=" dev-lang/fsharp dev-dotnet/fake"

# @FUNCTION: fake_src_configure
# @DESCRIPTION: Runs nothing
fake_src_configure() { :; }

# @FUNCTION: fake_src_compile
# @DESCRIPTION: Runs fake.
fake_src_compile() {
	fake || die "fake build failed"
}

# @FUNCTION: fake_src_install
# @DESCRIPTION: installs common doc files, if DOCS is
# set, installs those. Gets rid of .la files.
fake_src_install() {
	dotnet_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
	prune_libtool_files
}

EXPORT_FUNCTIONS src_configure src_compile src_install