# -*- 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
PortGroup       github 1.0

name            SDL3
github.setup    libsdl-org SDL 3.2.24 release-
categories      devel multimedia
platforms       {darwin >= 20}
license         zlib
maintainers     {jmr @jmroot}
description     Cross-platform multi-media development API
long_description \
    Simple DirectMedia Layer is a cross-platform development library \
    designed to provide low level access to audio, keyboard, mouse, \
    joystick, and graphics hardware. This port provides the latest \
    3.x release series.

homepage        https://www.libsdl.org/

github.tarball_from releases
distname        ${name}-${version}
checksums       rmd160 b5e0c71cb89cbe1d670342b6bfc11254c1f3111b \
                sha256 81cc0fc17e5bf2c1754eeca9af9c47a76789ac5efdd165b3b91cbbe4b90bfb76

cmake.out_of_source yes

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} BUGS.txt CREDITS.md \
        README.md WhatsNew.txt \
        {*}[glob ${worksrcpath}/docs/*.md] ${destroot}${docdir}
}
