1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

Introduce the one-true-way to handle multi version ports

This defines a new macros for end users!
DEFAULT_VERSIONS.
This macros is used to end-users to define what version they want to be
the default version for the whole ports tree (for ports allowing that)

Syntax is the following:
DEFAULT_VERSIONS=	perl5=5.18 ruby=2.0

Swith bsd.ruby.mk to use it[1], switch Uses/perl5.mk to use it[2]

If you are maintaining settable multi version port, please change it so
it uses DEFAULT_VERSIONS.

Reviewed by:	ruby (swills) [1], perl (az) [2]
Approved by:	ruby (swills) [1], perl (az) [2]
This commit is contained in:
Baptiste Daroussin 2013-09-19 08:16:43 +00:00
parent cb471dbbdc
commit 377fc0342d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=327602
3 changed files with 42 additions and 2 deletions

View File

@ -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]+$//}

View File

@ -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

View File

@ -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}