Sat Apr 22 18:29:31 2017 UTC ()
Add RUBY_VERSIONS_SUPPORTED, versions supported by pkgsrc.
(It should be commited before remove ruby18.)


(taca)
diff -r1.172 -r1.173 pkgsrc/lang/ruby/rubyversion.mk

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

--- pkgsrc/lang/ruby/rubyversion.mk 2017/04/09 15:57:00 1.172
+++ pkgsrc/lang/ruby/rubyversion.mk 2017/04/22 18:29:31 1.173
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: rubyversion.mk,v 1.172 2017/04/09 15:57:00 taca Exp $ 1# $NetBSD: rubyversion.mk,v 1.173 2017/04/22 18:29:31 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 21 22 23 13# Possible values: 18 21 22 23
14# Default: 23 14# Default: 23
@@ -32,27 +32,27 @@ @@ -32,27 +32,27 @@
32# RUBY_VERSION_REQD 32# RUBY_VERSION_REQD
33# Ruby version to use. This variable should not be set in 33# Ruby version to use. This variable should not be set in
34# packages. Normally it is used by bulk build tools. 34# packages. Normally it is used by bulk build tools.
35# 35#
36# Possible values: ${RUBY_VERSIONS_ACCEPTED} 36# Possible values: ${RUBY_VERSIONS_ACCEPTED}
37# Default: ${RUBY_VERSION_DEFAULT} 37# Default: ${RUBY_VERSION_DEFAULT}
38# 38#
39# === Package-settable variables === 39# === Package-settable variables ===
40# 40#
41# RUBY_VERSIONS_ACCEPTED 41# RUBY_VERSIONS_ACCEPTED
42# The Ruby versions that are acceptable for the package. 42# The Ruby versions that are acceptable for the package.
43# 43#
44# Possible values: 18 21 22 23 44# Possible values: 18 21 22 23
45# Default: 21 22 23 45# Default: 23 22 21
46# 46#
47# RUBY_NOVERSION 47# RUBY_NOVERSION
48# If "Yes", the package dosen't depend on any version of Ruby, such 48# If "Yes", the package dosen't depend on any version of Ruby, such
49# as editing mode for emacs. In this case, package's name would begin 49# as editing mode for emacs. In this case, package's name would begin
50# with "ruby-". Otherwise, the package's name is begin with 50# with "ruby-". Otherwise, the package's name is begin with
51# ${RUBY_PKGPREFIX}. 51# ${RUBY_PKGPREFIX}.
52# 52#
53# Possible values: Yes No 53# Possible values: Yes No
54# Default: No 54# Default: No
55# 55#
56# RUBY_DYNAMIC_DIRS 56# RUBY_DYNAMIC_DIRS
57# Build dynamic PLIST from directories. 57# Build dynamic PLIST from directories.
58# 58#
@@ -243,29 +243,36 @@ RUBY18_API_VERSION= 1.8.7 @@ -243,29 +243,36 @@ RUBY18_API_VERSION= 1.8.7
243RUBY21_API_VERSION= 2.1.0 243RUBY21_API_VERSION= 2.1.0
244RUBY22_API_VERSION= 2.2.0 244RUBY22_API_VERSION= 2.2.0
245RUBY23_API_VERSION= 2.3.0 245RUBY23_API_VERSION= 2.3.0
246 246
247# pkgsrc's rubygems's version 247# pkgsrc's rubygems's version
248RUBY_GEMS_PKGSRC_VERS= 2.4.8 248RUBY_GEMS_PKGSRC_VERS= 2.4.8
249 249
250# pkgsrc's rdoc's version 250# pkgsrc's rdoc's version
251RUBY_RDOC_PKGSRC_VERS= 4.2.2 251RUBY_RDOC_PKGSRC_VERS= 4.2.2
252 252
253# 253#
254RUBY_VERSION_DEFAULT?= 23 254RUBY_VERSION_DEFAULT?= 23
255 255
 256# supported Ruby's version
 257RUBY_VERSIONS_SUPPORTED= 23 22 21 18
 258
256RUBY_VERSIONS_ACCEPTED?= 23 22 21 259RUBY_VERSIONS_ACCEPTED?= 23 22 21
257RUBY_VERSIONS_INCOMPATIBLE?= 260RUBY_VERSIONS_INCOMPATIBLE?=
258 261
 262.if empty(RUBY_VERSIONS_SUPPORTED:M${RUBY_VERSION_DEFAULT})
 263.error Unsuported RUBY_VERSION_DEFAULT: ${RUBY_VERSION_DEFAULT}
 264.endif
 265
259.for rv in ${RUBY_VERSIONS_ACCEPTED} 266.for rv in ${RUBY_VERSIONS_ACCEPTED}
260. if empty(RUBY_VERSIONS_INCOMPATIBLE:M${rv}) 267. if empty(RUBY_VERSIONS_INCOMPATIBLE:M${rv})
261_RUBY_VERSIONS_ACCEPTED+= ${rv} 268_RUBY_VERSIONS_ACCEPTED+= ${rv}
262. endif 269. endif
263.endfor 270.endfor
264 271
265.if defined(RUBY_VERSION_REQD) 272.if defined(RUBY_VERSION_REQD)
266. for rv in ${_RUBY_VERSIONS_ACCEPTED} 273. for rv in ${_RUBY_VERSIONS_ACCEPTED}
267. if "${rv}" == ${RUBY_VERSION_REQD} 274. if "${rv}" == ${RUBY_VERSION_REQD}
268RUBY_VER= ${rv} 275RUBY_VER= ${rv}
269. endif 276. endif
270. endfor 277. endfor
271.elif !defined(RUBY_VER) 278.elif !defined(RUBY_VER)