Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 120116 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/eclass/qt3.eclass (-19 / +29 lines)
Lines 1-22 Link Here
1
# Copyright 2005 Gentoo Foundation
1
# Copyright 2005 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.30 2007/08/02 20:04:40 carlo Exp $
3
# $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.30 2007/08/02 20:04:40 carlo Exp $
4
#
5
# Author Caleb Tennis <caleb@gentoo.org>
6
#
7
# This eclass is simple.  Inherit it, and in your depend, do something like this:
8
#
9
# DEPEND="$(qt_min_version 3.1)"
10
#
11
# and it handles the rest for you
12
#
13
# Caveats:
14
#
15
# Currently, the ebuild assumes that a minimum version of Qt3 is NOT satisfied by Qt4
16
4
17
inherit toolchain-funcs versionator
5
# @ECLASS: qt3.eclass
6
# @MAINTAINER:
7
# Caleb Tennis <caleb@gentoo.org>
8
# @BLURB:
9
# Eclass for Qt3 packages
10
# @DESCRIPTION:
11
# This eclass contains various functions that may be useful
12
# when dealing with packages using Qt3 libraries.
18
13
19
IUSE="${IUSE}"
14
inherit toolchain-funcs versionator
20
15
21
QTPKG="x11-libs/qt-"
16
QTPKG="x11-libs/qt-"
22
QT3MAJORVERSIONS="3.3 3.2 3.1 3.0"
17
QT3MAJORVERSIONS="3.3 3.2 3.1 3.0"
Lines 26-36 Link Here
26
	QTDIR="/usr/qt/3"
21
	QTDIR="/usr/qt/3"
27
fi
22
fi
28
23
29
PATH="${QTDIR}/bin:${PATH}"
30
31
addwrite "${QTDIR}/etc/settings"
24
addwrite "${QTDIR}/etc/settings"
32
addpredict "${QTDIR}/etc/settings"
25
addpredict "${QTDIR}/etc/settings"
33
26
27
# @FUNCTION: qt_min_version
28
# @USAGE: [minimum version]
29
# @DESCRIPTION:
30
# This function is simple.  In your depend, do something like this:
31
# DEPEND="$(qt_min_version 3.1)"
32
# and it handles the rest for you. Currently, the eclass assumes
33
# that a minimum version of Qt3 is not satisfied by Qt4.
34
qt_min_version() {
34
qt_min_version() {
35
	local list=$(qt_min_version_list "$@")
35
	local list=$(qt_min_version_list "$@")
36
	if [[ ${list%% *} == "${list}" ]]; then
36
	if [[ ${list%% *} == "${list}" ]]; then
Lines 66-81 Link Here
66
	echo ${VERSIONS}
66
	echo ${VERSIONS}
67
}
67
}
68
68
69
# @FUNCTION: eqmake3
70
# @USAGE: [.pro file] [additional parameters to qmake]
71
# @MAINTAINER:
72
# Przemyslaw Maciag <troll@gentoo.org>
73
# Davide Pesavento <davidepesa@gmail.com>
74
# @DESCRIPTION:
75
# Runs qmake on the specified .pro file (defaults to
76
# ${PN}.pro if eqmake3 was called with no argument).
77
# Additional parameters are passed unmodified to qmake.
69
eqmake3() {
78
eqmake3() {
70
	local LOGFILE="${T}/qmake-$$.out"
79
	local LOGFILE="${T}/qmake-$$.out"
71
	local projprofile="${1}"
80
	local projprofile="${1}"
72
	[ -z ${projprofile} ] && projprofile="${PN}.pro"
81
	[[ -z ${projprofile} ]] && projprofile="${PN}.pro"
73
	shift 1
82
	shift 1
74
83
75
	ebegin "Processing qmake ${projprofile}"
84
	ebegin "Processing qmake ${projprofile}"
76
85
77
	# file exists?
86
	# file exists?
78
	if [ ! -f ${projprofile} ]; then
87
	if [[ ! -f ${projprofile} ]]; then
79
		echo
88
		echo
80
		eerror "Project .pro file \"${projprofile}\" does not exists"
89
		eerror "Project .pro file \"${projprofile}\" does not exists"
81
		eerror "qmake cannot handle non-existing .pro files"
90
		eerror "qmake cannot handle non-existing .pro files"
Lines 101-106 Link Here
101
	fi
110
	fi
102
111
103
	${QTDIR}/bin/qmake ${projprofile} \
112
	${QTDIR}/bin/qmake ${projprofile} \
113
		QTDIR=${QTDIR} \
104
		QMAKE=${QTDIR}/bin/qmake \
114
		QMAKE=${QTDIR}/bin/qmake \
105
		QMAKE_CC=$(tc-getCC) \
115
		QMAKE_CC=$(tc-getCC) \
106
		QMAKE_CXX=$(tc-getCXX) \
116
		QMAKE_CXX=$(tc-getCXX) \
Lines 120-126 Link Here
120
	eend ${result}
130
	eend ${result}
121
131
122
	# was qmake successful?
132
	# was qmake successful?
123
	if [ ${result} -ne 0 ]; then
133
	if [[ ${result} -ne 0 ]]; then
124
		echo
134
		echo
125
		eerror "Running qmake on \"${projprofile}\" has failed"
135
		eerror "Running qmake on \"${projprofile}\" has failed"
126
		echo
136
		echo

Return to bug 120116