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

name            SDL3_net
github.setup    libsdl-org SDL_net 3.2.0 release-
revision        0
categories      devel net
license         zlib
maintainers     {jmr @jmroot} openmaintainer
description     cross-platform networking library for SDL

long_description \
    This is a portable network library for use with SDL. Its goal is \
    to simplify the use of the usual socket interfaces and use SDL to \
    handle common portable functionality such as threading and \
    reporting errors.

distname        ${name}-${version}
github.tarball_from releases
checksums       rmd160  eb0a48f2d23c9b45ad115ded23411eb8b5b785ac \
                sha256  098522fc26d4e302ef9348aee6e76e67fe504dfefd7f596236568f8330570c41 \
                size    1497570

depends_build-append \
                path:bin/pkg-config:pkgconfig
depends_lib     port:SDL3

configure.args-append   -DSDLNET_INSTALL_MAN=ON \
                        -DSDLNET_SAMPLES_INSTALL=OFF

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} README.md \
        ${destroot}${prefix}/share/doc/${name}
}
