Here's a minor update to devel/ruby-fastthread (a dependency of
www/ruby-passenger).  The previous diff did not correctly handle the
ruby19 FLAVOR, resulting in an error message if you required
the library.  Passenger doesn't actually require fastthread on
ruby 1.9, so it didn't detect the problem.

This also updates the regress tests to use MODRUBY_REGRESS.

Tested on amd64.  I plan to commit this and the passenger update next
week unless I hear objections.

Jeremy

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/ruby-fastthread/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile    9 Nov 2011 00:17:38 -0000       1.12
+++ Makefile    9 Dec 2011 21:55:30 -0000
@@ -3,7 +3,7 @@
 COMMENT=       optimized replacement for Ruby thread.rb primitives
 
 DISTNAME=      fastthread-1.0.7
-REVISION=      4
+REVISION=      5
 CATEGORIES=    devel
 
 # Ruby's license
@@ -17,8 +17,20 @@ MODULES=     lang/ruby
 CONFIGURE_STYLE=ruby gem ext
 
 REGRESS_DEPENDS=${FULLPKGNAME}:${BUILD_PKGPATH}
+MODRUBY_REGRESS=ruby
+MODRUBY_REGRESS_TARGET=-rubygems test/test_all.rb
 
-do-regress: fake
-       @cd ${WRKBUILD} && ${RUBY} -rubygems test/test_all.rb
+FLAVOR?=
+
+.if ${FLAVOR:Mruby19}
+FASTTHREAD_EXT=        .rb
+.else
+FASTTHREAD_EXT=        .so
+.endif
+
+SUBST_VARS=    FASTTHREAD_EXT
+
+post-install:
+       touch 
${GEM_ABS_PATH}/gems/fastthread-1.0.7/ext/fastthread/fastthread.{,s}o
 
 .include <bsd.port.mk>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/ruby-fastthread/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST   9 Nov 2011 00:17:38 -0000       1.4
+++ pkg/PLIST   9 Dec 2011 21:55:58 -0000
@@ -13,7 +13,7 @@ ${GEM_LIB}/gems/${DISTNAME}/ext/fastthre
 ${GEM_LIB}/gems/${DISTNAME}/ext/fastthread/fastthread.so
 ${GEM_LIB}/gems/${DISTNAME}/fastthread.gemspec
 ${GEM_LIB}/gems/${DISTNAME}/lib/
-${GEM_LIB}/gems/${DISTNAME}/lib/fastthread.so
+${GEM_LIB}/gems/${DISTNAME}/lib/fastthread${FASTTHREAD_EXT}
 ${GEM_LIB}/gems/${DISTNAME}/setup.rb
 ${GEM_LIB}/gems/${DISTNAME}/test/
 ${GEM_LIB}/gems/${DISTNAME}/test/test_all.rb

Reply via email to