but version 2 has 4 packages (core, expectations, mocks, and rspec). Stick version 1 in a subdir named 1, and the version 2 packages each in their own subdir. Upgrade version 1 to 1.3.2, the latest version, as some ports depend on >=1.3.0,<2.0. Because rubygems does not correctly handle the case where two versions of the same library install different binaries, manually hack the version 1 spec binary to work. Both version 1 and version 2 ship with the autospec binary, so comment it out from version 1 so the versions don't conflict. This requires changes to dependent ports, which will be committed shortly.
23 lines
933 B
Makefile
23 lines
933 B
Makefile
# $OpenBSD: Makefile,v 1.1 2011/11/17 15:15:26 jeremy Exp $
|
|
|
|
COMMENT = ruby framework for Behaviour Driven Development
|
|
DISTNAME = rspec-1.3.2
|
|
SUBST_VARS = MODRUBY_FLAVOR MODRUBY_PREFIX
|
|
|
|
# When you have two different versions of a ruby gem installed, the
|
|
# binaries will always select the latest version installed, even if
|
|
# newer gem has a different binary name than the older version, as
|
|
# rspec does with spec for 1 and rspec for 2. Fix this by setting
|
|
# a specific version in the gem binary shim, so that running spec
|
|
# will load the rspec 1 gem, not the rspec 2 gem.
|
|
post-install:
|
|
perl -pi -e 's/version = ">= 0"/version = "~> 1.3"/' \
|
|
${WRKINST}${LOCALBASE}/${GEM_BIN}/spec${GEM_BIN_SUFFIX}
|
|
|
|
# Requires heckle and quite a few other libraries to run its own
|
|
# specs, so this is currently broken.
|
|
REGRESS_DEPENDS = devel/ruby-bundler,${MODRUBY_FLAVOR}>=1.0.21
|
|
MODRUBY_REGRESS = rake rspec
|
|
|
|
.include <bsd.port.mk>
|