summaryrefslogtreecommitdiffstats
path: root/package/log4cxx/log4cxx-0001-charset-fixes.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-03-24 08:19:29 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-03-24 20:38:56 +0100
commit6ebb930b694e97e5cf85a724957d9c0eb129dea7 (patch)
tree139fb7229bac1fc278fccda0812b18992a4962cf /package/log4cxx/log4cxx-0001-charset-fixes.patch
parenta00fc22779983440d0bec2b996b55f4064079e55 (diff)
downloadbuildroot-novena-6ebb930b694e97e5cf85a724957d9c0eb129dea7.tar.gz
buildroot-novena-6ebb930b694e97e5cf85a724957d9c0eb129dea7.zip
log4cxx: new package
Initial work done by Aleksandar Zivkovic at http://patchwork.ozlabs.org/patch/171109/. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/log4cxx/log4cxx-0001-charset-fixes.patch')
-rw-r--r--package/log4cxx/log4cxx-0001-charset-fixes.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/log4cxx/log4cxx-0001-charset-fixes.patch b/package/log4cxx/log4cxx-0001-charset-fixes.patch
new file mode 100644
index 000000000..75567fdad
--- /dev/null
+++ b/package/log4cxx/log4cxx-0001-charset-fixes.patch
@@ -0,0 +1,43 @@
+Fix build when iconv support is not available
+
+When iconv support is not available, the apr-util library does not
+provide character set conversion features, and therefore APR_HAS_XLATE
+is false.
+
+However, on Linux !defined(_WIN32) is always true, but the part of the
+code that defines the APRCharsetDecoder and APRCharsetEncoder are only
+enclosed in a #if APR_HAS_XLATE, without the "|| defined(_WIN32)"
+which leads to build failures: the APRCharsetEncoder and
+APRCharsetDecoder classes are used without being defined.
+
+This patch removes the || !defined(_WIN32) so that when iconv support
+is not here, we fall back to raising an exception at runtime.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/src/main/cpp/charsetdecoder.cpp
+===================================================================
+--- a/src/main/cpp/charsetdecoder.cpp
++++ b/src/main/cpp/charsetdecoder.cpp
+@@ -476,7 +476,7 @@
+ StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("ISO-LATIN-1"), LOG4CXX_STR("iso-latin-1"))) {
+ return new ISOLatinCharsetDecoder();
+ }
+-#if APR_HAS_XLATE || !defined(_WIN32)
++#if APR_HAS_XLATE
+ return new APRCharsetDecoder(charset);
+ #else
+ throw IllegalArgumentException(charset);
+Index: b/src/main/cpp/charsetencoder.cpp
+===================================================================
+--- a/src/main/cpp/charsetencoder.cpp
++++ b/src/main/cpp/charsetencoder.cpp
+@@ -484,7 +484,7 @@
+ } else if (StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("UTF-16LE"), LOG4CXX_STR("utf-16le"))) {
+ return new UTF16LECharsetEncoder();
+ }
+-#if APR_HAS_XLATE || !defined(_WIN32)
++#if APR_HAS_XLATE
+ return new APRCharsetEncoder(charset);
+ #else
+ throw IllegalArgumentException(charset);