summaryrefslogtreecommitdiff
blob: e1dc3d6dcd951334387016290fc5417edf2ac839 (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DOTNET_COMPAT=6.0

inherit edo multiprocessing

DESCRIPTION="SMT-based program verifier"
HOMEPAGE="https://github.com/boogie-org/boogie/"
SRC_URI="
	https://github.com/boogie-org/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
	https://dev.gentoo.org/~xgqt/distfiles/deps/${P}-deps.tar.xz
"
S="${S}"/Source

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug"

BDEPEND="
	dev-libs/icu
	virtual/dotnet-sdk:${DOTNET_COMPAT}
"
RDEPEND="
	${BDEPEND}
	sci-mathematics/z3
"

# Generated by dotnet.
QA_PREBUILT="/usr/share/boogie/BoogieDriver"

src_prepare() {
	export DOTNET_CLI_TELEMETRY_OPTOUT=1
	export DOTNET_NOLOGO=1
	export DOTNET_CONFIGURATION=$(usex debug Debug Release)
	export DOTNET_OUTPUT="${WORKDIR}"/${P}_net${DOTNET_COMPAT}_${DOTNET_CONFIGURATION}/${PN}
	export NUGET_PACKAGES="${S}"/nuget_packages

	default
}

src_configure() {
	edob dotnet restore -p:TargetFramework=net${DOTNET_COMPAT}
}

src_compile() {
	local myopts=(
		--configuration ${DOTNET_CONFIGURATION}
		--no-restore
		--no-self-contained
		--nologo
		--output "${DOTNET_OUTPUT}"
		-consoleLoggerParameters:ErrorsOnly
		-maxCpuCount:$(makeopts_jobs)
	)
	edob dotnet build ${myopts[@]}
}

src_install() {
	mkdir -p "${ED}"/usr/share/ || die
	cp -r "${DOTNET_OUTPUT}" "${ED}"/usr/share/ || die
	dosym -r /usr/share/${PN}/BoogieDriver /usr/bin/boogie
}