Apply upstream patches to ntrack\n\nProbably fixes 100% CPU problem in kded module

svn path=/nixpkgs/trunk/; revision=29105
This commit is contained in:
Yury G. Kudryashov 2011-09-07 22:53:31 +00:00
parent 5fb9815469
commit cded4473e7

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, glib, qt4, pkgconfig, libnl, pygobject, python }:
{ stdenv, fetchurl, glib, qt4, pkgconfig, libnl, pygobject, python, automake
, autoconf }:
let
version = "014";
@ -14,11 +15,27 @@ stdenv.mkDerivation rec {
buildInputs = [ libnl qt4 ];
buildNativeInputs = [ pkgconfig python ];
buildNativeInputs = [ pkgconfig python automake autoconf ];
configureFlags = "--without-gobject CFLAGS=--std=gnu99";
postPatch = ''
sed -e "s@/usr\(/lib/ntrack/modules/\)@$out&@" -i common/ntrack.c
patchP0 = fetchurl {
url = http://bazaar.launchpad.net/~asac/ntrack/main/diff/312/309;
name = "ntrack-bzr-309-to-312.patch";
sha256 = "1bpjpikln2i7nsmd2gl82g08yzaqac311sgsva7z7pqccxz0vsj5";
};
patchP1 = fetchurl {
url = "https://bugs.launchpad.net/ntrack/+bug/750554/+attachment/2291609/+files/ntrack_libnl_link.diff";
sha256 = "1al6wfjph7nmck1q2q2z98cnzcrwpln2wwh45xynsxr6wgczwck6";
};
patchPhase =
''
patch -p0 < ${patchP0}
patch -p1 < ${patchP1}
sed -e "s@/usr\(/lib/ntrack/modules/\)@$out&@" -i common/ntrack.c
'';
preConfigure = "automake"; # The second patch changes Makefile.am files
}