# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
maintainers {kimuraw @kimuraw} openmaintainer
description Powerful and clean object-oriented scripting language
long_description Ruby is the interpreted scripting language for quick \
and easy object-oriented programming. It has many \
features to process text files and to do system \
management tasks (as in Perl). It is simple, \
straight-forward, extensible, and portable.
homepage https://www.ruby-lang.org/
checksums md5 d1b89c88effb71d75cd7ef77c35e1985 \
rmd160 a20e84f1630c0b0b0e7e99b61552d180c6d1cea5 \
sha1 d959802f994594f3296362883b5ce7edf5e6e465 \
sha256 97ddf1b922f83c1f5c50e75bf54e27bba768d75fea7cda903b886c6745e60f0a
depends_lib port:readline \
path:lib/libssl.dylib:openssl \
depends_run port:ruby_select
depends_build port:pkgconfig
depends_skip_archcheck pkgconfig
select.file ${filespath}/ruby26
configure.args --enable-shared \
--enable-install-static-library \
--mandir="${prefix}/share/man" \
--with-opt-dir="${prefix}" \
--with-rubylibprefix="${prefix}/lib/ruby2.6"
# Add the architecture flag as required
if {[info exists build_arch] && ${build_arch} != ""} {
configure.args-append "--with-arch=${build_arch}"
# (see rb-bundler) sh "gem build ..." -> sh "gem2.6 build ..."
reinplace -E "s/(gem) (build|install|push)/gem2.6 \\2/g" \
${worksrcpath}/lib/bundler/gem_helper.rb
foreach type {site vendor} {
set libdir ${destroot}${prefix}/lib/ruby2.6/${type}_ruby/2.6.0
xinstall -m 0755 -d ${libdir}
foreach subdir [exec find ${libdir} -type d -empty] {
destroot.keepdirs-append ${subdir}
# install destination of commands from port:rb26-*
xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby2.6
destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby2.6
variant doc description "Install rdoc indexes and C API documents" {
configure.args-delete --disable-install-doc
variant gmp description "use gmp" {
configure.args-delete --without-gmp
depends_lib-append port:gmp