Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.ruby.mk
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
# (default: setup.rb). | # (default: setup.rb). | ||||
# USE_RUBY_RDOC - Says that the port uses rdoc to generate documents. | # USE_RUBY_RDOC - Says that the port uses rdoc to generate documents. | ||||
# RUBY_REQUIRE - Set to a Ruby expression to evaluate before building | # RUBY_REQUIRE - Set to a Ruby expression to evaluate before building | ||||
# the port. The constant "Ruby" is set to the integer | # the port. The constant "Ruby" is set to the integer | ||||
# version number of ruby, and the result of the | # version number of ruby, and the result of the | ||||
# 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] | ||||
# | # | ||||
# RUBY_PKGNAMEPREFIX - Common PKGNAMEPREFIX for ruby ports | # RUBY_PKGNAMEPREFIX - Common PKGNAMEPREFIX for ruby ports | ||||
# (default: ruby${RUBY_SUFFIX}-) | # (default: ruby${RUBY_SUFFIX}-) | ||||
# RUBY_RELVERSION - Full version of ruby without preview/beta suffix in | # RUBY_RELVERSION - Full version of ruby without preview/beta suffix in | ||||
# the form of `x.y.z' (see below for current value). | # the form of `x.y.z' (see below for current value). | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
# | # | ||||
.if defined(RUBY_DEFAULT_VER) | .if defined(RUBY_DEFAULT_VER) | ||||
WARNING+= "RUBY_DEFAULT_VER is defined, consider using DEFAULT_VERSIONS=ruby=${RUBY_DEFAULT_VER} instead" | WARNING+= "RUBY_DEFAULT_VER is defined, consider using DEFAULT_VERSIONS=ruby=${RUBY_DEFAULT_VER} instead" | ||||
.endif | .endif | ||||
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//:C/(.)/\1.\2/} | |||||
.endif | |||||
.if defined(USE_RUBY_FLAVORS) | |||||
_VALID_RUBY_VERSIONS= 2.2 2.3 2.4 | |||||
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}) | ||||
IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist. Please specify an already installed ruby executable | IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist. Please specify an already installed ruby executable | ||||
.endif | .endif | ||||
_RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; puts "ok" ; rescue LoadError; puts "error"; end' | _RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; puts "ok" ; rescue LoadError; puts "error"; end' | ||||
.if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok" | .if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok" | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |