# -*- 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           ruby 1.0

ruby.branches       3.3 3.2 3.1
ruby.setup          sdl2-bindings 0.2.3 gem {} rubygems
categories-append   devel
license             zlib
maintainers         nomaintainer
platforms           any
description         Ruby bindings for SDL2
long_description    {*}${description}
homepage            https://github.com/vaiorabbit/sdl2-bindings
checksums           rmd160  7f200cf447eb274e3dc594bf981b15705b3c4575 \
                    sha256  878c0755a4bea1aed0fa85c01596effd1c2b7d1878141ceec5bef808038bd309 \
                    size    50688
supported_archs     noarch

if {${name} ne ${subport}} {
    depends_run-append \
                    port:libsdl2 \
                    port:libsdl2_gfx \
                    port:libsdl2_image \
                    port:libsdl2_mixer \
                    port:libsdl2_ttf \
                    port:rb${ruby.suffix}-ffi

    post-destroot {
        system -W ${destroot}${ruby.gemdir}/specifications \
            "/usr/bin/patch -p0 < ${filespath}/patch-gemspec-${ruby.branch}.diff"
    }
}
