(un)setting environment variables from a Portfile

René J.V. Bertin rjvbertin at gmail.com
Sun Jan 11 14:47:07 PST 2015


On Monday January 12 2015 09:30:08 Ian Wadham wrote:

> In case anyone does not already know, QTDIR is an env variable
> a developer can use when developing software based on Qt or
> a development (test, non-standard) version of Qt.

I doubt the variable is still required nowadays (which is not to say it doesn't do anything).

> @René: I am hoping I will be able to point QTDIR to *either* qt4-mac
> or qt5-mac when developing and testing KDE apps in the future, as
> MacPorts goes through the transition from KDE 4 to KF 5.  I am worried
> that having one Qt in /opt/local and another in /opt/local/libexec will not

Ultimately you'll have /opt/local/libexec/qt4 and /opt/local/libexec/qt5 (and who knows, qt6 too).
There really is no reason to worry. People on Linux have been going through those same motions for quite a while now.

> achieve that cleanly… :-(  Also, I am hoping that there will be Qt apps
> in /Applications/MacPorts/Qt5 that are different from the ones already
> in the Qt4 subdir, such as an Assistant.app that finds, indexes, searches

Yes, of course:
#> ll /Applications/MacPorts/Qt5
total 0
2580404 0 drwxrwxr-x  9 bertin admin 306 Jan 11 16:29 ./
  65472 0 drwxr-xr-x 19 bertin admin 646 Jan 11 16:29 ../
2580405 0 drwxr-xr-x  3 bertin admin 102 Jan 11 16:29 Assistant.app/
2580414 0 drwxr-xr-x  3 bertin admin 102 Jan 11 16:29 Designer.app/
2580424 0 drwxr-xr-x  3 bertin admin 102 Jan 11 16:29 Linguist.app/
2580433 0 drwxr-xr-x  3 bertin admin 102 Jan 11 16:29 QMLViewer.app/
2580442 0 drwxr-xr-x  3 bertin admin 102 Jan 11 16:29 pixeltool.app/
2580450 0 drwxr-xr-x  3 bertin admin 102 Jan 11 16:29 qdbusviewer.app/
2580459 0 drwxr-xr-x  3 bertin admin 102 Jan 11 16:29 qml.app/

> and browses Qt 5's documentation not Qt 4's and a Designer.app that
> outputs form-designs in whatever file-format is used by Qt 5.

The Assistant app can read .qch documentation bundles. From what I've seen, each of the various copies I have of that application has its own set of preferences, and will show what documentation you have of the Qt version it's built against by default.
I prefer to have a single copy that indexes all documentation (and a Qt4 version at that, as it follows system-wide style settings); handy to see if and how a class has evolved.

R.


More information about the macports-dev mailing list