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 (-6 / +82 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 eutils
16
inherit eutils multilib toolchain-funcs versionator
17
18
IUSE="${IUSE} debug"
17
19
18
QTPKG="x11-libs/qt-"
20
QTPKG="x11-libs/qt-"
19
QT4MAJORVERSIONS="4.3 4.2 4.1 4.0"
21
QT4MAJORVERSIONS="4.3 4.2 4.1 4.0"
Lines 51-62 Link Here
51
	echo "${VERSIONS}"
53
	echo "${VERSIONS}"
52
}
54
}
53
55
54
EXPORT_FUNCTIONS pkg_setup
55
56
qt4_pkg_setup() {
56
qt4_pkg_setup() {
57
	for x in $QT4_BUILT_WITH_USE_CHECK; do
57
	for x in ${QT4_BUILT_WITH_USE_CHECK}; do
58
		if ! built_with_use =x11-libs/qt-4* $x; then
58
		if ! built_with_use =x11-libs/qt-4* ${x}; then
59
			die "This package requires Qt4 to be built with the ${x} use flag."
59
			die "This package requires Qt4 to be built with the '${x}' USE flag."
60
		fi
60
		fi
61
	done
61
	done
62
63
	if use debug && ! built_with_use =x11-libs/qt-4* debug; then
64
		ewarn
65
		ewarn "You are trying to compile ${PN} package with USE=\"debug\""
66
		ewarn "while qt4 is build without this particular flag."
67
		ewarn "It will not work."
68
		ewarn
69
		ewarn "Possible solutions to this problem are:"
70
		ewarn "a) install package ${PN} without debug USE flag"
71
		ewarn "b) re-emerge qt4 with debug USE flag enabled"
72
		ewarn
73
		die "can't emerge ${PN} with debug USE flag"
74
	fi
62
}
75
}
76
77
eqmake4() {
78
	local LOGFILE="${T}/qmake-$$.out"
79
	local projprofile="${1}"
80
	[ -z ${projprofile} ] && projprofile="${PN}.pro"
81
	shift 1
82
83
	ebegin "Processing qmake ${projprofile}"
84
85
	# file exists?
86
	if [ ! -f ${projprofile} ]; then
87
		echo
88
		eerror "Project .pro file \"${projprofile}\" does not exists"
89
		eerror "qmake cannot handle non-existing .pro files"
90
		echo
91
		eerror "This shouldn't happen - please send a bug report to bugs.gentoo.org"
92
		echo
93
		die "Project file not found in ${PN} sources"
94
	fi
95
96
	echo >> ${LOGFILE}
97
	echo "******  qmake ${projprofile}  ******" >> ${LOGFILE}
98
	echo >> ${LOGFILE}
99
100
	# as a workaround for broken qmake, put everything into file
101
	if use debug; then
102
		echo -e "$CONFIG -= release\nCONFIG += no_fixpath debug" >> ${projprofile}
103
	else
104
		echo -e "$CONFIG -= debug\nCONFIG += no_fixpath release" >> ${projprofile}
105
	fi
106
107
	/usr/bin/qmake ${projprofile} \
108
		QTDIR=/usr/$(get_libdir) \
109
		QMAKE=/usr/bin/qmake \
110
		QMAKE_CC=$(tc-getCC) \
111
		QMAKE_CXX=$(tc-getCXX) \
112
		QMAKE_LINK=$(tc-getCXX) \
113
		QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
114
		QMAKE_CFLAGS_DEBUG="${CFLAGS}" \
115
		QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
116
		QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS}" \
117
		QMAKE_LFLAGS_RELEASE="${LDFLAGS}" \
118
		QMAKE_LFLAGS_DEBUG="${LDFLAGS}" \
119
		QMAKE_RPATH= \
120
		${@} >> ${LOGFILE} 2>&1
121
122
	local result=$?
123
	eend ${result}
124
125
	# was qmake successful?
126
	if [ ${result} -ne 0 ]; then
127
		echo
128
		eerror "Running qmake on \"${projprofile}\" has failed"
129
		echo
130
		eerror "This shouldn't happen - please send a bug report to bugs.gentoo.org"
131
		echo
132
		die "qmake failed on ${projprofile}"
133
	fi
134
135
	return ${result}
136
}
137
138
EXPORT_FUNCTIONS pkg_setup

Return to bug 120116