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 (-17 / +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 31-36 Link Here
31
addwrite "${QTDIR}/etc/settings"
26
addwrite "${QTDIR}/etc/settings"
32
addpredict "${QTDIR}/etc/settings"
27
addpredict "${QTDIR}/etc/settings"
33
28
29
# @FUNCTION: qt_min_version
30
# @USAGE: [minimum version]
31
# @DESCRIPTION:
32
# This function is simple.  In your depend, do something like this:
33
# DEPEND="$(qt_min_version 3.1)"
34
# and it handles the rest for you. Currently, the eclass assumes
35
# that a minimum version of Qt3 is not satisfied by Qt4.
34
qt_min_version() {
36
qt_min_version() {
35
	local list=$(qt_min_version_list "$@")
37
	local list=$(qt_min_version_list "$@")
36
	if [[ ${list%% *} == "${list}" ]]; then
38
	if [[ ${list%% *} == "${list}" ]]; then
Lines 66-81 Link Here
66
	echo ${VERSIONS}
68
	echo ${VERSIONS}
67
}
69
}
68
70
71
# @FUNCTION: eqmake3
72
# @USAGE: [.pro file] [additional parameters to qmake]
73
# @MAINTAINER:
74
# Przemyslaw Maciag <troll@gentoo.org>
75
# Davide Pesavento <davidepesa@gmail.com>
76
# @DESCRIPTION:
77
# Runs qmake on the specified .pro file (defaults to
78
# ${PN}.pro if eqmake3 was called with no argument).
79
# Additional parameters are passed unmodified to qmake.
69
eqmake3() {
80
eqmake3() {
70
	local LOGFILE="${T}/qmake-$$.out"
81
	local LOGFILE="${T}/qmake-$$.out"
71
	local projprofile="${1}"
82
	local projprofile="${1}"
72
	[ -z ${projprofile} ] && projprofile="${PN}.pro"
83
	[[ -z ${projprofile} ]] && projprofile="${PN}.pro"
73
	shift 1
84
	shift 1
74
85
75
	ebegin "Processing qmake ${projprofile}"
86
	ebegin "Processing qmake ${projprofile}"
76
87
77
	# file exists?
88
	# file exists?
78
	if [ ! -f ${projprofile} ]; then
89
	if [[ ! -f ${projprofile} ]]; then
79
		echo
90
		echo
80
		eerror "Project .pro file \"${projprofile}\" does not exists"
91
		eerror "Project .pro file \"${projprofile}\" does not exists"
81
		eerror "qmake cannot handle non-existing .pro files"
92
		eerror "qmake cannot handle non-existing .pro files"
Lines 101-106 Link Here
101
	fi
112
	fi
102
113
103
	${QTDIR}/bin/qmake ${projprofile} \
114
	${QTDIR}/bin/qmake ${projprofile} \
115
		QTDIR=${QTDIR} \
104
		QMAKE=${QTDIR}/bin/qmake \
116
		QMAKE=${QTDIR}/bin/qmake \
105
		QMAKE_CC=$(tc-getCC) \
117
		QMAKE_CC=$(tc-getCC) \
106
		QMAKE_CXX=$(tc-getCXX) \
118
		QMAKE_CXX=$(tc-getCXX) \
Lines 120-126 Link Here
120
	eend ${result}
132
	eend ${result}
121
133
122
	# was qmake successful?
134
	# was qmake successful?
123
	if [ ${result} -ne 0 ]; then
135
	if [[ ${result} -ne 0 ]]; then
124
		echo
136
		echo
125
		eerror "Running qmake on \"${projprofile}\" has failed"
137
		eerror "Running qmake on \"${projprofile}\" has failed"
126
		echo
138
		echo

Return to bug 120116