blob: 46da3fcaf927953115db0538381757479f509fb4 (
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
46
47
48
49
50
51
52
53
54
55
56
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# @ECLASS: msbuild.eclass
# @MAINTAINER: cynede@gentoo.org
# @BLURB: functions for working with msbuild command line utility
# @DESCRIPTION:
# This is the new replacement for dotnet eclass
inherit dotnet
case ${EAPI:-0} in
0) die "this eclass doesn't support EAPI 0" ;;
1|2|3) ;;
*) ;; #if [[ ${USE_DOTNET} ]]; then REQUIRED_USE="|| (${USE_DOTNET})"; fi;;
esac
# Use flags added to IUSE
IUSE+=" debug developer"
DEPEND+=" dev-util/msbuild"
# Monodevelop-using applications need this to be set or they will try to create config
# files in the user's ~ dir.
export XDG_CONFIG_HOME="${T}"
# Building mono, nant and many other dotnet packages is known to fail if LC_ALL
# variable is not set to C. To prevent this all mono related packages will be
# build with LC_ALL=C (see bugs #146424, #149817)
export LC_ALL=C
# @FUNCTION: emsbuild_raw
# @DESCRIPTION: run msbuild with given parameters
emsbuild_raw() {
elog """$@"""
msbuild "$@" || die
}
# @FUNCTION: emsbuild
# @DESCRIPTION: run msbuild with Release of Debug configuration depending on USE="debug"
emsbuild() {
if use debug; then
CARGS=/p:Configuration=Debug
else
CARGS=/p:Configuration=Release
fi
if use developer; then
SARGS=/p:DebugSymbols=True
else
SARGS=/p:DebugSymbols=False
fi
emsbuild_raw "${CARGS}" "${SARGS}" "$@"
}
|