# -*- 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.22 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 d177f0f6fcb2056ebf68d6ce270388e223c61041 \
                sha256 f29d00cbcee273c0a54f3f32f86bf5c595e8823a96b1d92a145aac40571ebfcc

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