Some changes to the DMD/druntime/phobos bootstrap process are needed, as
their build setup has changed a little since the last package update:
* `druntime` has been incorporated into the `dmd` repo: this allows
us to cut the `druntime` part, but requires an `override-build`
to make sure that druntime source files are included, and we need
to add the old druntime `organize` settings to the `dmd` part
* this requires a change to the `DRUNTIME_PATH` value used to build
phobos; we must also add `CUSTOM_DRUNTIME=1`, or else the phobos
build system will try to build druntime from scratch
The license spec is chosen to reflect the license of DUB itself and the
druntime/phobos code required to build it. System libraries are taken
as given, as their license details are provided in `usr/share/doc`.
This change has a few notable impacts:
* we need to replace the old `prepare:` scriptlet with the new
`override-build` standard, and invoke `snapcraftctl build` to
ensure that the install stage completes successfully
* we can no longer build with snapcraft versions earlier than 3
or use the `snapcraft cleanbuild` command
* by default snapcraft will now attempt to build using `multipass`
(`snapcraft --use-lxd` will reproduce the old `cleanbuild`-style
behaviour, while `snapcraft --destructive-mode` will build in the
local environment)
Update LICENSE file to bring it up to date with DUB upstream
The upstream license file has gained a D Foundation copyright notice at
some point in the last few years. It seems worth tweaking the intro to
the snap package license as well, to clarify that only parts of druntime
and phobos are statically linked.
The old habit of including a `license.txt` in the `snap` directory has
been deprecated for years (to the extent that it was ever even tacitly
approved of), and risks the license file not being included in the snap
package itself.
Adding an explicit `dub-license` part ensures that the license will
always be included.