aboutsummaryrefslogtreecommitdiffstats
path: root/testing/log4cxx
diff options
context:
space:
mode:
authorRuss Webber <russ@rw.id.au>2019-05-06 17:29:27 +1000
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-07 16:35:18 +0000
commit0ff8d483c03b2bfc08450a032eeccdce8ae27f8f (patch)
treece49efce36bdcc59aff1c4ab945698c04be2c215 /testing/log4cxx
parenta0f019e519b0bc95c3dd9b5e609e5826c20bc377 (diff)
downloadaports-0ff8d483c03b2bfc08450a032eeccdce8ae27f8f.tar.bz2
aports-0ff8d483c03b2bfc08450a032eeccdce8ae27f8f.tar.xz
testing/log4cxx: new aport
http://logging.apache.org/log4cxx A C++ port of the Log4j logging framework. Closes GH-7590
Diffstat (limited to 'testing/log4cxx')
-rw-r--r--testing/log4cxx/APKBUILD52
-rw-r--r--testing/log4cxx/log4cxx-0.10.0-missing_includes.patch38
-rw-r--r--testing/log4cxx/log4cxx-0.10.0-narrowing-fixes-from-upstream.patch117
3 files changed, 207 insertions, 0 deletions
diff --git a/testing/log4cxx/APKBUILD b/testing/log4cxx/APKBUILD
new file mode 100644
index 0000000000..5939e9fca3
--- /dev/null
+++ b/testing/log4cxx/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Russ Webber <russ@rw.id.au>
+# Maintainer: Russ Webber <russ@rw.id.au>
+pkgname=log4cxx
+pkgver=0.10.0
+pkgrel=0
+pkgdesc="A C++ port of the Log4j logging framework."
+url="http://logging.apache.org/log4cxx"
+license="Apache-2.0"
+options="!check" # testsuite in 0.10.0 does not work on alpine
+subpackages="$pkgname-static $pkgname-dev"
+arch="all"
+depends_dev="$pkgname-static"
+makedepends="autoconf automake libtool zip libxml2-dev apr-util-dev"
+source="https://archive.apache.org/dist/logging/$pkgname/$pkgver/apache-$pkgname-$pkgver.tar.gz
+ $pkgname-GPGKEYS::https://archive.apache.org/dist/logging/KEYS
+ log4cxx-0.10.0-missing_includes.patch
+ log4cxx-0.10.0-narrowing-fixes-from-upstream.patch"
+builddir="$srcdir/apache-$pkgname-$pkgver"
+
+prepare() {
+ update_config_guess
+ default_prepare
+}
+
+build() {
+ # if configure is autogenerated make install seems to fail #./autogen.sh
+ # does not configure if specifying --build=$CBUILD \ --host=$CHOST \
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+# Used by: https://github.com/alpinelinux/abuild/pull/57
+#gpg_signature_extensions="asc"
+#gpgfingerprints="good:748F 15B2 CF9B A8F0 2415 5E6E D7C9 2B70 FA1C 814D"
+
+sha512sums="1c34d80983db5648bc4582ddcf6b4fdefdc6594c2769f95235f5441cd6d03cf279cc8f365e9a687085b113f79ebac9d7d33a54b6aa3b3b808c0e1a56a15ffa37 apache-log4cxx-0.10.0.tar.gz
+4099b3ae2a927ccec2be2eee3a4e7a1dd4d979c7cb09f8a72b99059cb87a9e56124971ec7daffbe13f925e42479d896cfeffe58521a2e66e04f565d3e5540d7b log4cxx-GPGKEYS
+14fa0b19516171cbbe2c6220816819fc52cf8f3b3ded5d71966e2f4a71bda9ce1ed8fe7e57745a835e6ac5558631916ed9824d09ec7469d84c7bf99fb4946304 log4cxx-0.10.0-missing_includes.patch
+15b692b37961adbc808e4c10d2719483502f3ac060ee5be248832d4e2a2f76f7d9e120ea9a6bf908230cf230a893964040e54415cca35a12e576d0a5ab1f4176 log4cxx-0.10.0-narrowing-fixes-from-upstream.patch"
diff --git a/testing/log4cxx/log4cxx-0.10.0-missing_includes.patch b/testing/log4cxx/log4cxx-0.10.0-missing_includes.patch
new file mode 100644
index 0000000000..6834648d09
--- /dev/null
+++ b/testing/log4cxx/log4cxx-0.10.0-missing_includes.patch
@@ -0,0 +1,38 @@
+diff -Naur apache-log4cxx-0.10.0.orig/src/examples/cpp/console.cpp apache-log4cxx-0.10.0/src/examples/cpp/console.cpp
+--- apache-log4cxx-0.10.0.orig/src/examples/cpp/console.cpp 2008-04-01 00:34:52.000000000 +0200
++++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2008-05-06 05:40:52.000000000 +0200
+@@ -15,7 +15,10 @@
+ * limitations under the License.
+ */
+
+-#include <stdlib.h>
++#include <cstdio>
++#include <cstdlib>
++#include <cstring>
++#include <stdint.h>
+ #include <log4cxx/logger.h>
+ #include <log4cxx/consoleappender.h>
+ #include <log4cxx/simplelayout.h>
+diff -Naur apache-log4cxx-0.10.0.orig/src/main/cpp/inputstreamreader.cpp apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp
+--- apache-log4cxx-0.10.0.orig/src/main/cpp/inputstreamreader.cpp 2008-04-01 00:34:09.000000000 +0200
++++ apache-log4cxx-0.10.0/src/main/cpp/inputstreamreader.cpp 2008-05-06 05:32:31.000000000 +0200
+@@ -21,6 +21,8 @@
+ #include <log4cxx/helpers/pool.h>
+ #include <log4cxx/helpers/bytebuffer.h>
+
++#include <cstring>
++
+ using namespace log4cxx;
+ using namespace log4cxx::helpers;
+
+diff -Naur apache-log4cxx-0.10.0.orig/src/main/cpp/socketoutputstream.cpp apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp
+--- apache-log4cxx-0.10.0.orig/src/main/cpp/socketoutputstream.cpp 2008-04-01 00:34:09.000000000 +0200
++++ apache-log4cxx-0.10.0/src/main/cpp/socketoutputstream.cpp 2008-05-06 05:35:55.000000000 +0200
+@@ -20,6 +20,8 @@
+ #include <log4cxx/helpers/socket.h>
+ #include <log4cxx/helpers/bytebuffer.h>
+
++#include <cstring>
++
+ using namespace log4cxx;
+ using namespace log4cxx::helpers; \ No newline at end of file
diff --git a/testing/log4cxx/log4cxx-0.10.0-narrowing-fixes-from-upstream.patch b/testing/log4cxx/log4cxx-0.10.0-narrowing-fixes-from-upstream.patch
new file mode 100644
index 0000000000..e583e7661d
--- /dev/null
+++ b/testing/log4cxx/log4cxx-0.10.0-narrowing-fixes-from-upstream.patch
@@ -0,0 +1,117 @@
+diff --git a/src/main/cpp/locationinfo.cpp b/src/main/cpp/locationinfo.cpp
+index e76ea29..bd22a1d 100644
+--- a/src/main/cpp/locationinfo.cpp
++++ b/src/main/cpp/locationinfo.cpp
+@@ -149,18 +149,21 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const {
+ os.writeNull(p);
+ } else {
+ 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,
+- 0x2E, 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F,
+- 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0xED, 0x99, 0xBB,
+- 0xE1, 0x4A, 0x91, 0xA5, 0x7C, 0x02, 0x00, 0x01,
+- 0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49,
+- 0x6E, 0x66, 0x6F,
+- 0x74, 0x00, 0x12, 0x4C, 0x6A,
+- 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67,
+- 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B,
+- 0x78, 0x70 };
++ 0x72,
++ 0x00,
++ 0x21, 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E,
++ 0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F,
++ 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x49, 0x6E, 0x66, 0x6F, static_cast<char>(0xED),
++ static_cast<char>(0x99), static_cast<char>(0xBB), static_cast<char>(0xE1),
++ 0x4A, static_cast<char>(0x91), static_cast<char>(0xA5), 0x7C, 0x02,
++ 0x00,
++ 0x01, 0x4C,
++ 0x00,
++ 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, 0x6E, 0x66, 0x6F, 0x74,
++ 0x00,
++ 0x12, 0x4C, 0x6A, 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);
+ char* line = p.itoa(lineNumber);
+ //
+diff --git a/src/main/cpp/loggingevent.cpp b/src/main/cpp/loggingevent.cpp
+index 1c0d4be..edbf40b 100644
+--- a/src/main/cpp/loggingevent.cpp
++++ b/src/main/cpp/loggingevent.cpp
+@@ -242,7 +242,7 @@ void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) {
+ 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A,
+ 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 0x67,
+ 0x67, 0x69, 0x6E, 0x67, 0x45, 0x76, 0x65, 0x6E,
+- 0x74, 0xF3, 0xF2, 0xB9, 0x23, 0x74, 0x0B, 0xB5,
++ 0x74, static_cast<char>(0xF3), static_cast<char>(0xF2), static_cast<char>(0xB9), 0x23, 0x74, 0x0B, static_cast<char>(0xB5),
+ 0x3F, 0x03, 0x00, 0x0A, 0x5A, 0x00, 0x15, 0x6D,
+ 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x4C, 0x6F,
+ 0x6F, 0x6B, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75,
+diff --git a/src/main/cpp/objectoutputstream.cpp b/src/main/cpp/objectoutputstream.cpp
+index 7cd696b..5442420 100644
+--- a/src/main/cpp/objectoutputstream.cpp
++++ b/src/main/cpp/objectoutputstream.cpp
+@@ -36,7 +36,7 @@ ObjectOutputStream::ObjectOutputStream(OutputStreamPtr outputStream, Pool& p)
+ objectHandle(0x7E0000),
+ classDescriptions(new ClassDescriptionMap())
+ {
+- char start[] = { 0xAC, 0xED, 0x00, 0x05 };
++ char start[] = { static_cast<char>(0xAC), static_cast<char>(0xED), 0x00, 0x05 };
+ ByteBuffer buf(start, sizeof(start));
+ os->write(buf, p);
+ }
+@@ -81,15 +81,15 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) {
+ //
+ // TC_OBJECT and the classDesc for java.util.Hashtable
+ //
+- 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,
+- 0xBB, 0x0F, 0x25, 0x21, 0x4A, 0xE4, 0xB8, 0x03,
+- 0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61,
+- 0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49,
+- 0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68,
+- 0x6F, 0x6C, 0x64, 0x78, 0x70 };
++ 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,
++ static_cast<char>(0xBB), 0x0F, 0x25, 0x21, 0x4A, static_cast<char>(0xE4), static_cast<char>(0xB8), 0x03,
++ 0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61,
++ 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);
+ //
+ // loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7
+diff --git a/src/test/cpp/xml/domtestcase.cpp b/src/test/cpp/xml/domtestcase.cpp
+index a500628..29d67dd 100644
+--- a/src/test/cpp/xml/domtestcase.cpp
++++ b/src/test/cpp/xml/domtestcase.cpp
+@@ -190,9 +190,9 @@ public:
+ 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, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 };
+ #else
+- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 };
++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xB3), 0 };
+ #endif
+ File file;
+ file.setPath(fname);
+@@ -209,9 +209,9 @@ public:
+ 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, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xE3), static_cast<logchar>(0x86), static_cast<logchar>(0x95), 0 };
+ #else
+- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 };
++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0x3195), 0 };
+ #endif
+ File file;
+ file.setPath(fname); \ No newline at end of file