gentoo/qt — pull request #65 by xhochy (2014-07-02 18:19:02+00:00)
Title: [eclasse] Store original qconfig.pri from qtcore

This is a first step to fix https://bugs.gentoo.org/show_bug.cgi?id=510556 along with https://github.com/gentoo/qt/pull/45

Instead of overwriting qconfig.pri always, let qtcore install qconfig.pri as qconfig.pri.orig and generate qconfig.pri from qconfig.pri.orig and the files gentoo/*-qconfig.pri. This ensures that the final qconfig.pri only contains flags that are provided by currently installed packages independent of previous installations.

There are two "flaws" I have not enough Gentoo-specific knowledge to solve them:

* If you re-emerge another qt5 package before qtcore is the next time emerged, qconfig.pri.orig is generated and not owned by any package. Thus an upcoming qtcore:5 installation will complain about the conflicting file.

* I'm not sure if `cp -p` is the correct way to copy files in ebuilds. I did not find the relevant part in the devmanual.