dev-lang/dafny: style fixes; separate ebuild phases

Signed-off-by: Maciej Barć <xgqt@riseup.net>
This commit is contained in:
Maciej Barć 2021-10-26 09:23:26 +02:00
parent 69a8b07914
commit cadef1c88d
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A
1 changed files with 19 additions and 10 deletions

View File

@ -3,7 +3,7 @@
EAPI=8 EAPI=8
DOTNET="5.0" DOTNET_FRAMEWORK="5.0"
DESCRIPTION="Verification-aware programming language" DESCRIPTION="Verification-aware programming language"
HOMEPAGE="https://dafny-lang.github.io/dafny/" HOMEPAGE="https://dafny-lang.github.io/dafny/"
@ -22,13 +22,12 @@ LICENSE="MIT"
SLOT="0" SLOT="0"
IUSE="debug" IUSE="debug"
# TODO: add dev-java/gradle when available
BDEPEND=" BDEPEND="
dev-java/gradle-bin || ( dev-java/gradle-bin dev-java/gradle )
" "
DEPEND=" DEPEND="
>=virtual/jdk-1.8.0:* >=virtual/jdk-1.8.0:*
virtual/dotnet-sdk:${DOTNET} virtual/dotnet-sdk:${DOTNET_FRAMEWORK}
" "
RDEPEND=" RDEPEND="
${DEPEND} ${DEPEND}
@ -43,21 +42,31 @@ DAFNY_EXES="
QA_PREBUILT="${DAFNY_EXES}" QA_PREBUILT="${DAFNY_EXES}"
src_compile() { src_prepare() {
local configuration
if use debug; then if use debug; then
configuration="Debug" DOTNET_CONFIGURATION="Debug"
else else
configuration="Release" DOTNET_CONFIGURATION="Release"
fi fi
export DOTNET_CONFIGURATION
einfo "DOTNET_CONFIGURATION=${DOTNET_CONFIGURATION}"
dotnet build --configuration "${configuration}" ./Source/Dafny.sln || default
}
src_configure() {
dotnet restore --no-cache ./Source/Dafny.sln ||
die "dotnet restore filed"
}
src_compile() {
dotnet build --configuration "${DOTNET_CONFIGURATION}" ./Source/Dafny.sln ||
die "dotnet build failed" die "dotnet build failed"
} }
src_install() { src_install() {
insinto /usr/share/${PN} insinto /usr/share/${PN}
doins -r ./Binaries/net${DOTNET}/* doins -r ./Binaries/net${DOTNET_FRAMEWORK}/*
local exe local exe
for exe in ${DAFNY_EXES}; do for exe in ${DAFNY_EXES}; do