{ stdenv, fetchurl, autoconf, automake, libtool, libxml2, cppunit, boost
, apr, aprutil, db45, expat
}:

stdenv.mkDerivation {
  name = "log4cxx-0.10.0";
  
  src = fetchurl {
    url = http://apache.mirrors.hoobly.com/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz;    
    sha256 = "130cjafck1jlqv92mxbn47yhxd2ccwwnprk605c6lmm941i3kq0d";
  };
  
  buildInputs = [autoconf automake libtool libxml2 cppunit boost apr aprutil db45 expat];

  meta = {
    homepage = http://logging.apache.org/log4cxx/index.html;
    description = "A logging framework for C++ patterned after Apache log4j";
  };
}

{ stdenv, fetchurl, autoconf, automake, libtool, libxml2, cppunit, boost
, apr, aprutil, db45, expat
}:

stdenv.mkDerivation {
  name = "log4cxx-0.10.0";
  
  src = fetchurl {
    url = http://apache.mirrors.hoobly.com/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz;    
    sha256 = "130cjafck1jlqv92mxbn47yhxd2ccwwnprk605c6lmm941i3kq0d";
  };

  postPatch = ''
    sed -i -e '1,/^#include/ {
      /^#include/i \
        #include <cstdio> \
        #include <cstdlib> \
        #include <cstring>
    }' src/examples/cpp/console.cpp \
       src/main/cpp/inputstreamreader.cpp \
       src/main/cpp/socketoutputstream.cpp
  '';

  buildInputs = [autoconf automake libtool libxml2 cppunit boost apr aprutil db45 expat];

  meta = {
    homepage = http://logging.apache.org/log4cxx/index.html;
    description = "A logging framework for C++ patterned after Apache log4j";
  };
}

Fix build by adding missing includes.
log4cxx: Fix build by adding missing includes.

This adds a bit too many includes but in the end it won't hurt on the
size of the build output because those are optimized away. But having a
whole bunch of sed expressions just for selectively adding includes just
clutters up the package expression.

Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@redmoonstudios.org>
