diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 279ece28e1d..eb7cfdec977 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -198,21 +198,7 @@ qt5-build_src_prepare() { sed -i -e "/Creating qmake/i if [ '!' -e \"\$outpath/bin/qmake\" ]; then" \ -e '/echo "Done."/a fi' configure || die "sed failed (skip qmake bootstrap)" - # Respect CC, CXX, *FLAGS, MAKEOPTS and EXTRA_EMAKE when bootstrapping qmake - sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s|)| \ - ${MAKEOPTS} ${EXTRA_EMAKE} 'CC=$(tc-getCC)' 'CXX=$(tc-getCXX)' \ - 'QMAKE_CFLAGS=${CFLAGS}' 'QMAKE_CXXFLAGS=${CXXFLAGS}' 'QMAKE_LFLAGS=${LDFLAGS}'&|" \ - -e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \ - configure || die "sed failed (respect env for qmake build)" - sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \ - qmake/Makefile.unix || die "sed failed (CPPFLAGS for qmake build)" - - # Respect CXX in bsymbolic_functions, fvisibility, precomp, and a few other tests - sed -i -e "/^QMAKE_CONF_COMPILER=/ s:=.*:=\"$(tc-getCXX)\":" \ - configure || die "sed failed (QMAKE_CONF_COMPILER)" - - # Respect build variables in configure tests (bug #639494) - sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die + sed -i -e 's/EXTRA_CXXFLAGS/CONFIG_CXXFLAGS/' -e 's/EXTRA_LFLAGS/CONFIG_LFLAGS/' configure || die fi [[ -n ${QT5_KDEPATCHSET_REV} ]] && eapply "${WORKDIR}/${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}" @@ -240,6 +226,11 @@ qt5-build_src_configure() { # Runs emake in the target directories. qt5-build_src_compile() { qt5_foreach_target_subdir emake + if [[ ${PN} == qtcore ]]; then + pushd "${QT5_BUILD_DIR}" >/dev/null || die + emake sub-qmake-qmake-aux-pro + popd >/dev/null || die + fi } # @FUNCTION: qt5-build_src_test @@ -530,6 +521,8 @@ qt5_base_configure() { # setup toolchain variables used by configure tc-export AR CC CXX OBJDUMP RANLIB STRIP export LD="$(tc-getCXX)" + export EXTRA_CXXFLAGS="${CXXFLAGS}" + export EXTRA_LFLAGS="${LDFLAGS}" # bug 633838 unset QMAKESPEC XQMAKESPEC QMAKEPATH QMAKEFEATURES @@ -687,6 +680,8 @@ qt5_base_configure() { "${myconf[@]}" ) + eval "conf+=($(qt5_qmake_args))" + pushd "${QT5_BUILD_DIR}" >/dev/null || die einfo "Configuring with: ${conf[@]}"