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

github.setup        rbenv ruby-build 20260311 v
revision            0
github.tarball_from archive
categories          ruby
license             MIT
platforms           any
supported_archs     noarch

maintainers         {mojca @mojca} \
                    {macports.halostatue.ca:austin @halostatue} \
                    openmaintainer

description         Compile and install Ruby
long_description    {*}${description}

checksums           rmd160  6d5aa669213a17681867adb61f1fb0d8403fee9a \
                    sha256  8bc285dc84ca51d0617bf19e089cfa3d794f551477250cbe0d7858ed70e7a6ee \
                    size    99215

use_configure       no
build {}
destroot.cmd        ./install.sh
destroot.env        PREFIX=${destroot}${prefix}
patchfiles          patch-ruby-build-no-homebrew.diff

depends_run-append  port:pkgconfig \
                    port:gmp \
                    port:libffi \
                    port:libyaml \
                    port:openssl \
                    port:readline

notes {
  This port patches ruby-build to ignore Homebrew formulae when looking for library
  dependencies.

  If you wish to build with YJIT, you must have Rust 1.58 or later installed.
}
