2009-04-01 13:47:19 +04:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, libtool, libxml2, cppunit, boost
|
2014-02-01 00:05:37 +04:00
|
|
|
, apr, aprutil, db, expat
|
2009-04-01 13:47:19 +04:00
|
|
|
}:
|
2007-11-11 19:22:29 +03:00
|
|
|
|
2013-11-22 19:26:26 +04:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "log4cxx-${version}";
|
|
|
|
version = "0.10.0";
|
|
|
|
|
2009-02-12 17:52:23 +03:00
|
|
|
src = fetchurl {
|
2013-11-22 19:26:26 +04:00
|
|
|
url = "http://apache.mirrors.hoobly.com/logging/log4cxx/${version}/apache-${name}.tar.gz";
|
2009-02-12 17:52:23 +03:00
|
|
|
sha256 = "130cjafck1jlqv92mxbn47yhxd2ccwwnprk605c6lmm941i3kq0d";
|
|
|
|
};
|
2013-11-22 18:28:25 +04:00
|
|
|
|
|
|
|
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
|
2016-04-01 05:35:38 +03:00
|
|
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
sed -i 's/namespace std { class locale; }/#include <locale>/' src/main/include/log4cxx/helpers/simpledateformat.h
|
|
|
|
sed -i 's/\(#include <cctype>\)/\1\n#include <cstdlib>/' src/main/cpp/stringhelper.cpp
|
2013-11-22 18:28:25 +04:00
|
|
|
'';
|
|
|
|
|
2014-02-01 00:05:37 +04:00
|
|
|
buildInputs = [autoconf automake libtool libxml2 cppunit boost apr aprutil db expat];
|
2009-04-01 13:47:19 +04:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://logging.apache.org/log4cxx/index.html;
|
|
|
|
description = "A logging framework for C++ patterned after Apache log4j";
|
2013-11-22 19:26:26 +04:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2016-08-02 20:50:55 +03:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-04-01 13:47:19 +04:00
|
|
|
};
|
2007-11-11 19:22:29 +03:00
|
|
|
}
|