# -*- 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          topinambour 2.0.6 gem {} rubygems
categories-append   sysutils
license             GPL-3
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
description         VTE terminal based on the ruby Gtk3 bindings
long_description    {*}${description}
homepage            https://github.com/cedlemo/topinambour
checksums           rmd160  a04e232a46d3a212b1c39119a576e9684299a7ff \
                    sha256  579b4a9589b2612b3d11fe01e0fabc644f6ad1e8dbba7a493a7933060bd89039 \
                    size    40448

if {${name} ne ${subport}} {
    depends_run-append \
                    port:rb${ruby.suffix}-gdk3 \
                    port:rb${ruby.suffix}-vte3

    # https://github.com/cedlemo/topinambour/issues/25
    post-destroot {
        system -W ${destroot}${ruby.gemdir}/specifications \
            "/usr/bin/patch -p0 < ${filespath}/patch-gemspec-${ruby.branch}.diff"
    }
}
