# -*- 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 20260222 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  465669a5099f2cf1b98c60b110c9bc5322708b0b \
                    sha256  d9e300fc523d63ed13461279340c647c4cd0d5948362a27ffb95de7d1e29d271 \
                    size    99031

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.
}
