PortSystem          1.0
PortGroup           python 1.0

name                py-SDL2
version             0.9.17
categories-append   devel multimedia
license             public-domain
platforms           {darwin any}
supported_archs     noarch
maintainers         {jmr @jmroot} openmaintainer
description         a python wrapper around the SDL2 library
long_description \
   PySDL2 is a wrapper around the SDL2 library and as such similar to the \
   discontinued PySDL project. In contrast to PySDL, it has no licensing \
   restrictions, nor does it rely on C code, but uses ctypes instead.

python.rootname     pysdl2
homepage            https://pypi.org/project/${python.rootname}

checksums           md5 8dd193d3b01d949b256b5bb95c277dc6 \
                    rmd160 f8633c634c6b0fc1de6e3a5d9d991e034eca621d \
                    sha256 48c6ef01a4eb123db5f7e46e1a1b565675755b07e615f3fe20a623c94735b52b

python.versions     310 311 312 313 314

if {$subport ne $name} {
    depends_lib-append  port:libsdl2 \
                        port:libsdl2_image \
                        port:libsdl2_mixer \
                        port:libsdl2_ttf

    patchfiles          dll.py.patch
    post-patch {
        reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/sdl2/dll.py
    }
}
