# -*- 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           cmake         1.1
PortGroup           github        1.0
PortGroup           legacysupport 1.1

github.setup        CorsixTH CorsixTH 0.70.1 v
github.tarball_from archive
name                corsixth
revision            0

description         Open source clone of Theme Hospital

long_description    \
    A reimplementation of the 1997 Bullfrog business sim Theme Hospital. As \
    well as faithfully recreating the original, CorsixTH adds support for \
    modern operating systems, high resolutions and much more.

categories          games
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  523a7aa0f9f3b5ff25f6a0274d2f749a1bc5a889 \
                    sha256  b3a37b09f168f30600d305314f5a823d3af10bf407074e9a837e0e85acfe9ba3 \
                    size    4416633

legacysupport.use_mp_libcxx \
                    yes
# std::filesystem
legacysupport.newest_darwin_requires_legacy \
                    18

compiler.cxx_standard \
                    2017

patchfiles-append   patch-cmakelists.txt.diff

cmake.install_prefix \
                    ${applications_dir}

depends_lib-append  \
                    path:lib/freetype.dylib:freetype \
                    path:lib/libiconv.2.dylib:libiconv \
                    path:lib/libavcodec.dylib:ffmpeg \
                    port:bzip2 \
                    port:libsdl2 \
                    port:libsdl2_mixer \
                    port:lua54 \
                    port:lua54-luafilesystem \
                    port:lua54-lpeg \
                    port:rtmidi \
                    port:zlib

notes "
    CorixTH is now available in your Applications/MacPorts directory (${applications_dir})

    You will also need a copy of the game data from the original Theme Hospital game.
"

github.livecheck.regex \
                    {([0-9.]+)}
