summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2014-10-30 13:21:25 +0000
committerPacho Ramos <pacho@gentoo.org>2014-10-30 13:21:25 +0000
commite50a73b07ba6b8b9900fd330941e83bfbfa13d59 (patch)
tree65ae5e098a6d7906d80c2f4a4f80bcee3f59a793 /eclass/vala.eclass
parentsci-chemistry/apbs: Remove redundant python dir after installation (diff)
downloadhistorical-e50a73b07ba6b8b9900fd330941e83bfbfa13d59.tar.gz
historical-e50a73b07ba6b8b9900fd330941e83bfbfa13d59.tar.bz2
historical-e50a73b07ba6b8b9900fd330941e83bfbfa13d59.zip
Fix repoman warnings (#521980 by Arfrever Frehtes Taifersar Arahesis)
Diffstat (limited to 'eclass/vala.eclass')
-rw-r--r--eclass/vala.eclass16
1 files changed, 14 insertions, 2 deletions
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index e6872e01bffe..9fa24c7fd5c0 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vala.eclass,v 1.8 2014/05/04 06:13:55 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vala.eclass,v 1.9 2014/10/30 13:21:25 pacho Exp $
# @ECLASS: vala.eclass
# @MAINTAINER:
@@ -44,7 +44,19 @@ VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.24}
# Outputs a list of vala API versions from VALA_MAX_API_VERSION down to
# VALA_MIN_API_VERSION.
vala_api_versions() {
- eval "echo 0.{${VALA_MAX_API_VERSION#0.}..${VALA_MIN_API_VERSION#0.}..2}"
+ [[ ${VALA_MIN_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die "Invalid syntax of VALA_MIN_API_VERSION"
+ [[ ${VALA_MAX_API_VERSION} =~ ^0\.[[:digit:]]+$ ]] || die "Invalid syntax of VALA_MAX_API_VERSION"
+
+ local minimal_supported_minor_version minor_version
+
+ # Dependency atoms are not generated for Vala versions older than 0.${minimal_supported_minor_version}.
+ minimal_supported_minor_version="18"
+
+ for ((minor_version = ${VALA_MAX_API_VERSION#*.}; minor_version >= ${VALA_MIN_API_VERSION#*.}; minor_version = minor_version - 2)); do
+ if ((minor_version >= minimal_supported_minor_version)); then
+ echo "0.${minor_version}"
+ fi
+ done
}
# @FUNCTION: vala_depend