Opened 3 years ago

Last modified 3 years ago

#49629 new defect

qt4-mac: qmake is in /opt/local/libexec/qt4/bin/qmake

Reported by: rickrich@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mkae (Marko Käning), RJVB (René Bertin)
Port: qt4-mac

Description (last modified by ryandesign (Ryan Schmidt))

qmake is in /opt/local/libexec/qt4/bin/qmake:

$ ll /opt/local/libexec/qt4/bin/qmake 
-rwxr-xr-x  1 root  admin  5573924 Nov  8 11:47 /opt/local/libexec/qt4/bin/qmake

But there is no symlink to:

$ ll /opt/local/bin/qmake
ls: /opt/local/bin/qmake: No such file or directory

Change History (5)

comment:1 Changed 3 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to michaelld@…
Port: qt4-mac added
Summary: qmake is in /opt/local/libexec/qt4/bin/qmakeqt4-mac: qmake is in /opt/local/libexec/qt4/bin/qmake

I believe that is intentional, so that the qt4-mac and qt5-mac ports do not conflict.

comment:2 Changed 3 years ago by rickrich@…

I don't have qt5-mac installed, tho! Thus, it should be symlinked!

comment:3 Changed 3 years ago by ryandesign (Ryan Schmidt)

Since there are ports for multiple versions of qt, none of them should install commonly-named binaries or other files. Instead, there should be a qt_select port to let you choose.

comment:4 Changed 3 years ago by mkae (Marko Käning)

Cc: mk@… rjvbertin@… added
Version: 2.3.4

comment:5 in reply to:  3 Changed 3 years ago by RJVB (René Bertin)

Replying to ryandesign@…:

Since there are ports for multiple versions of qt, none of them should install commonly-named binaries or other files. Instead, there should be a qt_select port to let you choose.

My Qt ports do provide the data required for qt_select (doh, the referred ticket is mine :)), but I've also submitted qtchooser which I think is preferable to port select. That's a port that will install qmake (and moc and uic and a bunch of other utilities) as a symlink to qtchooser-mp, which is itself a wrapper utility that proxies for any number of declared Qt installations. The port will declare the Qt 4 and/or 5 versions provided by MacPorts, and allows you to declare a default version.

Thus:

  • qmake will invoke either /opt/local/libexec/qt4/bin/qmake or /opt/local/libexec/qt5/bin/qmake or whatever you have set the default to
  • qmake -qt=qt4-mac will invoke the qmake binary from port:qt4-mac
  • qmake -qt=qt5-kde will invoke the qmake binary from port:qt5-kde (shameless plug for a port I submitted)
  • qmake -qt=my-own-Qt will invoke the qmake binary from an environment "my-own-Qt" that you've declared yourself by calling qtchooser-mp -install

That said, my own Qt ports also install the symlinks qmake-qt4 and qmake-qt5 into ${prefix}/bin, which already decreases the need one might feel for installing additional ports.

Last edited 3 years ago by RJVB (René Bertin) (previous) (diff)
Note: See TracTickets for help on using tickets.