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 ruby27-2.7.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
====> Which line editing lib to use: you have to select exactly one of them
LIBEDIT=on: Use libedit
READLINE=off: Use libreadline
===> Use 'make config' to modify these settings
Some of the standard commands are provided as separate ports for ease
of upgrading:
devel/ruby-gems: gem - RubyGems package manager
devel/rubygem-irb: irb - Interactive Ruby
devel/rubygem-rake: rake - Ruby Make
devel/rubygem-rdoc: rdoc - Ruby Documentation System
sysutils/rubygem-bundler: bundler - Tool that manages gem dependencies for ruby applications
And some of the standard libraries are provided as separate ports
since they require extra dependencies:
databases/rubygem-dbm: DBM module
databases/rubygem-gdbm: GDBM module
Install them as occasion demands.
Reason:
The default ruby version has been updated from 2.7 to 3.0.
If you compile your own ports you may keep 2.7 as the default version by
adding the following lines to your /etc/make.conf file:
#
# Keep ruby 2.7 as default version
#
DEFAULT_VERSIONS+=ruby=2.7
If you wish to update to the new default version, you need to first stop any
software that uses ruby. Then, you will need to follow these steps, depending
upon how you manage your system.
If you use pkg, simply upgrade:
# pkg upgrade
If you do not use pkg, please use an adapted version of the below:
If you compile your own ports you may keep 2.4 as the default version by
adding the following lines to your /etc/make.conf file:
#
# Keep ruby 2.4 as default version
#
DEFAULT_VERSIONS+=ruby=2.4
If you wish to update to the new default version, you need to first stop any
software that uses ruby. Then, you will need to follow these steps, depending
upon how you manage your system.
If you use pkgng, simply upgrade:
# pkg upgrade
If you use portmaster, install new ruby, then rebuild all ports that depend
on ruby:
# portmaster -o lang/ruby25 lang/ruby24
# portmaster -R -r ruby-2.5
If you use portupgrade, install new ruby, then rebuild all ports that depend
on ruby:
# pkg delete -f ruby portupgrade
# make -C /usr/ports/ports-mgmt/portupgrade install clean
# pkg set -o lang/ruby24:lang/ruby25
# portupgrade -x ruby-2.5.\* -fr lang/ruby25
Port Moves
port moved to lang/ruby30 on 2023-04-13 REASON: Please migrate to newer versions. Ruby 2.7 will reach its EoL on April 12, 2023
port moved here from lang/ruby25 on 2021-04-06 REASON: Has expired: Use newer version, e.g. lang/ruby27 or above. Ruby 2.5 is in security maintenance phase and planned for EOL on March 31, 2021
Mk/**ruby.mk: Switch from USE_RUBY=yes to USES=ruby
Switch from Mk/bsd.ruby.mk to Mk/Uses/ruby.mk
Notable changes are.
- Mk/bsd.ruby.mk is moved to Mk/Uses/ruby.mk.
- USE_RUBY=yes is replaced with USES=ruby.
- USE_RUBY_EXTCONF is replaced with USES=ruby:extconf.
- USE_RUBY_RDOC is replaced with USES=ruby:rdoc.
- USE_RUBY_SETUP is replaces with USES=ruby:setup.
- RUBY_NO_BUILD_DEPENDS and RUBY_NO_RUN_DEPENDS are replaced with
USES=ruby:{build,none,run}.
- RUBY_REQUIRE isn't used anywhere, so removed.
- USES=gem now implies USES=ruby.
This is mainly the work of yasu@ at https://reviews.freebsd.org/D27863
I have just made some cosmetic changes and ran exp-run to test that the
tree is not in a BROKEN state.
Approved by: portmgr
Differential Revision: https://reviews.freebsd.org/D37925
lang/ruby27: Fix orphaned .timestamp in bdbe2a2f4098f4d21495f314cf4d571efdb4f08f
When both CAPIDOCS and DOCS options are enabled, the following commands are
executed:
1. post-install-CAPIDOCS-on: removed the installed .timestamp (in STAGEDIR).
2. post-install-DOCS-on: copied the generated .timestamp (in capi directory) to
the STAGEDIR again.
Therefore, the installed .timestamp is orphaned.
To fix this, we remove both the generated and installed .timestamp in
post-install-CAPIDOCS-on:.
PR: 267775
Reported by: yasu
lang/ruby27: Fix plist error when both CAPIDOCS and DOCS options are on.
When the both options are on, post-install-DOCS-on target is called
after post-install-CAPIDOCS-on has completed. And in the former files
under ${WRKSRC}/doc/ are copied to ${STAGEDIR}${RUBY_DOCDIR}. This
means files under ${WRKSRC}/doc/capi are copied to
${STAGEDIR}${RUBY_DOCDIR}/capi again. And of course
${WRKSRC}/doc/capi/.timestamp is included in them. As a result, even
though ${STAGEDIR}${RUBY_DOCDIR}/capi/.timestamp is removed in
post-install-CAPIDOCS-on target, it is detected as orphaned file at
check-plist phase. So fix it by adding 3rd argument to
${COPYTREE_SHARE} command so .timestamp is excluded from files to be
copied.
PR: 267775
Approved by: meta (ruby@)
Fixes: bdbe2a2f4098 lang/ruby27: Simplify CAPIDOCS handling
lang/ruby{27,30,31,32}: Improve qsort_r() detection.
This change merges the following upstream pull request into the Ruby
interpreter:
https://github.com/ruby/ruby/pull/6332
Adding this patch is no-op right now because we are not using POSIX (GNU)
qsort_r(3) interface yet. It will fix build when the change is applied.
Reviewed by: bapt (portmgr@), sunpoet (ruby@)
PR: ports/266227
MFH: 2022Q3
Differential Revision: https://reviews.freebsd.org/D36492
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
lang/ruby*: add a patch to keep amd64-freebsd* as arch
In preparation for the update of config.guess/config.sub, where
amd64-portbld-freebsd14.0 is reported as x86_64-portbld-freebsd14.0,
Add a patch to keep the arch specific directory on amd64 being named amd64
lang/ruby27: Mark DEPRECATED and set EXPIRATION_DATE
After 2.7.6 is released on April 12, 2022, Ruby 2.7 entered the
security only maintainance phase. It continues for a year and after
that Ruby 2.7 reaches its EoL. On the other hand default version of
Ruby has switched to 3.0. So mark this port as DEPRECATED and set
EXPIRATION_DATE to the date of EoL in order to encourage user to
migrate to newer version.
PR: 263451
Approved by: maintainer timeout
Mk/bsd.ruby.mk: Remove RUBY_NAME
Use ruby${RUBY_SUFFIX} or libruby${RUBY_SHLIBVER} directly.
It also fixes the inconsistency in lang/ruby{26,27,30}/{Makefile,pkg-plist}.
lang/ruby{26,27}: work around clang 12 -Wcompound-token-split-by-macro warning
During an exp-run for llvm 12 (see bug 255570), it turned out that
several ruby gem extensions do not build with clang 12.0.0, for example
devel/rubygem-thrift:
compiling binary_protocol_accelerated.c
binary_protocol_accelerated.c:404:68: error: '(' and '{' tokens introducing
statement expression appear in different macro expansion contexts
[-Werror,-Wcompound-token-split-by-macro]
VALUE thrift_binary_protocol_class = rb_const_get(thrift_module,
rb_intern("BinaryProtocol"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.7/ruby/ruby.h:1847:23: note: expanded from macro
'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
binary_protocol_accelerated.c:404:68: note: '{' token is here
VALUE thrift_binary_protocol_class = rb_const_get(thrift_module,
rb_intern("BinaryProtocol"));
(Only the first 15 lines of the commit message are shown above )
lang/ruby27: Fix improper substitution in PLIST
Doxygen 1.9.1 update (b8ac15afd00127044d75894e357f697d825ed385) brings improper
substitution in PLIST. %%RUBY_SUFFIX%% should not be used in the path/filename
of C API documentations.
devel/doxygen: update to 1.9.1 release
Also regen 'pkg-plist' for affected consumers, with PORTREVISION bump
Touch Mk/bsd.ruby.mk due to all ruby* is affected
MFH: 2021Q2
lang/ruby27: throw out irb, ri, rdoc from lang/ruby27
because they're provided as "default gem" since Ruby 2.6.
We provide "default gem"s as gem ports rather than a part of lang/ruby*
port. files/patch-tool_rbinstall.rb makes not to install such default gems
however hollow wrapper scripts bin/{irb,ri,rdoc} and their manpages were
still left.
This commit intend to move out such wrapper scripts and manpages to gem
ports completely.
PR: 243888
Submitted by: Yasuhiro KIMURA <yasu@utahime.org> (initial revision)
meta (myself)
Differential Revision: https://reviews.freebsd.org/D23514
lang/ruby27: throw out racc from lang/ruby27
because racc is provied as "default gem" since Ruby 2.7 [1].
We provide default gems as gem ports rather than a part of lang/ruby* port.
files/patch-tool_rbinstall.rb does that. bin/*racc* are leftover wrapper
script that the patch didn't remove default gem racc completely.
racc is provided by devel/rubygem-racc. To avoid conflict racc gem port vs
ruby port, throw it out completely from ruby port.
[1] https://ruby-trunk-changes.hatenablog.com/entry/ruby_trunk_changes_20190620
PR: 242359237833
Submitted by: Yasuhiro KIMURA <yasu@utahime.org> (based on)