* Ignore missing directories in the <includedir> element. This allows
the NixOS system bus configuration to include directories such as /nix/var/nix/profiles/default/etc/dbus-1/system.d/ which may not exist. svn path=/nixpkgs/branches/x-updates/; revision=22672
This commit is contained in:
parent
cb11b171d1
commit
0f53a3fca8
@ -7,6 +7,8 @@ let
|
|||||||
url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
|
url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
|
||||||
sha256 = "0j2wb79kndq4b1qqr59n1g6s0lm7yp6r9ny3skimadkh9a7p8b7i";
|
sha256 = "0j2wb79kndq4b1qqr59n1g6s0lm7yp6r9ny3skimadkh9a7p8b7i";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./ignore-missing-includedirs.patch ];
|
||||||
|
|
||||||
configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp";
|
configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp";
|
||||||
|
|
||||||
@ -17,9 +19,9 @@ in rec {
|
|||||||
|
|
||||||
buildInputs = [ pkgconfig expat ];
|
buildInputs = [ pkgconfig expat ];
|
||||||
|
|
||||||
inherit src configureFlags;
|
inherit src patches configureFlags;
|
||||||
|
|
||||||
patchPhase =
|
preConfigure =
|
||||||
''
|
''
|
||||||
sed -i '/mkinstalldirs.*localstatedir/d' bus/Makefile.in
|
sed -i '/mkinstalldirs.*localstatedir/d' bus/Makefile.in
|
||||||
sed -i '/SUBDIRS/s/ tools//' Makefile.in
|
sed -i '/SUBDIRS/s/ tools//' Makefile.in
|
||||||
@ -31,22 +33,22 @@ in rec {
|
|||||||
tools = stdenv.mkDerivation {
|
tools = stdenv.mkDerivation {
|
||||||
name = "dbus-tools-" + version;
|
name = "dbus-tools-" + version;
|
||||||
|
|
||||||
inherit src;
|
inherit src patches;
|
||||||
|
|
||||||
configureFlags = "${configureFlags} --with-dbus-daemondir=${daemon}/bin";
|
configureFlags = "${configureFlags} --with-dbus-daemondir=${daemon}/bin";
|
||||||
|
|
||||||
buildInputs = [ pkgconfig expat libs ]
|
buildInputs = [ pkgconfig expat libs ]
|
||||||
++ stdenv.lib.optionals useX11 [ libX11 libICE libSM ];
|
++ stdenv.lib.optionals useX11 [ libX11 libICE libSM ];
|
||||||
|
|
||||||
postConfigure = "cd tools";
|
|
||||||
|
|
||||||
NIX_LDFLAGS = "-ldbus-1";
|
NIX_LDFLAGS = "-ldbus-1";
|
||||||
|
|
||||||
patchPhase =
|
preConfigure =
|
||||||
''
|
''
|
||||||
sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in
|
sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in
|
||||||
substituteInPlace tools/Makefile.in --replace 'install-localstatelibDATA:' 'disabled:'
|
substituteInPlace tools/Makefile.in --replace 'install-localstatelibDATA:' 'disabled:'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postConfigure = "cd tools";
|
||||||
};
|
};
|
||||||
|
|
||||||
# I'm too lazy to separate daemon and libs now.
|
# I'm too lazy to separate daemon and libs now.
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
diff -ru -x '*~' dbus-1.2.24-orig/bus/config-parser.c dbus-1.2.24/bus/config-parser.c
|
||||||
|
--- dbus-1.2.24-orig/bus/config-parser.c 2010-03-23 20:01:27.000000000 +0100
|
||||||
|
+++ dbus-1.2.24/bus/config-parser.c 2010-07-20 14:17:20.000000000 +0200
|
||||||
|
@@ -2159,12 +2159,16 @@
|
||||||
|
|
||||||
|
retval = FALSE;
|
||||||
|
|
||||||
|
- dir = _dbus_directory_open (dirname, error);
|
||||||
|
+ dbus_error_init (&tmp_error);
|
||||||
|
+
|
||||||
|
+ dir = _dbus_directory_open (dirname, &tmp_error);
|
||||||
|
|
||||||
|
if (dir == NULL)
|
||||||
|
- goto failed;
|
||||||
|
+ {
|
||||||
|
+ retval = TRUE;
|
||||||
|
+ goto failed;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- dbus_error_init (&tmp_error);
|
||||||
|
while (_dbus_directory_get_next_file (dir, &filename, &tmp_error))
|
||||||
|
{
|
||||||
|
DBusString full_path;
|
Loading…
x
Reference in New Issue
Block a user