From 4c0ff006f32f3444176cedca5cf834e0d992846f Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 4 Nov 2009 15:14:12 +0000 Subject: [PATCH] pkgs/development/libraries/redland/1.0.9.nix: fix build with sqlite 3.6.19 Redland's use of the pre-processor symbol SQLITE_API collides with a symbol of the same name in sqlite 3.6.19. Patching the source code to use REDLAND_SQLITE_API instead works around the problem. svn path=/nixpkgs/trunk/; revision=18100 --- pkgs/development/libraries/redland/1.0.9.nix | 21 ++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/redland/1.0.9.nix b/pkgs/development/libraries/redland/1.0.9.nix index 313a8f28a6f..93606ad0eb5 100644 --- a/pkgs/development/libraries/redland/1.0.9.nix +++ b/pkgs/development/libraries/redland/1.0.9.nix @@ -1,7 +1,7 @@ args: with args; let name = "redland-${version}"; -in +in stdenv.mkDerivation { inherit name; @@ -10,15 +10,24 @@ stdenv.mkDerivation { url = "mirror://sf/librdf/${name}.tar.gz"; sha256 = "aa90ded84f5dd4cc2330bf79d139e00ceb93c6a9b94d17e1a93449ad579e1524"; }; - + buildInputs = [pkgconfig]; - + propagatedBuildInputs = [ bdb openssl libxslt perl mysql postgresql sqlite curl pcre libxml2 librdf_raptor librdf_rasqal ]; - + configureFlags = "--with-threads --with-bdb=${bdb}"; - - patchPhase = "sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl"; + + patchPhase = + '' + sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl + + # Redland 1.0.9 uses an internal pre-processor symbol SQLITE_API + # that collides with a symbol of the same name in sqlite 3.6.19. + # This is a quick fix for the problem. A real solution needs to be + # implemented upstream, though. + find . -type f -exec sed -i -e 's/SQLITE_API/REDLAND_SQLITE_API/g' {} \; + ''; }