Mon May 7 07:53:28 2012 UTC ()
Strict RUBY_VERSION_DEFAULT when RUBY_VERSION_SUPPORTED has one word.

Should be fix PR pkg/46420.


(taca)
diff -r1.79 -r1.80 pkgsrc/lang/ruby/rubyversion.mk

cvs diff -r1.79 -r1.80 pkgsrc/lang/ruby/rubyversion.mk (expand / switch to unified diff)

--- pkgsrc/lang/ruby/rubyversion.mk 2012/04/22 08:23:00 1.79
+++ pkgsrc/lang/ruby/rubyversion.mk 2012/05/07 07:53:28 1.80
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: rubyversion.mk,v 1.79 2012/04/22 08:23:00 taca Exp $ 1# $NetBSD: rubyversion.mk,v 1.80 2012/05/07 07:53:28 taca Exp $
2# 2#
3 3
4# This file determines which Ruby version is used as a dependency for 4# This file determines which Ruby version is used as a dependency for
5# a package. 5# a package.
6# 6#
7# 7#
8# === User-settable variables === 8# === User-settable variables ===
9# 9#
10# RUBY_VERSION_DEFAULT 10# RUBY_VERSION_DEFAULT
11# The preferered Ruby version to use. 11# The preferered Ruby version to use.
12# 12#
13# Possible values: 18 192 193 13# Possible values: 18 192 193
14# Default: 193 14# Default: 193
@@ -210,27 +210,28 @@ RUBY193_PATCHLEVEL= p194 @@ -210,27 +210,28 @@ RUBY193_PATCHLEVEL= p194
210# current API compatible version; used for version of shared library 210# current API compatible version; used for version of shared library
211RUBY18_API_VERSION= 1.8.7 211RUBY18_API_VERSION= 1.8.7
212RUBY19_API_VERSION= 1.9.1 212RUBY19_API_VERSION= 1.9.1
213RUBY193_API_VERSION= 1.9.1 213RUBY193_API_VERSION= 1.9.1
214 214
215# 215#
216RUBY_VERSION_DEFAULT?= 193 216RUBY_VERSION_DEFAULT?= 193
217 217
218RUBY_VERSION_SUPPORTED?= 18 192 193 218RUBY_VERSION_SUPPORTED?= 18 192 193
219RUBY_VER?= ${RUBY_VERSION_DEFAULT} 219RUBY_VER?= ${RUBY_VERSION_DEFAULT}
220 220
221# If package support only one version, use it. 221# If package support only one version, use it.
222.if ${RUBY_VERSION_SUPPORTED:[\#]} == 1 222.if ${RUBY_VERSION_SUPPORTED:[\#]} == 1
223RUBY_VER= ${RUBY_VERSION_SUPPORTED} 223RUBY_VER= ${RUBY_VERSION_SUPPORTED}
 224RUBY_VERSION_DEFAULT= ${RUBY_VERSION_SUPPORTED}
224.endif 225.endif
225 226
226.if defined(RUBY_VERSION_REQD) 227.if defined(RUBY_VERSION_REQD)
227. for rv in ${RUBY_VERSION_SUPPORTED} 228. for rv in ${RUBY_VERSION_SUPPORTED}
228. if ${rv} == ${RUBY_VERSION_REQD} 229. if ${rv} == ${RUBY_VERSION_REQD}
229RUBY_VER= ${rv} 230RUBY_VER= ${rv}
230. endif 231. endif
231. endfor 232. endfor
232.endif 233.endif
233 234
234.if ${RUBY_VER} == "192" 235.if ${RUBY_VER} == "192"
235RUBY_VER= 19 236RUBY_VER= 19
236.endif 237.endif