Now that Qt5 is in portage (masked of course) and is slotted with Qt4. First of all, thanks for the hard work to make this happen. One of the questions becomes how does a developer using Qt choose switch which they want to develop with. Currently, Qt5 binaries are installed in /usr/lib64/qt5/bin. So if I want to compile a personal project using Qt5, I use /usr/lib64/qt5/bin/qmake and be on my way. This is (only slightly) inconvenient because qmake for Qt5 is not in my PATH. However, I really like the approach gentoo has used with python. My system has: /usr/bin/python3.3 /usr/bin/python3 -> /usr/bin/python3.3 /usr/bin/python2.7 /usr/bin/python2 -> /usr/bin/python2.7 /usr/bin/python -> /usr/bin/python-wrapper python-wrapper being smart enough to run the correct version of python depending on eselect preference. So what I would propose is a scheme where Qt4 installs qmake as qmake4 and so on for the other Qt4 binaries in the PATH and Qt5 installs qmake as qmake5 and so on for the other Qt5 binaries. And then we could have an eselect for toggling which is run by using the non-suffixed name. I actually think Qt's configure system allows you to specify a suffix for all binaries produced, which would perfectly match this use case. This has several benefits: 1. ebuilds can just hard code calling qmake5 for Qt5 builds and they'll just work despite user preference 2. devlopers can just run qmake5 or qmake4 directly for quick and dirty tests if there code will compiled with both (my primary use case). 3. the tools will still be available under the conventional names for the average user. In fact, if they just emerged Qt due to dependencies and don't really care, they won't even be effected at all. Thanks. Reproducible: Always
There's an upstream tool called qtchooser that does exactly this. Well... almost, because switching the default has to be done manually (by changing a symlink in /etc/xdg/qtchooser), but I'm not sure that I want to write an eselect module just for that. Not yet at least, qt4 will be the default for quite a while anyway.