# -*- 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                bzflag
version             2.0.16
revision            3
categories          games
platforms           darwin
maintainers         nomaintainer
license             LGPL-2.1

description         3D tank game, multiplayer and internet gaming available
long_description    BZFlag is a free multiplayer multiplatform 3D tank \
                    battle game. The name stands for Battle Zone capture Flag.

homepage            http://bzflag.org
master_sites        http://ftp.bzflag.org/bzflag/ \
                    sourceforge:project/bzflag/bzflag%20source/${version}/
use_bzip2           yes

checksums           md5     161b973bee586d43ebff4695dfb8c359 \
                    sha1    08e3a839fb0e4919c9244dd886c5059c076e1349 \
                    rmd160  9156642183b9b33c6509737cd8e40f4ad612a657

depends_lib         port:curl \
                    port:libsdl \
                    port:c-ares

patchfiles          patch-configure

configure.args      --mandir=${prefix}/share/man \
                    --libdir=${prefix}/lib/${name} \
                    --includedir=${prefix}/include/${name} \
                    --with-sdl-exec-prefix=${prefix} \
                    --disable-sdltest \
                    --disable-ccachetest \
                    --without-x

if {${os.platform} eq "darwin" && ${os.major} >= 10} {
    patchfiles-append patch-include__bzfSDL.h patch-src__platform__SDLDisplay.cxx
}

app.name            BZFlag
app.icon            data/bzflag-256x256.png

livecheck.type      sourceforge
livecheck.regex     bzflag-(\\d+(?:\\.\\d+)*)\\.tar\\.bz2