Fetching contributors…
Cannot retrieve contributors at this time
119 lines (96 sloc) 4.01 KB
# -*- 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 select 1.0
name ruby21
version 2.1.9
revision 3
categories lang ruby
maintainers {kimuraw @kimuraw} openmaintainer
platforms darwin
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.
license {Ruby BSD}
master_sites ruby:2.1
use_bzip2 yes
distname ruby-${version}
checksums md5 62bd1cbfcbc22e4d137462bce992f6d1 \
rmd160 ba54bd691e5ac9c5f1379b8687894735b1afe18b \
sha1 39524185b580a3390a3b5019819c8b28d3249766 \
sha256 4f21376aa11e09b499c3254bbd839e68e053c0d18e28d61c428a32347269036e
use_parallel_build no
depends_lib port:readline \
path:lib/libssl.dylib:openssl \
port:zlib \
port:libyaml \
port:libffi \
depends_run port:ruby_select
depends_build port:pkgconfig
depends_skip_archcheck pkgconfig ruby
select.file ${filespath}/ruby21
configure.args --enable-shared \
--disable-install-doc \
--mandir="${prefix}/share/man" \
--enable-pthread \
--without-tk \
--without-gmp \
--with-opt-dir="${prefix}" \
--program-suffix=2.1 \
# Ignore minor version for archdir, like i686-darwin9.
# Port "ruby" and "ruby19" does the same.
configure.env-append UNAME_RELEASE=${os.major}
# Add the architecture flag as required
if {[info exists build_arch] && ${build_arch} != ""} {
configure.args-append "--with-arch=${build_arch}"
post-destroot {
foreach type {site vendor} {
set libdir ${destroot}${prefix}/lib/ruby2.1/${type}_ruby/2.1.0
xinstall -m 0755 -d ${libdir}
foreach subdir [exec find ${libdir} -type d -empty] {
destroot.keepdirs-append ${subdir}
# install destination of commands from port:rb21-*
xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby2.1
destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby2.1
variant doc description "Install rdoc indexes and C API documents" {
configure.args-delete --disable-install-doc
# note: ruby/tk does not support tk-8.6.
#variant tk conflicts mactk description "Build using MacPorts Tk" {
# configure.args-delete --without-tk
# configure.args-append --with-tk --disable-tcltk-framework
# depends_lib-append port:tcl \
# port:tk
variant mactk description "Build using Mac OS X Tk Framework" {
configure.args-delete --without-tk
configure.args-append --enable-tcltk-framework
variant gmp description "use gmp" {
configure.args-delete --without-gmp
depends_lib-append port:gmp
variant universal {
# use ruby built-in universal mechanism.
configure.args-append --with-arch=[join ${universal_archs} ,]
# clear macports' universal flags
variant relative description "Enable relative loading of libraries to allow for relocation of binaries." {
#enable relative loading
configure.args-append --enable-load-relative