I filed a related bug last year due to a hardcoded Qt path in an ebuild. Dan Armak made a comment (http://bugs.gentoo.org/show_bug.cgi?id=7097#c2), where accepted the request, but wasn't happy about it because of future generations of Qt. I now had an idea. Why not split the Qt and also the KDE paths into a variable segment and a version segment. One could then put a variable in e.g. make.conf that says something like "QTBASE=/opt/qt" and the related line in the ebuild would read something like "QTDIR=$QTBASE/$QTVERSION". The default would be "QTBASE=/usr" and "KDEBASE=/usr" so that nothing changes for people who don't want to customize. I'd be happy if it would be possible to implement this. Reproducible: Always Steps to Reproduce:
I've implemented the possibility to use other "root directories" for QT and KDE. Please test the kde-functions.eclass and qt-3.1.2-r3.ebuild to see if it works as I intended.
Created attachment 10965 [details] kde-functions.eclass uses the new variable KDEROOT in /etc/make.conf
Created attachment 10966 [details] qt-3.1.2-r3.ebuild uses the new variable QTROOT in /etc/make.conf
I'm looking into the possibility of making qt and kde use pkg-config to amke this stuf truly generic and forget about it once and for all...
Created attachment 11085 [details] qt-3.1.2-r3.ebuild: now uses a pkgconfig file to set the prefix
Created attachment 11086 [details] pkgconfig file
Created attachment 11087 [details] qt-3.1.2-r3.ebuild: corrected a typo
Created attachment 11096 [details] pkgconfig file: added a mandatory dummy version field
After the correction of the nasty bug in the qt.pc file, Qt gets installed correctly.
Could you edit it so that the pkg-config uses the version of qt to get the prefix (including version part). A query would then be: pkg-config --prefix qt --maxversion=3.99.99 --atleastversion=3. This way things can work even when different versions exist at different locations
I've searched around the net a bit, but as far as I could find out, you can't let a variable depend on a version. I think the current solution is a good one. One the one hand you can customize the root prefix of your Qt installations and on the other hand you take away the need of altering ebuilds. Thanks Dan for bringing up the idea of using pkgconfig.
Ok, I was under the impression that pkg-config could handle multiple simultaneous versions.
QT 4 will live in /usr (not /usr/qt/4), and presumably qt5 will be able to live in the same directory with it. For general relocation functionality look to the pathspec stuff. Is any part of this bug still relevant?
The Qt part of this bug will be irrelevant by the time Qt 4 comes out. The KDE part is still relevant, but since I'm personally not happy about my own solution anymore, this bug can be closed. Let's hope the KDE developers decide to use the /usr hierarchy in the same way as Trolltech. :)
Agreed.