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

github.setup        realnc qtads 2.1.7
revision            0
categories          games
license             GPL-3+
maintainers         nomaintainer

description         A multimedia TADS interactive fiction player
long_description    QTads is a so called \"interpreter\" for games created with the Text \
                    Adventure Development System, or \"TADS\" for short, a C-like object \
                    oriented programming language for authoring Interactive Fiction \
                    (similar to the Infocom or Legend Entertainment games, like \"Zork\").

homepage            https://realnc.github.io/qtads

checksums           rmd160  aebb030a1eea175907c55df42405ab2b4d729f5b \
                    sha256  7477bb3cb1f74dcf7995a25579be8322c13f64fb02b7a6e3b2b95a36276ef231 \
                    size    2562026
github.tarball_from releases

use_bzip2           yes

# QTads does not use or link to OpenSSL directly. It merely uses Qt, for which OpenSSL is
# optional and can be toggled off through a variant.
license_noconflict  openssl

# vmtz.cpp:1987:30: error: ordered comparison of pointer with integer zero ('vmtz_trans*' and 'int')
patchfiles          patch-vmtz.cpp.diff

# The build uses a wrong name for a library, fix that.
patchfiles-append   patch-fix-linking.diff

depends_lib-append  port:fluidsynth \
                    port:libsdl2 \
                    port:libsdl2_mixer \
                    port:libsdl2_sound \
                    port:libsndfile \
                    port:libvorbis \
                    port:mpg123

compiler.c_standard     2011
compiler.cxx_standard   2011

# tct3stm.cpp:318:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
configure.cxxflags-append \
                    -fpermissive

destroot {
    move ${worksrcpath}/QTads.app ${destroot}${applications_dir}
}
