[KDE/Mac] Thoughts on standard directories in Qt5 - QStandardPaths

David Faure faure at kde.org
Sat Dec 20 11:39:55 UTC 2014


On Monday 15 December 2014 09:32:48 Ian Wadham wrote:
> A further problem is that, being a Unix-like system, OS X has many Unix-like
> and even FOSS-like items in /usr and /usr/local, such as low-level
> libraries, utilities and include files.  Many of these have the same names
> as equivalent FOSS items, but with older versions in many cases or even
> with mods by Apple.
> 
> For this reason, MacPorts segregates all the FOSS software it builds and
> installs into /opt/local/...  There are some words about that here:
>     https://trac.macports.org/wiki/FAQ#defaultprefix
> 
> So, if we did have some other environment variable names, e.g. QT_* not
> XDG_*, they should probably be something like MP_*.  However, environment
> variables are a threatened species on many versions of OS X supported by
> MacPorts and are extinct (i.e. ignored) on the most recent
> versions.  "Extinct" means there is no Apple-approved way to introduce an
> environment variable into an app started by the GUI facilities on the
> desktop in recent versions of OS X.
> 
> OTOH it is still possible to use environment variables on the command line
> in OS X.  We would *want* to use them for running CI, downstream testing
> and downstream development of mods and bug fixes, as René Bertin and I have
> been doing for KDE 4 up till now.

OK, thanks for the overview and additional context.

The way MacPorts works sounds like it could be a way to get more stuff into 
QStandardPaths, basically "adding MacPorts support" to it.

The question is, what exactly does that mean :)

Your email then goes into "non-end-user purposes" such as CI.
But what about the end user use case? That needs to work too :-)
If we (just like MacPorts) install stuff into /opt/local how do applications 
find stuff there? Doesn't this require some
export XDG_DATA_DIRS=/opt/local/share and similar?
The MacPorts wiki doesn't really explain how it all ends up working, but maybe 
that's because simple libs don't have such issues.

I mean - how does it work for other XDG software than Qt and KF5, which needs 
to find stuff, like, let's say, update-mime-database (or any other XDG software 
that uses mimetypes), which has to find /opt/local/share/mime ?
(rather than the default location for it, which would be /usr/share/mime)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the kde-mac mailing list