[oe] [PATCH 08/11] log4cpp: Added recipe for log4cpp

Camille Moncelier moncelier at devlife.org
Sat Nov 6 17:24:29 UTC 2010


  * Log4cpp is library of C++ classes for flexible logging to files,
    syslog, IDSA and other destinations. It is modeled after the Log4j
    Java library, staying as close to their API as is reasonable.

Signed-off-by: Camille Moncelier <moncelier at devlife.org>
---
 .../log4cpp/log4cpp-1.0/configure_pkgconfig.diff   |   11 +++++++++
 recipes/log4cpp/log4cpp-1.0/stl_compile.diff       |   23 ++++++++++++++++++++
 recipes/log4cpp/log4cpp_1.0.bb                     |   22 +++++++++++++++++++
 3 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 recipes/log4cpp/log4cpp-1.0/configure_pkgconfig.diff
 create mode 100644 recipes/log4cpp/log4cpp-1.0/stl_compile.diff
 create mode 100644 recipes/log4cpp/log4cpp_1.0.bb

diff --git a/recipes/log4cpp/log4cpp-1.0/configure_pkgconfig.diff b/recipes/log4cpp/log4cpp-1.0/configure_pkgconfig.diff
new file mode 100644
index 0000000..e4a9104
--- /dev/null
+++ b/recipes/log4cpp/log4cpp-1.0/configure_pkgconfig.diff
@@ -0,0 +1,11 @@
+--- log4cpp-1.0/m4/ac_config_pkgconfig_in.m4	2004-01-27 11:27:38.000000000 +0100
++++ log4cpp-1.0.patched/m4/ac_config_pkgconfig_in.m4	2009-08-24 17:12:26.000000000 +0200
+@@ -121,7 +121,7 @@
+ fi
+ echo 'Version: @VERSION@' >>$PKGCONFIG_FILE
+ echo 'Libs: -L${libdir} @MODULE_DOWN[]_libs@' >>$PKGCONFIG_FILE
+-echo 'Cflags: -I${includedir} @MODULE_DOWN[]_cflags@' >>$PKGCONFIG_FILE
++echo 'Cflags: -I${includedir}' >>$PKGCONFIG_FILE
+ m4_pushdef([PKGCONFIG_UP], [m4_translit([$1], [a-z], [A-Z])])dnl
+ PKGCONFIG_UP[]_PKGCONFIG="PKGCONFIG_DIR[]$1-config"
+ AC_SUBST(PKGCONFIG_UP[]_PKGCONFIG)
diff --git a/recipes/log4cpp/log4cpp-1.0/stl_compile.diff b/recipes/log4cpp/log4cpp-1.0/stl_compile.diff
new file mode 100644
index 0000000..dc4672d
--- /dev/null
+++ b/recipes/log4cpp/log4cpp-1.0/stl_compile.diff
@@ -0,0 +1,23 @@
+diff -r -u log4cpp-1.0/src/BasicLayout.cpp log4cpp-1.0.new/src/BasicLayout.cpp
+--- log4cpp-1.0/src/BasicLayout.cpp	2006-09-30 08:03:20.000000000 +0200
++++ log4cpp-1.0.new/src/BasicLayout.cpp	2009-08-21 16:13:32.000000000 +0200
+@@ -14,6 +14,7 @@
+ #ifdef LOG4CPP_HAVE_SSTREAM
+ #include <sstream>
+ #endif
++#include <memory>
+
+ namespace log4cpp {
+
+diff -r -u log4cpp-1.0/src/PatternLayout.cpp log4cpp-1.0.new/src/PatternLayout.cpp
+--- log4cpp-1.0/src/PatternLayout.cpp	2007-08-28 09:54:12.000000000 +0200
++++ log4cpp-1.0.new/src/PatternLayout.cpp	2009-08-21 16:14:04.000000000 +0200
+@@ -370,7 +370,7 @@
+                         literal = "";
+                     }
+                     if ((minWidth != 0) || (maxWidth != 0)) {
+-                        component = new FormatModifierComponent(component, std::abs(minWidth), maxWidth, minWidth < 0);
++                        component = new FormatModifierComponent(component, std::abs((double)minWidth), maxWidth, minWidth < 0);
+                         minWidth = maxWidth = 0;
+                     }
+                     _components.push_back(component);
diff --git a/recipes/log4cpp/log4cpp_1.0.bb b/recipes/log4cpp/log4cpp_1.0.bb
new file mode 100644
index 0000000..0243e16
--- /dev/null
+++ b/recipes/log4cpp/log4cpp_1.0.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "A library of C++ classes for flexible logging to files, syslog, IDSA and other destinations."
+HOMEPAGE = "http://sourceforge.net/projects/log4cpp/"
+PRIORITY = "optional"
+PR = "r3"
+
+SRC_URI = " \
+     http://downloads.sourceforge.net/project/log4cpp/log4cpp-1.0.x%20%28current%29/${PN}-${PV}/${PN}-${PV}.tar.gz \
+     file://stl_compile.diff;apply=yes \
+     file://configure_pkgconfig.diff;apply=yes \
+"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "\
+    --enable-doxygen=no \
+    --enable-dot=no \
+    --enable-html-docs=no \
+    --enable-latex-docs=no \
+"
+
+SRC_URI[md5sum] = "1face50ead0790d1297dfb04bacf273c"
+SRC_URI[sha256sum] = "b4533324b0a1f46ad74a9e92bf2caa46c246e9353059e1a835e735d41826ed19"
-- 
1.7.3.1





More information about the Openembedded-devel mailing list