diff options
-rw-r--r-- | Mk/Uses/perl5.mk | 13 | ||||
-rw-r--r-- | Mk/bsd.default-versions.mk | 23 | ||||
-rw-r--r-- | Mk/bsd.ruby.mk | 8 |
3 files changed, 42 insertions, 2 deletions
diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk index 0024e4811294..aff1649ddd68 100644 --- a/Mk/Uses/perl5.mk +++ b/Mk/Uses/perl5.mk @@ -46,7 +46,18 @@ USE_PERL5?= run build PERL_VERSION!= perl -e 'printf "%vd\n", $$^V;' .endif .else -PERL_VERSION?= 5.14.4 +.include "${PORTSDIR}/Mk/bsd.default-versions.mk" +.if ${PERL5_DEFAULT} == 5.12 +PERL_VERSION= 5.12.5 +.elif ${PERL5_DEFAULT} == 5.14 +PERL_VERSION= 5.14.4 +.elif ${PERL5_DEFAULT} == 5.16 +PERL_VERSION= 5.16.3 +.elif ${PERL5_DEFAULT} == 5.18 +PERL_VERSION= 5.18.1 +.else +IGNORE= Invalid perl5 version ${PERL5_DEFAULT} +.endif .endif PERL_VER?= ${PERL_VERSION:C/\.[0-9]+$//} diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk new file mode 100644 index 000000000000..8233509067df --- /dev/null +++ b/Mk/bsd.default-versions.mk @@ -0,0 +1,23 @@ +# $FreeBSD$ +# +# MAINTAINER: ports@FreeBSD.org +# +# Handle the default versions for users chosable multi versions. +# +# It expects users to define DEFAULT_VERSIONS in there make.conf +# Syntax is the following: +# +# DEFAULT_VERSION= perl5=5.18 ruby=2.0 + +.if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) +_INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes + +.for lang in ${DEFAULT_VERSIONS} +_l= ${lang:C/=.*//g} +${_l:U}_DEFAULT= ${lang:C/.*=//g} +.endfor + +PERL5_DEFAULT?= 5.14 +RUBY_DEFAULT?= 1.9 + +.endif diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk index cdff2eea781b..53bc54af8c6a 100644 --- a/Mk/bsd.ruby.mk +++ b/Mk/bsd.ruby.mk @@ -137,7 +137,13 @@ Ruby_Include_MAINTAINER= ruby@FreeBSD.org # RUBY_ELISPDIR - Installation path for emacs lisp files. # -RUBY_DEFAULT_VER?= 1.9 +.include "${PORTSDIR}/Mk/bsd.default-versions.mk" + +.if defined(RUBY_DEFAULT_VER) +WARNING+= "Using RUBY_DEFAULT_VER in make.conf, consider using DEFAULT_VERSION=ruby=${RUBY_DEFAULT_VER}" +.endif + +RUBY_DEFAULT_VER?= ${RUBY_DEFAULT} RUBY_VER?= ${RUBY_DEFAULT_VER} |