commit:     e8043452c212e25eaf8ba485112eceee66c59091
Author:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 10 02:56:51 2014 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Mon Nov 10 02:58:54 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=e8043452

[dev-qt/qtcore:4] Move qconfig.h sed to qt4-build-multilib.eclass

---
 dev-qt/qtcore/qtcore-4.8.6.ebuild    | 14 --------------
 dev-qt/qtcore/qtcore-4.8.9999.ebuild | 14 --------------
 eclass/qt4-build-multilib.eclass     | 20 ++++++++++++++++++--
 3 files changed, 18 insertions(+), 30 deletions(-)

diff --git a/dev-qt/qtcore/qtcore-4.8.6.ebuild 
b/dev-qt/qtcore/qtcore-4.8.6.ebuild
index 841e740..a3a0370 100644
--- a/dev-qt/qtcore/qtcore-4.8.6.ebuild
+++ b/dev-qt/qtcore/qtcore-4.8.6.ebuild
@@ -107,19 +107,5 @@ multilib_src_install_all() {
        dodir "${QT4_DATADIR#${EPREFIX}}"/mkspecs/gentoo
        mv "${D}${QT4_DATADIR}"/mkspecs/{qconfig.pri,gentoo/} || die
 
-       if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]]; then
-               # Framework hacking
-               # TODO: do this better
-               sed -i -e '1i #include <QtCore/Gentoo/gentoo-qconfig.h>\n' \
-                       "${D}${QT4_LIBDIR}"/QtCore.framework/Headers/qconfig.h \
-                       || die "sed for qconfig.h failed"
-               dosym "${QT4_HEADERDIR#${EPREFIX}}"/Gentoo \
-                       
"${QT4_LIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo
-       else
-               sed -i -e '1i #include <Gentoo/gentoo-qconfig.h>\n' \
-                       "${D}${QT4_HEADERDIR}"/Qt{,Core}/qconfig.h \
-                       || die "sed for qconfig.h failed"
-       fi
-
        keepdir "${QT4_SYSCONFDIR#${EPREFIX}}"
 }

diff --git a/dev-qt/qtcore/qtcore-4.8.9999.ebuild 
b/dev-qt/qtcore/qtcore-4.8.9999.ebuild
index 841e740..a3a0370 100644
--- a/dev-qt/qtcore/qtcore-4.8.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-4.8.9999.ebuild
@@ -107,19 +107,5 @@ multilib_src_install_all() {
        dodir "${QT4_DATADIR#${EPREFIX}}"/mkspecs/gentoo
        mv "${D}${QT4_DATADIR}"/mkspecs/{qconfig.pri,gentoo/} || die
 
-       if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]]; then
-               # Framework hacking
-               # TODO: do this better
-               sed -i -e '1i #include <QtCore/Gentoo/gentoo-qconfig.h>\n' \
-                       "${D}${QT4_LIBDIR}"/QtCore.framework/Headers/qconfig.h \
-                       || die "sed for qconfig.h failed"
-               dosym "${QT4_HEADERDIR#${EPREFIX}}"/Gentoo \
-                       
"${QT4_LIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo
-       else
-               sed -i -e '1i #include <Gentoo/gentoo-qconfig.h>\n' \
-                       "${D}${QT4_HEADERDIR}"/Qt{,Core}/qconfig.h \
-                       || die "sed for qconfig.h failed"
-       fi
-
        keepdir "${QT4_SYSCONFDIR#${EPREFIX}}"
 }

diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass
index d677ae5..eae348f 100644
--- a/eclass/qt4-build-multilib.eclass
+++ b/eclass/qt4-build-multilib.eclass
@@ -409,8 +409,9 @@ qt4_multilib_src_install() {
        qt4_foreach_target_subdir emake INSTALL_ROOT="${D}" install
 
        if [[ ${PN} == qtcore ]]; then
-               einfo "Running emake INSTALL_ROOT=${D} install_{mkspecs,qmake}"
-               emake INSTALL_ROOT="${D}" install_{mkspecs,qmake}
+               set -- emake INSTALL_ROOT="${D}" install_{mkspecs,qmake}
+               einfo "Running $*"
+               "$@"
 
                # install qtchooser configuration file
                cat > "${T}/qt4-${CHOST}.conf" <<-_EOF_
@@ -438,6 +439,21 @@ qt4_multilib_src_install() {
 }
 
 qt4_multilib_src_install_all() {
+       if [[ ${PN} == qtcore ]]; then
+               # include gentoo-qconfig.h at the beginning of 
Qt{,Core}/qconfig.h
+               if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]]; then
+                       sed -i -e '1i #include 
<QtCore/Gentoo/gentoo-qconfig.h>\n' \
+                               
"${D}${QT4_LIBDIR}"/QtCore.framework/Headers/qconfig.h \
+                               || die "sed failed (qconfig.h)"
+                       dosym "${QT4_HEADERDIR#${EPREFIX}}"/Gentoo \
+                               
"${QT4_LIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo
+               else
+                       sed -i -e '1i #include <Gentoo/gentoo-qconfig.h>\n' \
+                               "${D}${QT4_HEADERDIR}"/Qt{,Core}/qconfig.h \
+                               || die "sed failed (qconfig.h)"
+               fi
+       fi
+
        # install private headers of a few modules
        if has ${PN} qtcore qtdeclarative qtgui qtscript; then
                local moduledir=${PN#qt}

Reply via email to