Update ruby ports to deal with the regress changes to ruby.port.mk.

Start using MODRUBY_REGRESS with ruby, rspec2, and testrb entries.
Switch away from manual do_regress targets where possible.  Add
some patches to make regress tests run for some ports.
This commit is contained in:
jeremy 2011-11-17 16:08:00 +00:00
parent 270e5af39b
commit 16703d23fa
27 changed files with 188 additions and 70 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.5 2011/11/09 00:17:37 jeremy Exp $
# $OpenBSD: Makefile,v 1.6 2011/11/17 16:08:00 jeremy Exp $
COMMENT = ruby library for reading/writing vorbis comments
@ -26,10 +26,7 @@ LIB_DEPENDS = audio/libvorbis
CONFIGURE_STYLE = ruby gem ext
REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH}
MODRUBY_REGRESS = rake
RAKE_REGRESS_TARGET = default
do-regress:
cd ${WRKSRC} && ${RUBY} test/test_vorbis_comment.rb
MODRUBY_REGRESS = ruby
MODRUBY_REGRESS_TARGET = test/test_vorbis_comment.rb
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.6 2011/09/16 08:48:04 espie Exp $
# $OpenBSD: Makefile,v 1.7 2011/11/17 16:08:00 jeremy Exp $
BROKEN-mips64el= hangs when compiling sqlite3.o
@ -30,10 +30,8 @@ AMALGALITE_SO_DIR = amalgalite/${MODRUBY_REV}
SUBST_VARS += AMALGALITE_SO_DIR
# distfile doesn't include configuration directory necessary for testing.
# Also requires RSpec2, no yet ported.
NO_REGRESS = Yes
REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH}
MODRUBY_REGRESS = rspec
RSPEC_REGRESS_TARGET = spec/*_spec.rb
MODRUBY_REGRESS = rspec2
MODRUBY_REGRESS_TARGET = spec/*_spec.rb
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.10 2011/11/09 00:05:40 jeremy Exp $
# $OpenBSD: Makefile,v 1.11 2011/11/17 16:08:00 jeremy Exp $
COMMENT = unified Ruby API for popular databases
@ -19,9 +19,9 @@ RUN_DEPENDS = www/ruby-addressable,${MODRUBY_FLAVOR} \
CONFIGURE_STYLE = ruby gem
MODRUBY_REGRESS = rake rspec
RAKE_REGRESS_TARGET= -R tasks spec
MODRUBY_REGRESS = rake rspec2
REGRESS_DEPENDS = devel/ruby-mocha,${MODRUBY_FLAVOR} \
devel/ruby-bacon,${MODRUBY_FLAVOR}
devel/ruby-bacon,${MODRUBY_FLAVOR} \
devel/ruby-bundler,${MODRUBY_FLAVOR}
.include <bsd.port.mk>

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-Rakefile,v 1.1 2011/11/17 16:08:00 jeremy Exp $
This isn't needed for the specs, and causes an error.
--- Rakefile.orig Mon Nov 14 13:20:17 2011
+++ Rakefile Mon Nov 14 13:20:21 2011
@@ -2,7 +2,6 @@ require 'pathname'
require 'rubygems'
require 'bundler'
require 'rubygems/package_task'
-Bundler::GemHelper.install_tasks
require 'rake'
require 'rake/clean'

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-tasks_spec_rake,v 1.1 2011/11/17 16:08:00 jeremy Exp $
skip_bundler is deprecated in the current version of rspec.
The rcov.opts file is not shipped with the gem, and isn't
necessary as we aren't running the rcov task.
--- tasks/spec.rake.orig Mon Nov 14 13:22:00 2011
+++ tasks/spec.rake Mon Nov 14 13:22:09 2011
@@ -2,11 +2,9 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = './spec/**/*_spec.rb'
- spec.skip_bundler = true
end
RSpec::Core::RakeTask.new(:rcov) do |rcov|
rcov.pattern = "./spec/**/*_spec.rb"
rcov.rcov = true
- rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
end

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.18 2011/11/12 17:02:17 jeremy Exp $
# $OpenBSD: Makefile,v 1.19 2011/11/17 16:08:00 jeremy Exp $
COMMENT = lightweight database library and ORM for Ruby
@ -21,6 +21,6 @@ CONFIGURE_STYLE = ruby gem
REGRESS_DEPENDS = databases/ruby-sqlite3,${MODRUBY_FLAVOR}
MODRUBY_REGRESS = rake rspec
RAKE_REGRESS_TARGET = spec spec_plugin spec_sqlite
MODRUBY_REGRESS_TARGET = spec spec_plugin spec_sqlite
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.9 2011/09/16 09:24:57 espie Exp $
# $OpenBSD: Makefile,v 1.10 2011/11/17 16:08:00 jeremy Exp $
COMMENT = execute plain-text documents as automated functional tests
@ -29,6 +29,4 @@ REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH} \
MODRUBY_REGRESS = rake rspec
RAKE_REGRESS_TARGET = features
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.11 2011/09/16 09:24:57 espie Exp $
# $OpenBSD: Makefile,v 1.12 2011/11/17 16:08:00 jeremy Exp $
COMMENT = Ruby extensions serving DataMapper and DataObjects
@ -17,7 +17,7 @@ MODULES = lang/ruby
CONFIGURE_STYLE = ruby gem
MODRUBY_REGRESS = rake rspec
RAKE_REGRESS_TARGET = spec
REGRESS_DEPENDS = converters/ruby-json,${MODRUBY_FLAVOR}
REGRESS_DEPENDS = converters/ruby-json,${MODRUBY_FLAVOR} \
devel/ruby-jeweler,${MODRUBY_FLAVOR}
.include <bsd.port.mk>

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-Rakefile,v 1.1 2011/11/17 16:08:00 jeremy Exp $
Fudge package dependency to allow running regress.
--- Rakefile.orig Sun Nov 13 19:51:21 2011
+++ Rakefile Sun Nov 13 19:51:30 2011
@@ -15,7 +15,7 @@ begin
gem.rubyforge_project = 'extlib'
- gem.add_development_dependency 'json_pure', '~> 1.4'
+ gem.add_development_dependency 'json', '~> 1.4'
gem.add_development_dependency 'rspec', '~> 1.3'
end

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.2 2011/09/16 09:24:57 espie Exp $
# $OpenBSD: Makefile,v 1.3 2011/11/17 16:08:00 jeremy Exp $
COMMENT = embed C code in your ruby script
DISTNAME = ffi-inliner-0.2.4
CATEGORIES = devel
REVISION= 0
REVISION = 0
HOMEPAGE = http://github.com/remogatto/ffi-inliner
@ -21,8 +21,10 @@ CONFIGURE_STYLE = ruby gem
BUILD_DEPENDS = ${RUN_DEPENDS}
RUN_DEPENDS = devel/ruby-ffi,${MODRUBY_FLAVOR}
# 1 failure because we don't support the optional tcc dependency
REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH}
MODRUBY_REGRESS = rspec
RSPEC_REGRESS_TARGET= spec/ffi-inliner/inliner_spec.rb
MODRUBY_REGRESS_ENV = LD_PRELOAD=/usr/lib/libpthread.so
MODRUBY_REGRESS_TARGET= spec/ffi-inliner/inliner_spec.rb
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2011/11/09 00:17:38 jeremy Exp $
# $OpenBSD: Makefile,v 1.8 2011/11/17 16:08:00 jeremy Exp $
COMMENT = cross-platform dynamic library loading for ruby
@ -30,11 +30,13 @@ CONFIGURE_STYLE = ruby gem ext
post-install:
rm -r ${GEM_ABS_PATH}/gems/${DISTNAME}/ext
# Regress currently broken, libtest directory needed and not
# included in the gem
NO_REGRESS = yes
REGRESS_DEPENDS = devel/ruby-rake-compiler,${MODRUBY_FLAVOR}
MODRUBY_REGRESS = rake rspec
RAKE_REGRESS_TARGET = specs
# Doesn't ship with libtest directory, which is necessary for
# regress
NO_REGRESS = Yes
#REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH}
#MODRUBY_REGRESS = rspec2
#MODRUBY_REGRESS_ENV = RUBYLIB=$$(dirname `${GEM} which ffi.rb`) \
# RUBYOPT=-rffi
#MODRUBY_REGRESS_TARGET = spec/ffi/*_spec.rb
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.14 2011/09/16 09:24:57 espie Exp $
# $OpenBSD: Makefile,v 1.15 2011/11/17 16:08:00 jeremy Exp $
COMMENT= simple mock object for unit testing
@ -17,6 +17,6 @@ MODULES= lang/ruby
CONFIGURE_STYLE=ruby gem
MODRUBY_REGRESS= rake
RAKE_REGRESS_TARGET= test_all
MODRUBY_REGRESS_TARGET= test_all
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.2 2011/09/16 09:24:57 espie Exp $
# $OpenBSD: Makefile,v 1.3 2011/11/17 16:08:00 jeremy Exp $
COMMENT = specialized test framework for running RubySpecs
@ -18,6 +18,9 @@ PERMIT_DISTFILES_FTP = Yes
MODULES = lang/ruby
CONFIGURE_STYLE = ruby gem
# 1 expected failure on ruby 1.8
# 20 failures on ruby 1.9
MODRUBY_REGRESS = rake rspec
.include <bsd.port.mk>

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.4 2011/09/16 09:24:58 espie Exp $
# $OpenBSD: Makefile,v 1.5 2011/11/17 16:08:00 jeremy Exp $
COMMENT = fast code profiler for Ruby
DISTNAME = ruby-${PKGNAME}
PKGNAME = prof-0.10.6
REVISION= 0
REVISION= 0
CATEGORIES = devel
HOMEPAGE = http://ruby-prof.rubyforge.org/
@ -21,8 +21,8 @@ MODULES = lang/ruby
CONFIGURE_STYLE = ruby gem ext
# A few regress failures
# 4 failures
MODRUBY_REGRESS = rake
RAKE_REGRESS_TARGET = build test
MODRUBY_REGRESS_TARGET = build test
.include <bsd.port.mk>

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-Rakefile,v 1.1 2011/11/17 16:08:00 jeremy Exp $
The gem doesn't ship with it's gemspec, which breaks the Rakefile
when used from the gem. Work around it so the regress tests can run.
--- Rakefile.orig Sun Nov 13 22:29:39 2011
+++ Rakefile Sun Nov 13 22:29:54 2011
@@ -10,7 +10,6 @@ require 'date'
# rake cleanr default
# gem push pkg/ruby-prof-0.10.1.gem
-default_spec = eval File.read(File.expand_path('../ruby-prof.gemspec', __FILE__))
desc 'deprecated--build native .gem files -- use like "native_gems clobber cross native gem"--for non native gem creation use "native_gems clobber" then "clean gem"'
task :native_gems do
@@ -27,7 +26,7 @@ end
Rake::GemPackageTask.new(default_spec) do |pkg|
pkg.need_tar = true
#pkg.need_zip = true
-end
+end if false
# --------- RDoc Documentation ------

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.21 2011/11/09 00:08:50 jeremy Exp $
# $OpenBSD: Makefile,v 1.22 2011/11/17 16:08:00 jeremy Exp $
COMMENT= ruby make
@ -17,10 +17,14 @@ MODULES= lang/ruby
CONFIGURE_STYLE=ruby gem format-executable
# ruby 1.9, jruby, and rubinius all ship with rake, so
# force the empty (ruby 1.8) FLAVOR.
FLAVOR=
REGRESS_DEPENDS=${FULLPKGNAME}:${BUILD_PKGPATH} \
devel/ruby-rcov \
devel/ruby-flexmock
devel/ruby-flexmock \
devel/ruby-minitest
MODRUBY_REGRESS=rake
RAKE_REGRESS_TARGET=test_all
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.3 2011/11/09 00:17:38 jeremy Exp $
# $OpenBSD: Makefile,v 1.4 2011/11/17 16:08:00 jeremy Exp $
COMMENT = simple subset sum problem solver for ruby
@ -20,6 +20,6 @@ MODULES = lang/ruby
CONFIGURE_STYLE = ruby gem ext
MODRUBY_REGRESS = rspec
RSPEC_REGRESS_TARGET = spec/*_spec.rb
MODRUBY_REGRESS_TARGET = spec/*_spec.rb
.include <bsd.port.mk>

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.11 2011/09/16 09:24:58 espie Exp $
# $OpenBSD: Makefile,v 1.12 2011/11/17 16:08:00 jeremy Exp $
COMMENT= a ruby timer based on SIGALRM
DISTNAME= SystemTimer-1.2.3
PKGNAME= ${DISTNAME:L}
REVISION= 0
REVISION= 0
CATEGORIES= devel
# ruby or gpl
@ -18,11 +18,13 @@ MODULES= lang/ruby
CONFIGURE_STYLE=ruby gem ext
# Regress tests not enabled, as they depend on ruby-dust,
# not yet imported.
REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH} \
devel/ruby-mocha,${MODRUBY_FLAVOR}
#do-regress:
# cd ${WRKSRC} && ${RUBY} -rubygems test/all_tests.rb
# which is dead upstream and won't be imported. You can
# manually install the gem if you want to run the regress
# tests.
NO_REGRESS = Yes
#REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH} \
# devel/ruby-mocha,${MODRUBY_FLAVOR}
#MODRUBY_REGRESS = ruby
#MODRUBY_REGRESS_TARGET = -rubygems test/all_tests.rb
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.11 2011/09/16 09:24:58 espie Exp $
# $OpenBSD: Makefile,v 1.12 2011/11/17 16:08:00 jeremy Exp $
COMMENT= simple library for generating UUIDs
@ -16,7 +16,7 @@ MODULES= lang/ruby
CONFIGURE_STYLE=ruby gem
MODRUBY_REGRESS=rake
RAKE_REGRESS_TARGET=test_all
MODRUBY_REGRESS=rake rspec
MODRUBY_REGRESS_TARGET=spec:normal
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.9 2011/09/16 11:13:40 espie Exp $
# $OpenBSD: Makefile,v 1.10 2011/11/17 16:08:00 jeremy Exp $
COMMENT = simple AMQP driver for Ruby
@ -22,6 +22,6 @@ RUN_DEPENDS = net/ruby-eventmachine,${MODRUBY_FLAVOR}
REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH} \
devel/ruby-bacon,${MODRUBY_FLAVOR}
MODRUBY_REGRESS = rake
RAKE_REGRESS_TARGET = spec
MODRUBY_REGRESS_TARGET = spec
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2011/09/16 11:13:40 espie Exp $
# $OpenBSD: Makefile,v 1.8 2011/11/17 16:08:00 jeremy Exp $
COMMENT = another synchronous Ruby amqp client
@ -20,6 +20,6 @@ CONFIGURE_STYLE = ruby gem
REGRESS_IS_INTERACTIVE = Yes
MODRUBY_REGRESS = rake rspec
RSPEC_REGRESS_TARGET = all
MODRUBY_REGRESS_TARGET = all
.include <bsd.port.mk>

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.13 2011/09/16 11:41:39 espie Exp $
# $OpenBSD: Makefile,v 1.14 2011/11/17 16:08:00 jeremy Exp $
COMMENT = Ruby binding for the bcrypt() password hashing algorithm
VERSION = 3.0.0
DISTNAME = bcrypt-ruby-${VERSION}
PKGNAME = bcrypt-${VERSION}
REVISION= 0
REVISION= 0
CATEGORIES = security
MAINTAINER = Jeremy Evans <jeremy@openbsd.org>
@ -22,4 +22,8 @@ MODULES = lang/ruby
CONFIGURE_STYLE = ruby gem ext
REGRESS_DEPENDS = ${FULLPKGNAME}:${BUILD_PKGPATH} \
devel/ruby-rake-compiler,${MODRUBY_FLAVOR}
MODRUBY_REGRESS = rake rspec2
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.19 2011/09/16 11:41:40 espie Exp $
# $OpenBSD: Makefile,v 1.20 2011/11/17 16:08:00 jeremy Exp $
SHARED_ONLY= Yes
@ -34,9 +34,7 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/etc/facter.conf \
${MODRUBY_EXAMPLEDIR}/facter
MODRUBY_REGRESS= rake rspec
do-regress:
@cd ${WRKSRC}/spec && ${RAKE} all
MODRUBY_REGRESS = rake rspec2
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.12 2011/09/16 11:41:41 espie Exp $
# $OpenBSD: Makefile,v 1.13 2011/11/17 16:08:00 jeremy Exp $
COMMENT= Ruby library to create XML markup and data structures
@ -17,6 +17,6 @@ MODULES= lang/ruby
CONFIGURE_STYLE=ruby gem
MODRUBY_REGRESS= rake
RAKE_REGRESS_TARGET= test_all
MODRUBY_REGRESS_TARGET= test_all
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.2 2011/09/16 11:41:42 espie Exp $
# $OpenBSD: Makefile,v 1.3 2011/11/17 16:08:00 jeremy Exp $
COMMENT = discount implementation of John Gruber's Markdown
@ -18,6 +18,6 @@ CONFIGURE_STYLE = ruby gem ext
MODRUBY_REGRESS = rake
RAKE_REGRESS_TARGET = test:unit
MODRUBY_REGRESS_TARGET = test:unit
.include <bsd.port.mk>

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-Rakefile,v 1.1 2011/11/17 16:08:00 jeremy Exp $
Fix regress with rake 0.9, which no longer defines ::RUBY.
--- Rakefile.orig Sun Nov 13 22:47:48 2011
+++ Rakefile Sun Nov 13 22:47:59 2011
@@ -9,6 +9,7 @@ task :default => :test
# ==========================================================
DLEXT = Config::CONFIG['DLEXT']
+RUBY = FileUtils::RUBY
RUBYDIGEST = Digest::MD5.hexdigest(`#{RUBY} --version`)
file "ext/ruby-#{RUBYDIGEST}" do |f|

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-Rakefile,v 1.1 2011/11/17 16:08:01 jeremy Exp $
Comment out requiring newgem hoe plugin, as it is not needed for
building and breaks regress.
--- Rakefile.orig Sun Nov 13 00:22:57 2011
+++ Rakefile Sun Nov 13 00:23:10 2011
@@ -4,7 +4,7 @@ require 'hoe'
require 'fileutils'
require './lib/templater'
-Hoe.plugin :newgem
+# Hoe.plugin :newgem
# Hoe.plugin :website
# Hoe.plugin :cucumberfeatures
@@ -19,5 +19,5 @@ $hoe = Hoe.spec 'templater' do
self.extra_dev_deps << ['rspec', '>= 1.2.8']
end
-require 'newgem/tasks'
+# require 'newgem/tasks'
Dir['tasks/**/*.rake'].each { |t| load t }