Here's a small diff to make ruby 2.0 the default ruby in ruby.port.mk.
ruby 2.0 was imported over 6 months ago, it's fairly stable now, most
new ruby applications are going to target 2.0, and it's a good time in
the release cycle to make this change.
Fallout from this change is minimal:
* ruby-rcov: Doesn't run on ruby 2.0, just 1.8 and 1.9. It actually
doesn't run well on ruby 1.9, so make the default FLAVOR ruby18, but
allow ruby19.
* ruby-passenger: Doesn't run on ruby 2.0, just 1.8 and 1.9, so make
the default FLAVOR ruby19, but allow ruby18.
* ruby-bdb: Doesn't build on ruby 2.0 by default, so add a small
patch for it to allow it to build.
Tested on amd64 running a bulk of the ruby ports. OKs? I'll update
ruby-module(5) to reflect these changes after committing.
Thanks,
Jeremy
Index: lang/ruby/ruby.port.mk
===================================================================
RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v
retrieving revision 1.66
diff -u -p -r1.66 ruby.port.mk
--- lang/ruby/ruby.port.mk 18 Aug 2013 21:05:20 -0000 1.66
+++ lang/ruby/ruby.port.mk 3 Oct 2013 19:37:50 -0000
@@ -49,9 +49,9 @@ FULLPKGNAME?= ${MODRUBY_PKG_PREFIX}-${P
SUBST_VARS+= GEM_BIN_SUFFIX GEM_MAN_SUFFIX
FLAVOR?=
-# Without a FLAVOR, assume the use of ruby 1.9.
+# Without a FLAVOR, assume the use of ruby 2.0.
. if empty(FLAVOR)
-FLAVOR = ruby19
+FLAVOR = ruby20
. endif
# Check for conflicting FLAVORs and set MODRUBY_REV appropriately based
@@ -77,9 +77,9 @@ PKG_ARGS+= -f ${PORTSDIR}/lang/ruby/ruby
.endif
# The default ruby version to use for non-gem/extconf ports.
-# Defaults to ruby 1.9 for consistency with the default ruby19
+# Defaults to ruby 2.0 for consistency with the default ruby20
# FLAVOR for gem/extconf ports.
-MODRUBY_REV?= 1.9
+MODRUBY_REV?= 2.0
# Have the man pages for the rbx and jruby versions of a gem file
# use an -rbx or -jruby suffix to avoid conflicts with the
Index: devel/ruby-rcov/Makefile
===================================================================
RCS file: /cvs/ports/devel/ruby-rcov/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- devel/ruby-rcov/Makefile 11 Mar 2013 10:50:30 -0000 1.15
+++ devel/ruby-rcov/Makefile 3 Oct 2013 20:23:54 -0000
@@ -12,6 +12,8 @@ MAINTAINER= Jeremy Evans <jeremy@openbsd
PERMIT_PACKAGE_CDROM= Yes
MODULES= lang/ruby
+FLAVOR ?= ruby18
+FLAVORS = ruby18 ruby19
CONFIGURE_STYLE=ruby gem ext
Index: www/ruby-passenger/Makefile
===================================================================
RCS file: /cvs/ports/www/ruby-passenger/Makefile,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile
--- www/ruby-passenger/Makefile 14 Aug 2013 03:08:09 -0000 1.31
+++ www/ruby-passenger/Makefile 3 Oct 2013 20:33:17 -0000
@@ -28,6 +28,9 @@ MULTI_PACKAGES = -main -standalone
MODULES = devel/gettext \
lang/ruby
+FLAVORS = ruby18 ruby19
+FLAVOR ?= ruby19
+
SHARED_ONLY-main = Yes
SHARED_ONLY-standalone = Yes
Index: databases/ruby-bdb/Makefile
===================================================================
RCS file: /cvs/ports/databases/ruby-bdb/Makefile,v
retrieving revision 1.33
diff -u -p -r1.33 Makefile
--- databases/ruby-bdb/Makefile 11 Mar 2013 02:52:08 -0000 1.33
+++ databases/ruby-bdb/Makefile 3 Oct 2013 22:57:06 -0000
@@ -2,7 +2,7 @@
COMMENT= ruby interface to Berkeley DB
DISTNAME= bdb-0.6.5
-REVISION= 6
+REVISION= 7
CATEGORIES= databases
HOMEPAGE= http://rubyforge.org/projects/bdb/
Index: databases/ruby-bdb/patches/patch-src_features_rb
===================================================================
RCS file: databases/ruby-bdb/patches/patch-src_features_rb
diff -N databases/ruby-bdb/patches/patch-src_features_rb
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ databases/ruby-bdb/patches/patch-src_features_rb 3 Oct 2013 20:31:30
-0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- src/features.rb.orig Fri Jun 27 04:29:30 2008
++++ src/features.rb Thu Oct 3 13:31:27 2013
+@@ -813,7 +813,7 @@ end
+ begin
+ conftest = CONFTEST_C.dup
+ class Object
+- remove_const('CONFTEST_C')
++ remove_const('CONFTEST_C') rescue nil
+ end
+
+ CONFTEST_C = 'conftest.cxx'
+@@ -878,7 +878,7 @@ EOT
+
+ ensure
+ class Object
+- remove_const('CONFTEST_C')
++ remove_const('CONFTEST_C') rescue nil
+ end
+
+ CONFTEST_C = conftest