# -*- 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 20251225 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  3ee1c155ab56c6bb6394411c25a1a469286ca686 \
                    sha256  4b55ddd2847398164650b435f1c56cd35873723cc1a1b7d4d42f304607b51cd7 \
                    size    97481

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