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, and extensible.
Features of Ruby are shown below.
+ Simple Syntax
+ *Normal* Object-Oriented features(ex. class, method calls)
+ *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method)
+ Operator Overloading
+ Exception Handling
+ Iterators and Closures
+ Garbage Collection
+ Dynamic Loading of Object files(on some architecture)
+ Highly Portable(works on many UNIX machines, and on DOS,
Windows, Mac, BeOS etc.)
===> The following configuration options are available for ruby40-4.0.7,1:
CAPIDOCS=off: Build and install C API documents
DEBUG=off: Build with debugging support
DOCS=on: Build and/or install documentation
EXAMPLES=on: Build and/or install examples
GMP=off: Use GMP to accelerate Bignum operations
RDOC=on: Build and install Rdoc indexes
YJIT=off: Enable YJIT (Yet Another Ruby JIT)
===> Use 'make config' to modify these settings
Some of the standard commands and libraries are provided as separate
ports for ease of upgrading:
benchmarks/rubygem-benchmark: benchmark - Performance benchmarking library
converters/rubygem-base64: base64 - Encode and decode binary data using a Base64 representation
devel/ruby-gems: gem - RubyGems package manager
devel/rubygem-csv: csv - Interface to CSV files and data
devel/rubygem-debug: debug - Debugging functionality for Ruby
devel/rubygem-drb: drb - Distributed object system for Ruby
devel/rubygem-erb: erb - Templating system for Ruby
devel/rubygem-fiddle: fiddle - libffi wrapper for Ruby
devel/rubygem-getoptlong: getoptlong -GetoptLong for Ruby
devel/rubygem-irb: irb - Interactive Ruby
devel/rubygem-logger: logger - Simple logging utility for outputting messages
devel/rubygem-minitest: minitest - Complete suite of testing facilities
devel/rubygem-mutex_m: mutex_m - Mixin to extend objects to be handled like a Mutex
devel/rubygem-observer: observer - Implementation of the Observer object-oriented design pattern
devel/rubygem-ostruct: ostruct - Class to build custom data structures, similar to a Hash
devel/rubygem-power_assert: power_assert - Power Assert for Ruby
devel/rubygem-pstore: pstore - Transactional File Storage for Ruby Objects
devel/rubygem-racc: racc - LALR(1) parser generator for Ruby
devel/rubygem-rake: rake - Ruby Make
devel/rubygem-rbs: rbs - Language for type signatures for Ruby and standard library definitions
devel/rubygem-rdoc: rdoc - Ruby Documentation System
devel/rubygem-readline: readline - Loader for readline
devel/rubygem-reline: reline - Alternative GNU Readline or Editline implementation by pure Ruby
devel/rubygem-repl_type_completor: repl_type_completor - Type based completion for REPL
devel/rubygem-rinda: rinda - Linda distributed computing paradigm in Ruby
devel/rubygem-syslog: syslog - Ruby interface for the POSIX system logging facility
devel/rubygem-test-unit: test-unit - Unit testing framework for Ruby
devel/rubygem-typeprof: typeprof - Type analysis tool for Ruby code
dns/rubygem-resolv-replace: resolv-replace - Replace Socket DNS with Resolv
ftp/rubygem-net-ftp: net-ftp - Support for the File Transfer Protocol
mail/rubygem-net-imap: net-imap - Ruby client api for Internet Message Access Protocol
mail/rubygem-net-pop: net-pop - Ruby client library for POP3
mail/rubygem-net-smtp: net-smtp - Simple Mail Transfer Protocol client library for Ruby
math/rubygem-bigdecimal: bigdecimal - Arbitrary-precision decimal floating-point number class
math/rubygem-matrix: matrix - Implementation of Matrix and Vector classes
math/rubygem-prime: prime - Prime numbers and factorization library
net/rubygem-nkf: nkf - Ruby extension for Network Kanji Filter
sysutils/rubygem-bundler: bundler - Tool that manages gem dependencies for ruby applications
textproc/rubygem-abbrev: abbrev - Calculate a set of unique abbreviations for a given set of strings
textproc/rubygem-rexml: rexml - XML toolkit for Ruby
www/rubygem-rss: rss - Family of libraries that support various formats of XML "feeds"
Install them as occasion demands.
lang/ruby*: fix coroutines on armv7
Two ports, devel/rubygem-glib2 and graphics/rubygem-cairo, have been
broken on armv7 for a long time. Recently, pkubaj fixed a problem with
Ruby's coroutine code on ppc64* (see 3bb0a9335) affecting the very same
ports. This naturally raises the question if the armv7 problems are
related.
Turns out that due to an oversight, we use the generic ucontext.h-based
coroutine code on armv7. Switching to the assembly-based code fixes
the ports! Further digging suggests that there may be a problem in the
freebsd32 support for these calls on aarch64 causing the observed
issues. We will investigate those separately.
Tested by: fuz
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
lang/ruby*: fix runtime on powerpc64*
The hand-written `coroutine_transfer` in `coroutine/ppc64le/Context.S`
lacks the ELFv2 ABI global entry prologue. When the function is reached
via the PLT (lazy resolution path), r2 (TOC pointer) is left pointing
at whatever the resolver had loaded — typically the dynamic linker's
own TOC — instead of libruby's TOC.
The wrong r2 propagates through the fiber switch into `fiber_entry`,
which jumps into `fiber_restore_thread` → `rb_current_ec_set`. The
first PLT thunk inside the new fiber (`__plt___tls_get_addr` for the
`ruby_current_ec` thread-local) computes its GOT entry as
`r2 + offset` and segfaults dereferencing the bogus address.
Fixes build of textproc/rubygem-nokogiri and devel/rubygem-glib2.
Mk/Uses/ruby.mk: Remove RUBY_PORTREVISION
RUBY_PORTREVISION is only used for lang/ruby{32,33,34,40}. These ports can set
PORTREVISION directly rather than defined in the shared Mk/Uses/ruby.mk.