Changeset View
Changeset View
Standalone View
Standalone View
bsd.ruby.mk
Context not available. | |||||
# expression will be set to RUBY_PROVIDED, which is | # expression will be set to RUBY_PROVIDED, which is | ||||
# left undefined if the result is nil, false or a | # left undefined if the result is nil, false or a | ||||
# zero-length string. Implies USE_RUBY. | # zero-length string. Implies USE_RUBY. | ||||
# USE_RUBY_FLAVORS - Set to build multiple flavors of ruby- port (not rubygem-) | |||||
# USE_RUBYGEMS - Do not use this -- instead USES=gem | # USE_RUBYGEMS - Do not use this -- instead USES=gem | ||||
# | # | ||||
# [variables that each port should not (re)define] | # [variables that each port should not (re)define] | ||||
Context not available. | |||||
RUBY_DEFAULT_VER?= ${RUBY_DEFAULT} | RUBY_DEFAULT_VER?= ${RUBY_DEFAULT} | ||||
.if empty(FLAVOR) | |||||
RUBY_VER?= ${RUBY_DEFAULT_VER} | RUBY_VER?= ${RUBY_DEFAULT_VER} | ||||
.else | |||||
RUBY_VER?= ${FLAVOR:S/^ruby//:S/^gem//:C/(.)/\1.\2/} | |||||
.endif | |||||
_VALID_RUBY_VERSIONS= 2.4 2.5 2.6 | |||||
.if defined(USE_RUBY_FLAVORS) | |||||
FLAVORS= ${RUBY_DEFAULT_VER:S/.//:S/^/ruby/} | |||||
.for _VALID_RUBY_VERSION in ${_VALID_RUBY_VERSIONS} | |||||
.if !${_VALID_RUBY_VERSION:M${RUBY_DEFAULT_VER}} | |||||
FLAVORS+= ${_VALID_RUBY_VERSION:S/.//:S/^/ruby/} | |||||
.endif | |||||
.endfor | |||||
.endif | |||||
.if defined(RUBY) | .if defined(RUBY) | ||||
.if !exists(${RUBY}) | .if !exists(${RUBY}) | ||||
Context not available. | |||||
_RUBY_SITEDIR!= ${_RUBY_CONFIG} 'puts C["sitedir"]' | _RUBY_SITEDIR!= ${_RUBY_CONFIG} 'puts C["sitedir"]' | ||||
_RUBY_VENDORDIR!= ${_RUBY_CONFIG} 'puts C["vendordir"]' | _RUBY_VENDORDIR!= ${_RUBY_CONFIG} 'puts C["vendordir"]' | ||||
.else | .else | ||||
RUBY?= ${LOCALBASE}/bin/${RUBY_NAME} | RUBY?= ${LOCALBASE}/bin/ruby${RUBY_SUFFIX} | ||||
.if defined(RUBY_VER) | .if defined(RUBY_VER) | ||||
# When adding a version, please keep the comment in | # When adding a version, please keep the comment in | ||||
Context not available. | |||||
# Other versions | # Other versions | ||||
# | # | ||||
IGNORE= Only ruby 2.4, 2.5 and 2.6 are supported | IGNORE= Only ruby 2.4, 2.5 and 2.6 are supported | ||||
_INVALID_RUBY_VER= 1 | _INVALID_RUBY_VER= ${RUBY_VER} | ||||
. endif | . endif | ||||
.endif # defined(RUBY_VER) | .endif # defined(RUBY_VER) | ||||
Context not available. |