# -*- 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 http://www.ruby-lang.org/
# fix #54866: correct install_name of libruby by deleting TEENY
# $ otool -D /opt/local/lib/libruby.2.4.3.dylib
# /opt/local/lib/libruby.2.4.3.dylib:
# /opt/local/lib/libruby.2.4.dylib
patchfiles patch-configure.diff
checksums md5 d994274eaa95b82aa5d31ec2188253c6 \
rmd160 38aacd0ef60f4927318bb06cc997304681638c1e \
sha1 1cc548ba3eb821e29ab92ac13e1d5c7bf23b1526 \
sha256 45a8de577471b90dc4838c5ef26aeb253a56002896189055a44dc680644243f1
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}/ruby24
configure.args --enable-shared \
--enable-install-static-library \
--mandir="${prefix}/share/man" \
--with-opt-dir="${prefix}" \
--with-rubylibprefix="${prefix}/lib/ruby2.4"
configure.args-append --disable-dtrace
# Add the architecture flag as required
if {[info exists build_arch] && ${build_arch} != ""} {
configure.args-append "--with-arch=${build_arch}"
foreach type {site vendor} {
set libdir ${destroot}${prefix}/lib/ruby2.4/${type}_ruby/2.4.0
xinstall -m 0755 -d ${libdir}
foreach subdir [exec find ${libdir} -type d -empty] {
destroot.keepdirs-append ${subdir}
# workaround to fix #54866 for versions 2.4.0..2.4.2
# generate past versions of libruby as symlink
# - libruby.2.4.[012].dylib -> libruby.2.4.x.dylib
# libruby of 2.4.3 or later has corrected install_name "libruby.2.4.dylib"
# from patch-configure.diff