tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[RFC] Ruby version handling changes
Hi,
Please review following changes:
1. Rename RUBY_VERSION_SUPPORTED to RUBY_VERSIONS_ACCEPTED,
same name as Lua, Python and PHP.
2. Introduce RUBY_VERSIONS_INCOMPATIBLE, same as Lua and Python.
3. Fail if no valid Ruby version.
Index: lang/ruby/rubyversion.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby/rubyversion.mk,v
retrieving revision 1.121
diff -u -r1.121 rubyversion.mk
--- lang/ruby/rubyversion.mk 21 May 2014 03:19:57 -0000 1.121
+++ lang/ruby/rubyversion.mk 3 Jul 2014 12:13:39 -0000
@@ -33,17 +33,27 @@
# Ruby version to use. This variable should not be set in
# packages. Normally it is used by bulk build tools.
#
-# Possible values: ${RUBY_VERSION_SUPPORTED}
+# Possible values: ${RUBY_VERSIONS_ACCEPTED}
# Default: ${RUBY_VERSION_DEFAULT}
#
# === Package-settable variables ===
#
-# RUBY_VERSION_SUPPORTED
+# RUBY_VERSIONS_ACCEPTED
# The Ruby versions that are acceptable for the package.
#
# Possible values: 18 193 200 21
# Default: 200 193 18 21
#
+# RUBY_VERSIONS_INCOMPATIBLE
+# The Ruby versions that are NOT acceptable for the package
+#
+# Possible values: 18 193 200 21
+# Default: (empty)
+#
+# RUBY_VERSION_SUPPORTED
+# Deprecated. Use RUBY_VERSIONS_ACCEPTED instead.
+#
+#
# RUBY_NOVERSION
# If "Yes", the package dosen't depend on any version of Ruby, such
# as editing mode for emacs. In this case, package's name would begin
@@ -231,30 +241,33 @@
#
RUBY_VERSION_DEFAULT?= 200
-RUBY_VERSION_SUPPORTED?= 200 193 18 21
+RUBY_VERSIONS_ACCEPTED?= ${RUBY_VERSION_SUPPORTED:U200 193 18 21}
+RUBY_VERSIONS_INCOMPATIBLE?= # empty
.if defined(RUBY_VERSION_REQD)
-. for rv in ${RUBY_VERSION_SUPPORTED}
-. if "${rv}" == ${RUBY_VERSION_REQD}
-RUBY_VER= ${rv}
-. endif
-. endfor
-.elif !defined(RUBY_VER)
-. for rv in ${RUBY_VERSION_SUPPORTED}
-. if "${rv}" == ${RUBY_VERSION_DEFAULT}
-RUBY_VER= ${rv}
-. endif
-. endfor
+RUBY_VER= ${RUBY_VERSION_REQD}
+. if !empty(RUBY_VERSIONS_ACCEPTED:M${RUBY_VERSION_REQD}) && \
+ empty(RUBY_VERSIONS_INCOMPATIBLE:M${RUBY_VERSION_REQD})
+. else
+PKG_FAIL_REASON= "No valid Ruby version"
+. endif
+.elif !defined(RUBY_VER) && \
+ !empty(RUBY_VERSIONS_ACCEPTED:M${RUBY_VERSION_DEFAULT}) && \
+ empty(RUBY_VERSIONS_INCOMPATIBLE:M${RUBY_VERSION_DEFAULT})
+RUBY_VER= ${RUBY_VERSION_DEFAULT}
.endif
.if !defined(RUBY_VER)
-. for rv in ${RUBY_VERSION_SUPPORTED}
-. if !defined(RUBY_VER)
+. for rv in ${RUBY_VERSIONS_ACCEPTED}
+. if !defined(RUBY_VER) && empty(RUBY_VERSIONS_INCOMPATIBLE:M${rv})
RUBY_VER= ${rv}
. endif
. endfor
.endif
+.if !defined(RUBY_VER)
+PKG_FAIL_REASON= "No valid Ruby version"
+.endif
RUBY_VER:= ${RUBY_VER_MAP.${RUBY_VER}:U${RUBY_VER}}
RUBY_SUFFIX?= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_VER_TEENY}
--
OBATA Akio / obata%lins.jp@localhost
Home |
Main Index |
Thread Index |
Old Index