aboutsummaryrefslogtreecommitdiff
blob: 0d88e88e151d67ff426070ed55b5b7b73d1bfdd5 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="5"

USE_DOTNET="net40"
NUGET_NO_DEPEND="1"

inherit nuget dotnet eutils

DESCRIPTION="FAKE - F# Make"
HOMEPAGE="https://nuget.org/packages/FAKE"
SRC_URI="https://github.com/fsharp/FAKE/archive/${NPV}.tar.gz"

LICENSE="MS-PL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="-nuget"

DEPEND="dev-lang/mono
	dev-lang/fsharp
	nuget? ( dev-dotnet/nuget )"

RDEPEND="${DEPEND}"

src_prepare() {
	addpredict /etc/mono/registry/last-btime #nowarn
}

src_unpack() {
	if use nuget ; then
		echo "using nuget"
		nuget_src_unpack
	else
		default;
		S=${WORKDIR}/FAKE-${NPV}
	fi
}

src_compile() {
	if use nuget ; then
		echo "installation is done via nuget"
	else
		#fake is searching for libraries in source folder
		ln -s tools/FAKE/tools/Newtonsoft.Json.dll "${S}"/Newtonsoft.Json.dll || die
		ln -s tools/FAKE/tools/NuGet.Core.dll "${S}"/NuGet.Core.dll || die
		ln -s tools/FAKE/tools/Fake.SQL.dll "${S}"/Fake.SQL.dll || die
		sh "${S}/build.sh" || die "build.sh failed"
	fi
}

src_install() {
	elog "Installing libraries"
	insinto /usr/lib/mono/FAKE/"${FRAMEWORK}"/
	if use nuget ; then
		doins FAKE."${NPV}"/tools/FAKE.exe
		doins FAKE."${NPV}"/tools/FakeLib.dll
		doins FAKE."${NPV}"/tools/UnionArgParser.dll
		nonfatal doins FAKE."${NPV}"/tools/Newtonsoft.Json.dll
		nonfatal doins FAKE."${NPV}"/tools/Fake.SQL.dll
		nonfatal doins FAKE."${NPV}"/tools/NuGet.Core.dll
	else
		doins build/FAKE.exe
		doins build/FakeLib.dll
		doins build/UnionArgParser.dll
		nonfatal doins tools/FAKE/tools/Newtonsoft.Json.dll
		nonfatal doins tools/FAKE/tools/Fake.SQL.dll
		nonfatal doins tools/FAKE/tools/NuGet.Core.dll
	fi
	make_wrapper fake "mono /usr/lib/mono/FAKE/${FRAMEWORK}/FAKE.exe"
}