diff options
-rw-r--r-- | lang/ruby/rubyversion.mk | 21 | ||||
-rw-r--r-- | mk/pbulk/pbulk-index.mk | 10 |
2 files changed, 25 insertions, 6 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} diff --git a/mk/pbulk/pbulk-index.mk b/mk/pbulk/pbulk-index.mk index bc48d37a978..5fc6ecda1bc 100644 --- a/mk/pbulk/pbulk-index.mk +++ b/mk/pbulk/pbulk-index.mk @@ -1,4 +1,4 @@ -# $NetBSD: pbulk-index.mk,v 1.10 2010/06/15 19:23:55 joerg Exp $ +# $NetBSD: pbulk-index.mk,v 1.11 2010/09/28 20:24:25 joerg Exp $ # This Makefile fragment is included by bsd.pkg.mk and provides all # variables and targets related to the parallel bulk build @@ -16,7 +16,7 @@ # _PBULK_MULTI_VAR.foo forces a specific version # _PBULK_MULTI_DEFAULT.foo contains the default value -_PBULK_MULTI?= apache php python +_PBULK_MULTI?= apache php python ruby _PBULK_MULTI_LIST.apache= PKG_APACHE_ACCEPTED _PBULK_MULTI_VAR.apache= PKG_APACHE @@ -30,6 +30,10 @@ _PBULK_MULTI_LIST.python= _PYTHON_VERSIONS_ACCEPTED _PBULK_MULTI_VAR.python= PYTHON_VERSION_REQD _PBULK_MULTI_DEFAULT.python= PYTHON_VERSION_DEFAULT +_PBULK_MULTI_LIST.ruby= RUBY_VERSION_SUPPORTED +_PBULK_MULTI_VAR.ruby= RUBY_VERSION_REQD +_PBULK_MULTI_DEFAULT.ruby= _RUBY_VERSION_DEFAULT + .PHONY: pbulk-index pbulk-index-item # Find all classes with more than one supported setting. @@ -104,4 +108,4 @@ pbulk-index-item: .endif pbulk-save-wrkdir: - ${RUN} cd ${WRKDIR} && ${TAR} cfz ${INTO:Q} . + ${RUN} [ ! -d ${WRKDIR} ] || cd ${WRKDIR} && tar cfz ${INTO:Q} . |