# -*- 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.10.1
github.tarball_from releases
use_7z              yes
distname            allegro-${github.version}
worksrcdir          allegro
revision            0

maintainers         {gmail.com:awkravchuk @lockie} openmaintainer
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  f86eaf0b6ab9b1b7da7596ced1f6dd3aaadfc268 \
                    sha256  dfb85131d0de682399099907d46e9c3971b2769330fef99207fc553ba4313125 \
                    size    8502343

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}
