# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem              1.0
PortGroup               github 1.0
PortGroup               java 1.0

github.setup            buchen portfolio 0.50.3
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball
name                    portfolio-performance
categories              finance
license                 EPL-1
maintainers             nomaintainer
description             A simple tool to calculate the overall performance \
                        of an investment portfolio.
long_description        An open source tool to calculate the overall performance \
                        of an investment portfolio - across all accounts - using \
                        True-Time Weighted Return or Internal Rate of Return.
homepage                https://www.portfolio-performance.info/en/

checksums               rmd160  2b6485f607493ffff233dedbc7f68191d442a10c \
                        sha256  f4d8d348e28b4e8f337ddb282f0f7cbce92fbe4190bdfec5fcc4ca92a83833a4 \
                        size    3238967

supported_archs         x86_64
java.version            11
java.fallback           openjdk11
depends_build-append    port:maven3
use_configure           no

# Remove auto-update feature and the corresponding dialog
patchfiles              patch-disable-autoupdate-pref.diff \
                        patch-remove-autoupdate-dialog.diff

set maven_local_repository ${worksrcpath}/.m2/repository
pre-build {
    file mkdir ${maven_local_repository}
}

build.cmd               mvn3
build.pre_args          clean verify -f portfolio-app -Ppackage-distro \
                        -Dmaven.repo.local=${maven_local_repository} \
                        -DskipTests

destroot {
    copy -- ${worksrcpath}/portfolio-product/target/products/name.abuchen.portfolio.product/macosx/cocoa/x86_64/PortfolioPerformance.app \
    ${destroot}${applications_dir}
}
