# -*- 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 20260327 v
revision            0
github.tarball_from archive
categories          ruby
license             MIT
platforms           any
supported_archs     noarch

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

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

checksums           rmd160  6789111fd5b18bdd119ea18d3eb973a7ef6370b3 \
                    sha256  33d48ec69ba998069f30939a2dfbe3ccdc52d4bc74f5709084e54fef95ccf510 \
                    size    99451

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