Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 522646 - app-eselect/eselect-qt - switch between SLOTted versions of the Qt build tools
Summary: app-eselect/eselect-qt - switch between SLOTted versions of the Qt build tools
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on: 519266
Blocks:
  Show dependency tree
 
Reported: 2014-09-12 13:31 UTC by Evan Teran
Modified: 2017-12-03 05:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evan Teran 2014-09-12 13:31:00 UTC
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
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2014-09-12 13:54:52 UTC
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.