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

Collapse All | Expand All

(-)a/eclass/qt5-build.eclass (-45 / +12 lines)
Lines 192-223 qt5-build_src_prepare() { Link Here
192
	fi
192
	fi
193
193
194
	if [[ ${QT5_MODULE} == qtbase ]]; then
194
	if [[ ${QT5_MODULE} == qtbase ]]; then
195
		qt5_symlink_tools_to_build_dir
195
		sed -i -e 's/EXTRA_CXXFLAGS/CONFIG_CXXFLAGS/' -e 's/EXTRA_LFLAGS/CONFIG_LFLAGS/' configure || die
196
197
		# Avoid unnecessary qmake recompilations
198
		sed -i -e "/Creating qmake/i if [ '!' -e \"\$outpath/bin/qmake\" ]; then" \
199
			-e '/echo "Done."/a fi' configure || die "sed failed (skip qmake bootstrap)"
200
201
		# Respect CC, CXX, *FLAGS, MAKEOPTS and EXTRA_EMAKE when bootstrapping qmake
202
		sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s|)| \
203
			${MAKEOPTS} ${EXTRA_EMAKE} 'CC=$(tc-getCC)' 'CXX=$(tc-getCXX)' \
204
			'QMAKE_CFLAGS=${CFLAGS}' 'QMAKE_CXXFLAGS=${CXXFLAGS}' 'QMAKE_LFLAGS=${LDFLAGS}'&|" \
205
			-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
206
			configure || die "sed failed (respect env for qmake build)"
207
		sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \
208
			qmake/Makefile.unix || die "sed failed (CPPFLAGS for qmake build)"
209
210
		# Respect CXX in bsymbolic_functions, fvisibility, precomp, and a few other tests
211
		sed -i -e "/^QMAKE_CONF_COMPILER=/ s:=.*:=\"$(tc-getCXX)\":" \
212
			configure || die "sed failed (QMAKE_CONF_COMPILER)"
213
214
		# Respect build variables in configure tests (bug #639494)
215
		sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die
216
	fi
196
	fi
217
197
218
	[[ -n ${QT5_KDEPATCHSET_REV} ]] && eapply "${WORKDIR}/${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}"
198
	[[ -n ${QT5_KDEPATCHSET_REV} ]] && eapply "${WORKDIR}/${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}"
219
199
220
	default
200
	default
201
202
	mkdir "${QT5_BUILD_DIR}"
221
}
203
}
222
204
223
# @FUNCTION: qt5-build_src_configure
205
# @FUNCTION: qt5-build_src_configure
Lines 240-245 qt5-build_src_configure() { Link Here
240
# Runs emake in the target directories.
222
# Runs emake in the target directories.
241
qt5-build_src_compile() {
223
qt5-build_src_compile() {
242
	qt5_foreach_target_subdir emake
224
	qt5_foreach_target_subdir emake
225
	if [[ ${PN} == qtcore ]]; then
226
		pushd "${QT5_BUILD_DIR}" >/dev/null || die
227
		emake sub-qmake-qmake-aux-pro
228
		popd >/dev/null || die
229
	fi
243
}
230
}
244
231
245
# @FUNCTION: qt5-build_src_test
232
# @FUNCTION: qt5-build_src_test
Lines 498-527 qt5_foreach_target_subdir() { Link Here
498
	done
485
	done
499
}
486
}
500
487
501
# @FUNCTION: qt5_symlink_tools_to_build_dir
502
# @INTERNAL
503
# @DESCRIPTION:
504
# Symlinks qmake and a few other tools to QT5_BUILD_DIR,
505
# so that they can be used when building other modules.
506
qt5_symlink_tools_to_build_dir() {
507
	local tool= tools=()
508
	if [[ ${PN} != qtcore ]]; then
509
		tools+=(qmake moc rcc qlalr)
510
		[[ ${PN} != qtdbus ]] && tools+=(qdbuscpp2xml qdbusxml2cpp)
511
		[[ ${PN} != qtwidgets ]] && tools+=(uic)
512
	fi
513
514
	mkdir -p "${QT5_BUILD_DIR}"/bin || die
515
	pushd "${QT5_BUILD_DIR}"/bin >/dev/null || die
516
517
	for tool in "${tools[@]}"; do
518
		[[ -e ${QT5_BINDIR}/${tool} ]] || continue
519
		ln -s "${QT5_BINDIR}/${tool}" . || die "failed to symlink ${tool}"
520
	done
521
522
	popd >/dev/null || die
523
}
524
525
# @FUNCTION: qt5_base_configure
488
# @FUNCTION: qt5_base_configure
526
# @INTERNAL
489
# @INTERNAL
527
# @DESCRIPTION:
490
# @DESCRIPTION:
Lines 530-535 qt5_base_configure() { Link Here
530
	# setup toolchain variables used by configure
493
	# setup toolchain variables used by configure
531
	tc-export AR CC CXX OBJDUMP RANLIB STRIP
494
	tc-export AR CC CXX OBJDUMP RANLIB STRIP
532
	export LD="$(tc-getCXX)"
495
	export LD="$(tc-getCXX)"
496
	export EXTRA_CXXFLAGS="${CXXFLAGS}"
497
	export EXTRA_LFLAGS="${LDFLAGS}"
533
498
534
	# bug 633838
499
	# bug 633838
535
	unset QMAKESPEC XQMAKESPEC QMAKEPATH QMAKEFEATURES
500
	unset QMAKESPEC XQMAKESPEC QMAKEPATH QMAKEFEATURES
Lines 687-692 qt5_base_configure() { Link Here
687
		"${myconf[@]}"
652
		"${myconf[@]}"
688
	)
653
	)
689
654
655
	eval "conf+=($(qt5_qmake_args))"
656
690
	pushd "${QT5_BUILD_DIR}" >/dev/null || die
657
	pushd "${QT5_BUILD_DIR}" >/dev/null || die
691
658
692
	einfo "Configuring with: ${conf[@]}"
659
	einfo "Configuring with: ${conf[@]}"

Return to bug 649420