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

René J.V. Bertin rjvbertin at gmail.com
Sat Dec 20 14:25:37 UTC 2014


On Saturday December 20 2014 12:39:55 David Faure wrote:

Hi David,

> 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 :)

Yes, yes, ain't that what we're trying to finagle out? :)

> 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.

Part of that is simply because most all packages/projects/whatever-you-call-them default to installing in /usr/local, can be configured to install in /usr instead, and thus have no issues at all if they end up in /opt/local.
It seems that with all the modern complexities and interdependencies we tend to forget the simple things that have worked for decades ...

> 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)

No, that would be under /usr/local !
#> shared-mime-info/configure --help
`configure' configures shared-mime-info 1.3 to adapt to many kinds of systems.

Usage: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_shared-mime-info/shared-mime-info/work/shared-mime-info-1.3/configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

The shared-mime-info Portfile does an autoreconf (-fvi) before calling configure  --prefix=/opt/local --disable-update-mimedb
and that's that.

So at least for this example it seems that it is XDG conceived to work with and/or under paths that are already present and used rather than the other way around.

René

> 
> 



More information about the kde-mac mailing list