From 15b39d40afa6d594c6bdec4ff6eea8f1e9edbcc2 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Mon, 1 Sep 2003 14:53:07 +0000
Subject: [PATCH] * Link in expat if we are *not* building an Apache module.

svn path=/nixpkgs/trunk/; revision=377
---
 pkgs/subversion/subversion-build.sh | 4 ++++
 pkgs/subversion/subversion.fix      | 1 +
 2 files changed, 5 insertions(+)

diff --git a/pkgs/subversion/subversion-build.sh b/pkgs/subversion/subversion-build.sh
index 69862316ae3f..f3fc3b70591d 100755
--- a/pkgs/subversion/subversion-build.sh
+++ b/pkgs/subversion/subversion-build.sh
@@ -14,6 +14,10 @@ fi
 if test $httpServer; then
     extraflags="--with-apxs=$httpd/bin/apxs --with-apr=$httpd --with-apr-util=$httpd $extraflags"
     extramakeflags="APACHE_LIBEXECDIR=$out/modules $extramakeflags"
+else
+    NIX_CFLAGS_COMPILE="-I$expat/include $NIX_CFLAGS_COMPILE"
+    NIX_CFLAGS_LINK="-L$expat/lib $NIX_CFLAGS_LINK"
+    NIX_LDFLAGS="-rpath $expat/lib $NIX_LDFLAGS"
 fi
 
 if test $pythonBindings; then
diff --git a/pkgs/subversion/subversion.fix b/pkgs/subversion/subversion.fix
index c840d436670d..f7d777a928ea 100644
--- a/pkgs/subversion/subversion.fix
+++ b/pkgs/subversion/subversion.fix
@@ -22,6 +22,7 @@ Function(["localServer", "httpsClient", "httpServer", "pythonBindings"],
     , ("httpd", If(Var("httpServer"), IncludeFix("httpd/httpd.fix"), ""))
     , ("db4", If(Var("localServer"), IncludeFix("db4/db4.fix"), ""))
     , ("libxml", IncludeFix("libxml2/libxml2.fix"))
+    , ("expat", If(Var("httpServer"), "", IncludeFix("expat/expat.fix")))
     ]
   )
 )