diff options
author | joerg <joerg@pkgsrc.org> | 2010-09-28 20:24:25 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2010-09-28 20:24:25 +0000 |
commit | 5a1c12fab94f74ef5e0fa2dc6ff923cf5648d7aa (patch) | |
tree | d5558fb4df42cfc7504702df14e82edec3ff4897 /lang/ruby | |
parent | 81b05701a73f89b939920758c6874a68408684b7 (diff) | |
download | pkgsrc-5a1c12fab94f74ef5e0fa2dc6ff923cf5648d7aa.tar.gz |
Add the necessary glue to hook Ruby into the multi-version framework.
This allows lang/ruby18 and lang/ruby19 to coexist in bulk builds.
Discussed with taca@
Diffstat (limited to 'lang/ruby')
-rw-r--r-- | lang/ruby/rubyversion.mk | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lang/ruby/rubyversion.mk b/lang/ruby/rubyversion.mk index f7d17b2a08c..e3079667239 100644 --- a/lang/ruby/rubyversion.mk +++ b/lang/ruby/rubyversion.mk @@ -1,4 +1,4 @@ -# $NetBSD: rubyversion.mk,v 1.51 2010/09/24 07:44:29 taca Exp $ +# $NetBSD: rubyversion.mk,v 1.52 2010/09/28 20:24:25 joerg Exp $ # .if !defined(_RUBYVERSION_MK) @@ -22,6 +22,7 @@ RUBY19_API_VERSION= 1.9.1 # packages and user can define in mk.conf. (1.8 or 1.9) # RUBY_VERSION_DEFAULT?= 1.8 +_RUBY_VERSION_DEFAULT= ${RUBY_VERSION_DEFAULT:S/.//} # RUBY_VERSION defines the specific Ruby's version which is supported # by the package. It should be defined by packages whose distfiles @@ -29,12 +30,26 @@ RUBY_VERSION_DEFAULT?= 1.8 # # Default value is set to ${RUBY_VERSION_DEFAULT} # -.if ${RUBY_VERSION_DEFAULT} == "1.8" +.if defined(RUBY_VERSION_REQD) +. if ${RUBY_VERSION_REQD} == "18" RUBY_VERSION?= ${RUBY18_VERSION} RUBY_API_VERSION?= ${RUBY18_API_VERSION} -.elif ${RUBY_VERSION_DEFAULT} == "1.9" +. elif ${RUBY_VERSION_REQD} == "19" RUBY_VERSION?= ${RUBY19_VERSION} RUBY_API_VERSION?= ${RUBY19_API_VERSION} +. else +RUBY_VERSION?= ${RUBY18_VERSION} +RUBY_API_VERSION?= ${RUBY18_API_VERSION} +PKG_FAIL_REASON+= "Unknown value for ${RUBY_VERSION_REQD}" +. endif +.else +. if ${RUBY_VERSION_DEFAULT} == "1.8" +RUBY_VERSION?= ${RUBY18_VERSION} +RUBY_API_VERSION?= ${RUBY18_API_VERSION} +. elif ${RUBY_VERSION_DEFAULT} == "1.9" +RUBY_VERSION?= ${RUBY19_VERSION} +RUBY_API_VERSION?= ${RUBY19_API_VERSION} +. endif .endif RUBY_PATCH_LEVEL= ${RUBY${RUBY_VER}_PATCHLEVEL} |