# -*- 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.4.12 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 6a4e04627c9b69b61570b8ea99c50de9977b2c34 \
                sha256 f07b958a9ac5020fb7a44cadb957f658b2149c3c8abb4f63145fac9303249db7

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}
}
