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

github.setup        raceintospace raceintospace d004825458d9892fb168a9fbe026a9a38d397b04
version             1.1-20200802
revision            4
checksums           rmd160  74767ef94b588f672c6c7eb4c0e78f4d46a2ea65 \
                    sha256  826fd4ec937aceb42f2942f6645661657fadd68f791d6f99de0d47789bd1b763 \
                    size    63707066

categories          games
platforms           darwin
maintainers         {ryandesign @ryandesign} openmaintainer
license             GPL-2

description         Open Source version of old MS-DOS game Buzz Aldrin's Race Into Space
long_description    {*}${description}

homepage            http://www.raceintospace.org
github.tarball_from archive

boost.version       1.71
boost.depends_type  build

depends_lib-append  port:jsoncpp \
                    port:libogg \
                    port:libpng \
                    port:libsdl \
                    port:libtheora \
                    port:libvorbis \
                    port:physfs \
                    port:protobuf3-cpp \
                    port:zlib

# jsoncpp requires C++11
compiler.cxx_standard 2011
configure.cxxflags-append -std=c++11

# error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
compiler.blacklist-append \
                    {clang < 900}

patchfiles          no-build-dependencies.patch \
                    no-homebrew.patch \
                    no-game_test.patch

configure.args      -DBUILD_BOOST=OFF \
                    -DBUILD_JSONCPP=OFF \
                    -DBUILD_LIBPNG=OFF \
                    -DBUILD_PHYSFS=OFF \
                    -DBUILD_PROTOBUF=OFF \
                    -DBUILD_SDL=OFF \
                    -DBUILD_XIPH=OFF \
                    -DBUILD_ZLIB=OFF

destroot {
    copy "${build.dir}/Race Into Space.app" ${destroot}${applications_dir}
}
