On 11/04/2017 3:21 PM, Matthias Klumpp wrote:
On Tuesday, 11 April 2017 at 14:04:44 UTC, rikki cattermole wrote:
[...]
/usr/share/source/D/package-name-version

Add a search path like that to Dub and create source only library
packages and that is pretty much all the distribution we need for
libraries I reckon.

It's more likely that the path would be `/usr/include/d` because that's
the place the D sources seem to usually reside, especially if they are
also used as "headers" for shared libraries.

At time I am playing around with the idea of using pkg-config[1] files
to enlist the sources a D library consists of.
By doing that, we would have a very build-system agnostic way of doing
storing that information that can be used by Automake (native), Dub,
Meson and even plain Makefiles. It's also very widely used (although it
is commonly not used to list sources).

This would also jive really well with the existing D packages in Debian
and we could - if we go down the source-only route - still decide to
precompile a few selected libraries, for example in case they are very
time consuming to compile or really large.

This will *not* solve the issues with Phobos breakage though, as Phobos
is a shared library. But doing that would pretty much work around all
other problems, except for the cost of having statically linked
binaries, but that seems to be inevitable anyway given the state of things.

(Disclaimer: This is not a D team policy draft yet, just an opinion at
the moment that might be refined or changed entirely)

[1]: https://www.freedesktop.org/wiki/Software/pkg-config/

The problem with /usr/include/d is that is where .di files would be located not .d. This would also match up with the c/c++ usage of it.

Reply via email to