# -*- 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.0

cmake.out_of_source yes

# build architectures separately so that variable such as CMAKE_CXX_SIZEOF_DATA_PTR are set correctly
PortGroup muniversal 1.0

PortGroup           github 1.0
github.setup        liballeg allegro5 5.2.7.0
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            2

maintainers         nomaintainer
categories          devel games
license             Permissive
homepage            https://liballeg.org/

description         A game programming library for C/C++ developers.
long_description \
                    Allegro is a game programming library for \
                    C/C++ developers distributed freely, supporting \
                    many platforms.

checksums           rmd160  b43768ab070c4e369e805b2cdaf376f15ee03989 \
                    sha256  3be4ffaaabb7a0d27d0cc109704c374a089686f2297be84774282d00a0b84da2 \
                    size    7102101

depends_build-append \
                    port:libxslt \
                    port:pkgconfig \
                    path:lib/libxar.dylib:xar
depends_lib-append \
                    port:flac      \
                    port:freetype  \
                    port:libdumb   \
                    port:libogg    \
                    port:libpcap   \
                    port:libtheora \
                    port:libvorbis \
                    port:opusfile  \
                    port:physfs    \
                    port:webp      \
                    port:zlib

# prevents errors when upgrading (prevents new allegro5 from finding old allegro5)
configure.cppflags-replace  -I${prefix}/include -isystem${prefix}/include

livecheck.type  regex
livecheck.url   https://liballeg.org/download.html
# This livecheck tries to match the stable branch only
livecheck.regex (5\\.(?:\\d*\[02468\])(?:\\.\\d+)*)${extract.suffix}
