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

name                        Drizzle
version                     32
revision                    0
checksums                   rmd160  9389348a2c9205b353a6f67d84584309651ae8cb \
                            sha256  1fb88a8faf9887ed3f02b7aac7b26fef9fb966be7b3618b0c7c12bd7152b666a \
                            size    4920430

categories                  devel
platforms                   {darwin any}
maintainers                 {ryandesign @ryandesign}
license                     GPL-3+
supported_archs             noarch

description                 tools related to the Myst game franchise

long_description            ${name} is a collection of {*}${description}. \
                            Most notably, it can transform MOUL / Myst 5 / \
                            Crowthistle datafiles into POTS datafiles. \
                            It also allows you to download and install all \
                            the fan-created ages.

homepage                    http://myst.dustbird.net/wiki/Drizzle
master_sites                sourceforge:drizzle
distname                    ${name}${version}
extract.suffix              .jar
extract.only
extract.mkdir               yes

post-extract {
    copy ${distpath}/${distfiles} ${worksrcpath}
    copy ${filespath}/drizzle.in ${worksrcpath}/drizzle
    copy ${filespath}/drizzleapp.in ${worksrcpath}/drizzleapp
}

use_configure               no

build {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/drizzle ${worksrcpath}/drizzleapp
}

destroot {
    set javadir ${destroot}${prefix}/share/java/
    xinstall -d ${javadir}
    xinstall ${worksrcpath}/${distfiles} ${javadir}drizzle.jar
    
    xinstall ${worksrcpath}/drizzle ${destroot}${prefix}/bin/
}

app.executable              ${worksrcpath}/drizzleapp
app.identifier              net.dustbird.myst.Drizzle

livecheck.type              regex
livecheck.url               http://sourceforge.net/projects/drizzle/files/
livecheck.regex             /${name}(\[0-9.\]+)${extract.suffix}
