summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2005-06-30 21:26:34 +0000
committerAron Griffis <agriffis@gentoo.org>2005-06-30 21:26:34 +0000
commit12e39624aa4bba6eeb5ed334a9896ddf6f1c0357 (patch)
treece420f24275f9e04c39b0cc1fd4cc8da3250e481 /eclass
parent#97542: version bump (diff)
downloadhistorical-12e39624aa4bba6eeb5ed334a9896ddf6f1c0357.tar.gz
historical-12e39624aa4bba6eeb5ed334a9896ddf6f1c0357.tar.bz2
historical-12e39624aa4bba6eeb5ed334a9896ddf6f1c0357.zip
syntax cleanups: prefer [[ ]], quote $@, coalesce case expression with |, die instead of echo (which would end up in DEPEND and never be seen by the user), use tabs instead of spaces, trim trailing w/s
Diffstat (limited to 'eclass')
-rw-r--r--eclass/qt.eclass36
1 files changed, 17 insertions, 19 deletions
diff --git a/eclass/qt.eclass b/eclass/qt.eclass
index 12fe71b987a8..d3ecd3f516c4 100644
--- a/eclass/qt.eclass
+++ b/eclass/qt.eclass
@@ -1,6 +1,6 @@
# Copyright 2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt.eclass,v 1.9 2005/06/30 13:53:07 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt.eclass,v 1.10 2005/06/30 21:26:34 agriffis Exp $
#
# Author Caleb Tennis <caleb@gentoo.org>
#
@@ -24,20 +24,20 @@ QT3VERSIONS="3.3.4-r5 3.3.4-r4 3.3.4-r3 3.3.4-r2 3.3.4-r1 3.3.4 3.3.3-r3 3.3.3-r
QT4VERSIONS="4.0.0"
qt_pkg_setup() {
- if has_version =x11-libs/qt-3*; then
- if [ ! $QTDIR ]; then
+ if has_version =x11-libs/qt-3*; then
+ if [[ -z $QTDIR ]]; then
QTDIR="/usr/qt/3"
fi
- [ -d "$QTDIR/etc/settings" ] && addwrite "$QTDIR/etc/settings"
- addpredict "$QTDIR/etc/settings"
+ [[ -d "$QTDIR/etc/settings" ]] && addwrite "$QTDIR/etc/settings"
+ addpredict "$QTDIR/etc/settings"
fi
}
qt_min_version() {
- echo -n "|| ( "
- qt_min_version_list $@
- echo " )"
+ echo "|| ("
+ qt_min_version_list "$@"
+ echo ")"
}
qt_min_version_list() {
@@ -45,30 +45,28 @@ qt_min_version_list() {
local VERSIONS=""
case $MINVER in
- 3) VERSIONS="=${QTPKG}3*";;
- 3.0) VERSIONS="=${QTPKG}3*";;
- 3.0.0) VERSIONS="=${QTPKG}3*";;
- 4) VERSIONS="=${QTPKG}4*";;
- 4.0) VERSIONS="=${QTPKG}4*";;
- 4.0.0) VERSIONS="=${QTPKG}4*";;
+ 3|3.0|3.0.0) VERSIONS="=${QTPKG}3*";;
+ 4|4.0|4.0.0) VERSIONS="=${QTPKG}4*";;
3*)
for x in $QT3VERSIONS; do
if $(version_is_at_least $MINVER $x); then
VERSIONS="${VERSIONS} =${QTPKG}${x}"
fi
done
- ;;
+ ;;
4*)
for x in $QT4VERSIONS; do
if $(version_is_at_least $MINVER $x); then
VERSIONS="${VERSIONS} =${QTPKG}${x}"
fi
done
- ;;
- *) echo "!!! error: qt_min_version called with invalid parameter: \"$1\", please report bug" && exit 1;;
+ ;;
+ *)
+ die "qt_min_version called with invalid parameter: \"$1\""
+ ;;
esac
-
- echo -n $VERSIONS
+
+ echo "$VERSIONS"
}
EXPORT_FUNCTIONS pkg_setup