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/qt4.eclass (-1 / +72 lines)
Lines 13-19 Link Here
13
# 08.16.06 - Renamed qt_min_* to qt4_min_* to avoid conflicts with the qt3 eclass.
13
# 08.16.06 - Renamed qt_min_* to qt4_min_* to avoid conflicts with the qt3 eclass.
14
#    - Caleb Tennis <caleb@gentoo.org>
14
#    - Caleb Tennis <caleb@gentoo.org>
15
15
16
inherit versionator
16
inherit eutils versionator
17
18
IUSE="${IUSE} debug"
17
19
18
QTPKG="x11-libs/qt-"
20
QTPKG="x11-libs/qt-"
19
QT4MAJORVERSIONS="4.1 4.0"
21
QT4MAJORVERSIONS="4.1 4.0"
Lines 50-52 Link Here
50
52
51
	echo "${VERSIONS}"
53
	echo "${VERSIONS}"
52
}
54
}
55
56
qt4_pkg_setup() {
57
	if use debug && ! built_with_use qt debug; then
58
		einfo
59
		einfo "You are trying to compile ${PN} package with active USE=\"debug\""
60
		einfo "while qt4 is build without this particular flag. It will not"
61
		einfo "work."
62
		einfo
63
		einfo "Possible solutions to this problem are:"
64
		einfo "a) install package ${PN} without debug USE flag"
65
		einfo "b) re-emerge qt4 with debug USE flag"
66
		einfo
67
68
		die "can't emerge ${PN} with debug USE flag"
69
	fi
70
}
71
72
eqmake() {
73
	local projprofile=""
74
	if [ -z $1 ]; then
75
		projprofile="${PN}.pro"
76
	else
77
		projprofile="${1}"
78
	fi;
79
80
	einfo "Processing qmake ${projprofile}"
81
82
	# file exists?
83
	if [[ ! -f ${projprofile} ]]; then
84
		echo
85
		eerror "Project pro file \"${projprofile}\" does not exists"
86
		eerror "qmake cannot handle the non-existing pro files"
87
		echo
88
		eerror "This shouldn't happen - send a bug report to bugs.gentoo.org"
89
		echo
90
		die "non existing pro file in ${PN} sources"
91
	fi;
92
93
	# as a workaround for broken qmake, put everything into file
94
	if use debug; then
95
		echo -e "$CONFIG -= release\nCONFIG += no_fixpath debug" >> ${projprofile}
96
	else
97
		echo -e "$CONFIG -= debug\nCONFIG += no_fixpath release" >> ${projprofile}
98
	fi;
99
100
	# any special qmake options should be passed as a second eqmake parameter
101
	/usr/bin/qmake ${projprofile} \
102
		QMAKE=/usr/bin/qmake \
103
		QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
104
		QMAKE_CFLAGS_DEBUG="${CFLAGS}" \
105
		QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
106
		QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS}" \
107
		QMAKE_RPATH= \
108
		${2}
109
110
	# successfull qmake?
111
	if [[ $? -ne 0 ]]; then
112
		echo
113
		eerror "Running qmake on \"${projprofile}\" has failed"
114
		echo
115
		eerror "This shouldn't happen - send a bug report to bugs.gentoo.org"
116
		echo
117
		die "qmake has failed on ${projprofile}"
118
	fi;
119
120
	eend 0
121
}
122
123
EXPORT_FUNCTIONS pkg_setup

Return to bug 120116