Opened 10 years ago
Last modified 9 years ago
#47294 new submission
port submission: qt_select
Reported by: | RJVB (René Bertin) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | michaelld (Michael Dickens), petrrr, drs@… | |
Port: | qt_select |
Description
I have been asked to provide a means to use port select
to chose a default Qt version if both Qt4 and Qt5 are installed. This functionality is already provided by port:qtchooser
(submitted), which is developped by one of the Qt developers and provides a way to override the default selection on the commandline (e.g. qmake -qt=qt5 ...
)
Still, for the sake of being exhaustive, here's port:qt_select
which works with the latest versions of my qt4-mac and qt5-mac-devel submissions . It conflicts with port:qtchooser
, of course.
Attachments (3)
Change History (14)
Changed 10 years ago by RJVB (René Bertin)
Changed 10 years ago by RJVB (René Bertin)
Changed 10 years ago by RJVB (René Bertin)
comment:1 Changed 10 years ago by RJVB (René Bertin)
comment:3 Changed 9 years ago by mouse07410 (Mouse)
Resurrecting this ticket - I seem unable to find qt_select. Only qt4_select. So what should I do if I'm using Qt5 and whatever comes next, not Qt4?
comment:4 Changed 9 years ago by RJVB (René Bertin)
I suppose that means my port proposal has never been incorporated. qt4_select
looks like an old port, a vestige from the days qt4-x11 still built.
Would exactly were you hoping to get from qt_select, since apparently you're only interested in Qt5?
comment:5 Changed 9 years ago by mouse07410 (Mouse)
Would exactly were you hoping to get from qt_select, since apparently you're only interested in Qt5?
I hoped for some automatic tool that brings qmake from its obscure location in /opt/local/libexec/whatever to something like /opt/local/bin.
Not that I can't do it manually (sudo ln -s), but it sounds weird that the port doesn't do it automatically (i.e., by itself).
comment:6 Changed 9 years ago by drs@…
I cannot seem to get "port select" to work for me with qt4_select. I don't really understand all of the details of how the selection mechanism is supposed to work, but I don't think it is working correctly. Below is what I tried... (I'm also trying to find a ports centric way to make the Qt binaries available in /opt/local/bin, e.g.)
bash$ port installed name:_select$ The following ports are currently installed: cython_select @0.1_0 (active) db_select @0.1_2 db_select @0.1_3 (active) gcc_select @0.1_8 (active) ipython_select @0.3_1 ipython_select @0.4_0 (active) llvm_select @1.0_0 (active) nosetests_select @0.1_0 (active) python2_select @0.0_1 (active) python_select @0.3_4 python_select @0.3_5 python_select @0.3_6 (active) qt4_select @0.3_3 (active) ruby_select @1.0_0 (active) scala_select @0.1_2 (active) sphinx_select @0.1_0 (active) bash$ ls /opt/local/etc/select cython ipython python ruby db llvm python2 scala gcc nosetests qt4 sphinx bash$ ls /opt/local/etc/select/qt4 base current none bash$ port select --list qt4 Available versions for qt4: none (active) bash$ port installed | grep qt4 qt4-mac @4.8.6_0 qt4-mac @4.8.7_0 qt4-mac @4.8.7_2 qt4-mac @4.8.7_3 (active) qt4-mac-sqlite3-plugin @4.8.7_1 (active) qt4_select @0.3_3 (active) qwt52 @5.2.3_0+qt4 qwt52 @5.2.3_1+qt4 (active) bash$
comment:7 follow-up: 8 Changed 9 years ago by RJVB (René Bertin)
This ticket is about a submitted port that to my knowledge isn't yet incorporated. It will thus not work, unless you install the port files yourself in a personal port repository.
comment:8 Changed 9 years ago by drs@…
Replying to rjvbertin@…:
This ticket is about a submitted port that to my knowledge isn't yet incorporated. It will thus not work, unless you install the port files yourself in a personal port repository.
There is an existing port qt4_select that seems to create the necessary pieces for "port select --list qt4" et al. to work:
https://trac.macports.org/browser/trunk/dports/sysutils/qt4_select/Portfile
except it seems to be broken...
...sorry I missed the part where qt4_select was discussed, I guess qt4_select should be subsumed by qt_select... thanks...
comment:10 Changed 9 years ago by drs@…
I thought things were looking up. I took your advice and added qt_select to my personal ports overlay, but I find your qt_select port behaves the same as qt4_select:
bash$ port select --list qt Available versions for qt: none (active) bash$ ls /opt/local/etc/select/ cython/ gcc/ llvm/ python/ qt/ ruby/ sphinx/ db/ ipython/ nosetests/ python2/ qt4/ scala/ bash$ ls /opt/local/etc/select/qt base none bash$ port select qt Available versions for qt: none (active) bash$ port select qt qt4-mac Selecting 'qt4-mac' for 'qt' failed: The specified version 'qt4-mac' is not valid. bash$ port installed | grep qt4 qt4-mac @4.8.6_0 qt4-mac @4.8.7_0 qt4-mac @4.8.7_2 qt4-mac @4.8.7_3 (active) qt4-mac-sqlite3-plugin @4.8.7_1 (active) qwt52 @5.2.3_0+qt4 qwt52 @5.2.3_1+qt4 (active) bash$ port installed | grep qt_select qt_select @1.0_0 (active) bash$
comment:11 Changed 9 years ago by RJVB (René Bertin)
Citing my original post:
Still, for the sake of being exhaustive, here's port:qt_select which works with the latest versions of my qt4-mac and qt5-mac-devel submissions.
The names of my Qt ports have changed a bit, but this is still valid. The submitted qt_select only works when the mainstream Qt maintainers decide to support it by providing the required files.
If you're just looking for a way to have qmake and family available through ${prefix}/bin, try my qtchooser port. It should detect any kind of Qt4 or Qt5 port. I have never checked that exhaustively (= with the mainstream Qt ports), so I'd be curious to know how well that works out.
See also https://github.com/RJVB/mp-port-repository/tree/master/sysutils/qt_select