dbus: fix paths in catalog

Upstream is accidentally shipping a pre-generated catalog file in the tarball,
which contains FHS paths. We need to remove it to re-generate it ourselves.
Unfortunately, we are also overriding datadir to different values between
build and installation for reasons, so we need to override dtddir manually.
This commit is contained in:
Jan Tojnar 2022-05-22 21:52:04 +02:00
parent 7f1a9610cb
commit caf6e09b70

View file

@ -37,6 +37,10 @@ stdenv.mkDerivation rec {
] ++ (lib.optional stdenv.isSunOS ./implement-getgrouplist.patch);
postPatch = ''
# We need to generate the file ourselves.
# https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/317
rm doc/catalog.xml
substituteInPlace bus/Makefile.am \
--replace 'install-data-hook:' 'disabled:' \
--replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':'
@ -98,6 +102,11 @@ stdenv.mkDerivation rec {
doCheck = true;
makeFlags = [
# Fix paths in XML catalog broken by mismatching build/install datadir.
"dtddir=${placeholder "out"}/share/xml/dbus-1"
];
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
"datadir=${placeholder "out"}/share"