# -*- 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       java 1.0

java.version    1.8
java.fallback   openjdk8

name            gloomhaven-helper
version         8.4.8
categories      games
platforms       macosx
license         Restrictive
maintainers     {eborisch @eborisch}

description     Helper application for Gloomhaven board game.
long_description Gloomhaven Helper is the officially licensed companion \
                application for playing the Gloomhaven board game and \
                Forgotten Circles expansion, without losing the board game \
                feel. It tracks initiative, monsters, and characters so you \
                can focus on playing the game rather than bookkeeping. \
                Playing the game becomes faster, as does setup and tear \
                down.

homepage        http://esotericsoftware.com/gloomhaven-helper#Desktop
master_sites    http://esotericsoftware.com/files/ghh/
distname        GloomhavenHelper-${version}
use_zip         yes

checksums \
    rmd160  a76045ab2a0059258db9d7ce6e6ff15588d6eed3 \
    sha256  b35bf9d5ac7acea2437bb1cafb6516ce9d4988fc8f06077cd0323bd3e666ab21 \
    size    32660698

use_configure   no

build {
    reinplace "s^java^cd ${prefix}/libexec/${name} ; ${java.home}/bin/java^g" run.sh
}

destroot {
    xinstall -d ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/libexec/${name}
    xinstall ${worksrcpath}/ghh.jar ${destroot}${prefix}/libexec/${name}/
    xinstall ${worksrcpath}/run.sh ${destroot}${prefix}/bin/${name}
}

livecheck.type  regex
livecheck.regex {Gloomhavenhelper-([\d.]+)\.zip}
