# -*- 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 20260121 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  56fedbc169fe6510b12a986337650b49adb0a037 \
                    sha256  18589f7cdff5f10db3ccdce2a05ef8fb2c07b29e17d275670754123a61555ee0 \
                    size    98512

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