log4cxx: fix compilation.
Closes #10869. Signed-off-by: Enno Boland <gottox@voidlinux.eu>
This commit is contained in:
parent
bb65376b12
commit
a1a6ee6f28
5 changed files with 142 additions and 1 deletions
17
srcpkgs/log4cxx/patches/100-bugfix-LOGCXX-284.patch
Normal file
17
srcpkgs/log4cxx/patches/100-bugfix-LOGCXX-284.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
## 100-bugfix-LOGCXX-284.dpatch by <matthew@localhost>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Fixes build error on AIX with xlc_r
|
||||
|
||||
--- src/test/cpp/helpers/datetimedateformattestcase.cpp 2008-03-31 15:33:09.000000000 -0700
|
||||
+++ src/test/cpp/helpers/datetimedateformattestcase.cpp 2008-07-17 06:49:43.000000000 -0700
|
||||
@@ -181,7 +181,7 @@
|
||||
// output the using STL
|
||||
//
|
||||
std::basic_ostringstream<logchar> buffer;
|
||||
-#if defined(_USEFAC)
|
||||
+#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
_USEFAC(locale, std::time_put<logchar>)
|
||||
.put(buffer, buffer, &date, fmt.c_str(), fmt.c_str() + fmt.length());
|
||||
#else
|
19
srcpkgs/log4cxx/patches/150-bugfix-LOGCXX-365.patch
Normal file
19
srcpkgs/log4cxx/patches/150-bugfix-LOGCXX-365.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
Description: fixes test suite to not expect the year to be between 2000 and 2009.
|
||||
Origin: upstream, http://svn.apache.org/viewvc?view=rev&rev=954335
|
||||
Bug: https://issues.apache.org/jira/browse/LOGCXX-365
|
||||
Forwarded: not-needed
|
||||
Applied-Upstream: commit 954335
|
||||
Last-Update: 2014-03-14
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- src/test/cpp/util/filter.h 2010/06/14 00:24:42 954334
|
||||
+++ src/test/cpp/util/filter.h 2010/06/14 00:30:43 954335
|
||||
@@ -31,7 +31,7 @@
|
||||
#define BASIC_PAT "\\[0x[0-9A-F]*] (FATAL|ERROR|WARN|INFO|DEBUG)"
|
||||
#define ISO8601_PAT "[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}"
|
||||
#define ABSOLUTE_DATE_AND_TIME_PAT \
|
||||
- "[0-9]\\{1,2\\} .* 200[0-9] [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}"
|
||||
+ "[0-9]\\{1,2\\} .* 2[0-9][0-9][0-9] [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}"
|
||||
#define ABSOLUTE_TIME_PAT "[0-2][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]"
|
||||
#define RELATIVE_TIME_PAT "^[0-9]+"
|
||||
|
80
srcpkgs/log4cxx/patches/170-gcc6-fix.patch
Normal file
80
srcpkgs/log4cxx/patches/170-gcc6-fix.patch
Normal file
|
@ -0,0 +1,80 @@
|
|||
Description: Fix FTBFS with GCC6
|
||||
GCC6 is more pickier on truncating, so this patch fixes the narrowing conversion errors.
|
||||
Author: Tobias Frost <tobi@debian.org>
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811768
|
||||
Forwarded: https://issues.apache.org/jira/browse/LOGCXX-482
|
||||
Applied-Upstream: yes, targeted version 0.11.0
|
||||
Last-Update: 2016-07-01 (DebCamp16)
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- src/main/cpp/locationinfo.cpp
|
||||
+++ src/main/cpp/locationinfo.cpp
|
||||
@@ -148,7 +148,7 @@
|
||||
if (lineNumber == -1 && fileName == NA && methodName == NA_METHOD) {
|
||||
os.writeNull(p);
|
||||
} else {
|
||||
- char prolog[] = {
|
||||
+ unsigned char prolog[] = {
|
||||
0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E,
|
||||
0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C,
|
||||
0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69,
|
||||
@@ -161,7 +161,7 @@
|
||||
0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67,
|
||||
0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B,
|
||||
0x78, 0x70 };
|
||||
- os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p);
|
||||
+ os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, (char *)prolog, sizeof(prolog), p);
|
||||
char* line = p.itoa(lineNumber);
|
||||
//
|
||||
// construct Java-like fullInfo (replace "::" with ".")
|
||||
--- src/main/cpp/loggingevent.cpp
|
||||
+++ src/main/cpp/loggingevent.cpp
|
||||
@@ -236,7 +236,7 @@
|
||||
|
||||
|
||||
void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) {
|
||||
- char classDesc[] = {
|
||||
+ unsigned char classDesc[] = {
|
||||
0x72, 0x00, 0x21,
|
||||
0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63,
|
||||
0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A,
|
||||
@@ -292,7 +292,7 @@
|
||||
0x3B, 0x78, 0x70 };
|
||||
|
||||
os.writeProlog("org.apache.log4j.spi.LoggingEvent",
|
||||
- 8, classDesc, sizeof(classDesc), p);
|
||||
+ 8, (char *) classDesc, sizeof(classDesc), p);
|
||||
}
|
||||
|
||||
void LoggingEvent::write(helpers::ObjectOutputStream& os, Pool& p) const {
|
||||
--- src/main/cpp/objectoutputstream.cpp
|
||||
+++ src/main/cpp/objectoutputstream.cpp
|
||||
@@ -36,8 +36,8 @@
|
||||
objectHandle(0x7E0000),
|
||||
classDescriptions(new ClassDescriptionMap())
|
||||
{
|
||||
- char start[] = { 0xAC, 0xED, 0x00, 0x05 };
|
||||
- ByteBuffer buf(start, sizeof(start));
|
||||
+ unsigned char start[] = { 0xAC, 0xED, 0x00, 0x05 };
|
||||
+ ByteBuffer buf((char*)start, sizeof(start));
|
||||
os->write(buf, p);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
//
|
||||
// TC_OBJECT and the classDesc for java.util.Hashtable
|
||||
//
|
||||
- char prolog[] = {
|
||||
+ unsigned char prolog[] = {
|
||||
0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61,
|
||||
0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61,
|
||||
0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13,
|
||||
@@ -90,7 +90,7 @@
|
||||
0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49,
|
||||
0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68,
|
||||
0x6F, 0x6C, 0x64, 0x78, 0x70 };
|
||||
- writeProlog("java.util.Hashtable", 1, prolog, sizeof(prolog), p);
|
||||
+ writeProlog("java.util.Hashtable", 1, (char *) prolog, sizeof(prolog), p);
|
||||
//
|
||||
// loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7
|
||||
char data[] = { 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
|
25
srcpkgs/log4cxx/patches/180-gcc-fix-testsuite.patch
Normal file
25
srcpkgs/log4cxx/patches/180-gcc-fix-testsuite.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
Description: Fix narrowing errors also for the testsuite
|
||||
Author: Tobias Frost <tobi@debian.org>
|
||||
Last-Update: 2016-10-23
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- src/test/cpp/xml/domtestcase.cpp
|
||||
+++ src/test/cpp/xml/domtestcase.cpp
|
||||
@@ -190,7 +190,7 @@
|
||||
DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml"));
|
||||
LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3");
|
||||
#if LOG4CXX_LOGCHAR_IS_UTF8
|
||||
- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 };
|
||||
+ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, (logchar)0xC2, (logchar)0xB3, 0 };
|
||||
#else
|
||||
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 };
|
||||
#endif
|
||||
@@ -209,7 +209,7 @@
|
||||
DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml"));
|
||||
LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4");
|
||||
#if LOG4CXX_LOGCHAR_IS_UTF8
|
||||
- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 };
|
||||
+ const logchar fname[] = { 0x6F, (logchar)0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, (logchar)0xE3, (logchar)0x86, (logchar)0x95, 0 };
|
||||
#else
|
||||
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 };
|
||||
#endif
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'log4cxx'
|
||||
pkgname=log4cxx
|
||||
version=0.10.0
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-configure
|
||||
makedepends="libxml2-devel apr-devel apr-util-devel gdbm-devel"
|
||||
short_desc="A C++ Logging Library based on Log4J"
|
||||
|
|
Loading…
Reference in a new issue