summaryrefslogtreecommitdiff
path: root/dev-libs/log4cxx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/log4cxx
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/log4cxx')
-rw-r--r--dev-libs/log4cxx/Manifest7
-rw-r--r--dev-libs/log4cxx/files/log4cxx-0.10.0-fix-c++14.patch100
-rw-r--r--dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch12
-rw-r--r--dev-libs/log4cxx/files/log4cxx-0.10.0-missing_includes.patch37
-rw-r--r--dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch75
-rw-r--r--dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild63
-rw-r--r--dev-libs/log4cxx/metadata.xml11
7 files changed, 305 insertions, 0 deletions
diff --git a/dev-libs/log4cxx/Manifest b/dev-libs/log4cxx/Manifest
new file mode 100644
index 000000000000..07c99e5f032c
--- /dev/null
+++ b/dev-libs/log4cxx/Manifest
@@ -0,0 +1,7 @@
+AUX log4cxx-0.10.0-fix-c++14.patch 4599 BLAKE2B 34422a31ef35bb74bc8554eba0c116c06ec12c44cedb09b6ce56a0428a8959bce6c33ef99c887291a482f610b5b338ef242b5722a7402c5b368fce39776176e9 SHA512 584bd8649b08be9867cef0af9746d9648e35d2438e7225c5435fd9820251958839bbf61627022514f5a96ff930ae5d07f637435ed15ee5bdeeba313e6b099b2c
+AUX log4cxx-0.10.0-gcc44.patch 357 BLAKE2B b70ff78b141b6952bc8a5f1eca9e251a7dd7b5d8742d875cbadbfef6ef625416c2ba368b5d2b1d2792e835446775bc11231974a356d4fcd2595e1d99211dc04c SHA512 425d10d3d92d57269f447d5afd93f3302681c36f99654461a8377ea81c5d0ebe97fa60e54be169abc366d99c97ed6484626b5c1886f7996292d110e396ace97d
+AUX log4cxx-0.10.0-missing_includes.patch 1554 BLAKE2B 9eacadeff4a26cf7eb97c9b4af43874c2640a0e7b0e0ed6b85424aa2e8d4d54d13d7eea1361c5b2d2d57f33cdc2260d6e3f5d6afd6b3d240fecc3565aab9f29f SHA512 8fb9017206bca39fa4481707cdb13b68195cc2fce66383a601bc8c7cc20869ca356f2616459b5f10615d5a40f0759c24058f22d7e08c02fee1ce367c34b2d707
+AUX log4cxx-0.10.0-unixODBC.patch 2989 BLAKE2B 8314e9777d41186e21bf7af1f2263a0461ec469af0f63ebe2b3a0787f88dcab4800342d3c707c89f271c92e966df3781ed41ace34211d158350b325743242a3f SHA512 8f21778cb797750071a5db025d50ef580c64ff9e634e18fa6b7d90082bf842f4470fe5996cc0dcf2cece6c8c0c4d5e2aa9852ff596d0c5d4ba6a33be8eb3f651
+DIST apache-log4cxx-0.10.0.tar.gz 1667425 BLAKE2B f753e1ddb1f2d7abfca92e60883752acfacc0491aa93cfe0ac26c12b32c1f6406df7be2aa83b65a176671debdaa67a69d68af6cb7901cb626eee572425de40c4 SHA512 1c34d80983db5648bc4582ddcf6b4fdefdc6594c2769f95235f5441cd6d03cf279cc8f365e9a687085b113f79ebac9d7d33a54b6aa3b3b808c0e1a56a15ffa37
+EBUILD log4cxx-0.10.0-r1.ebuild 1517 BLAKE2B cc6f48b3358b284d1d65a480ddd75003cb1be0ef48c1c9c6de088d77f60286cf6923e3bf91c472a96be02a2c415e010695266bf4eb45d6250d57cd2e1b48c7b2 SHA512 8d66d390ab020b5779db11e1f31cacea7a7c9da9b280b7b9e7a6f447144bf39c212c15f9a7e78573f20ed27708d9829d09d20f19d73e5870566cfe62ada2784a
+MISC metadata.xml 339 BLAKE2B fb2eb2d5b1b407bc703702f1f6022ac328d7e6050413993ca8e32947733a5432043b444ba97c24d9b5a7aea005b44b0c4bc0add2fa039aa329a6f39ba45ca77a SHA512 3e9f3f2506d640e264c827eea141b7ad50dd81f8c8386323da1c77db5cf152d76d45aad8103315a0d2ce347999d08df7128ca7d641a20fc39bd5ac608f532516
diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-fix-c++14.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-fix-c++14.patch
new file mode 100644
index 000000000000..86ebdcccd5b8
--- /dev/null
+++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-fix-c++14.patch
@@ -0,0 +1,100 @@
+Fix building with C++14, which errors out due to narrowing conversions.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=593874
+
+--- a/src/main/cpp/locationinfo.cpp
++++ b/src/main/cpp/locationinfo.cpp
+@@ -153,8 +153,8 @@
+ 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,
++ 0x6E, 0x49, 0x6E, 0x66, 0x6F, (char)0xED, (char)0x99, (char)0xBB,
++ (char)0xE1, 0x4A, (char)0x91, (char)0xA5, 0x7C, 0x02, 0x00, 0x01,
+ 0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49,
+ 0x6E, 0x66, 0x6F,
+ 0x74, 0x00, 0x12, 0x4C, 0x6A,
+--- a/src/main/cpp/loggingevent.cpp
++++ b/src/main/cpp/loggingevent.cpp
+@@ -242,7 +242,7 @@
+ 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, (char)0xF3, (char)0xF2, (char)0xB9, 0x23, 0x74, 0x0B, (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,
+--- a/src/main/cpp/objectoutputstream.cpp
++++ b/src/main/cpp/objectoutputstream.cpp
+@@ -36,7 +36,7 @@
+ objectHandle(0x7E0000),
+ classDescriptions(new ClassDescriptionMap())
+ {
+- char start[] = { 0xAC, 0xED, 0x00, 0x05 };
++ char start[] = { (char)0xAC, (char)0xED, 0x00, 0x05 };
+ ByteBuffer buf(start, sizeof(start));
+ os->write(buf, p);
+ }
+@@ -85,7 +85,7 @@
+ 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,
++ (char)0xBB, 0x0F, 0x25, 0x21, 0x4A, (char)0xE4, (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,
+--- a/src/main/cpp/synchronized.cpp
++++ b/src/main/cpp/synchronized.cpp
+@@ -38,6 +38,9 @@
+ }
+
+ synchronized::~synchronized()
++#if __cplusplus >= 201103L
++ noexcept(false)
++#endif
+ {
+ #if APR_HAS_THREADS
+ apr_status_t stat = apr_thread_mutex_unlock(
+--- a/src/main/include/log4cxx/helpers/synchronized.h
++++ b/src/main/include/log4cxx/helpers/synchronized.h
+@@ -29,7 +29,11 @@
+ {
+ public:
+ synchronized(const Mutex& mutex);
+- ~synchronized();
++ ~synchronized()
++#if __cplusplus >= 201103L
++ noexcept(false)
++#endif
++;
+
+
+ private:
+--- a/src/test/cpp/xml/domtestcase.cpp
++++ b/src/test/cpp/xml/domtestcase.cpp
+@@ -190,9 +190,9 @@
+ 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 };
++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, (logchar)0xB3, 0 };
+ #endif
+ File file;
+ file.setPath(fname);
+@@ -209,9 +209,9 @@
+ 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, (logchar)0xE3, (logchar)0x86, (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, (logchar)0x3195, 0 };
+ #endif
+ File file;
+ file.setPath(fname);
diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch
new file mode 100644
index 000000000000..854d34a17492
--- /dev/null
+++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch
@@ -0,0 +1,12 @@
+Fix for gcc-4.4
+--- apache-log4cxx-0.10.0-orig/src/examples/cpp/console.cpp 2009-06-12 13:01:06.000000000 +0200
++++ apache-log4cxx-0.10.0/src/examples/cpp/console.cpp 2009-06-12 13:07:05.000000000 +0200
+@@ -15,6 +15,7 @@
+ * limitations under the License.
+ */
+
++#include <cstdio>
+ #include <cstdlib>
+ #include <cstring>
+ #include <log4cxx/logger.h>
+
diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-missing_includes.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-missing_includes.patch
new file mode 100644
index 000000000000..78a57916bde0
--- /dev/null
+++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-missing_includes.patch
@@ -0,0 +1,37 @@
+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,8 @@
+ * limitations under the License.
+ */
+
+-#include <stdlib.h>
++#include <cstdlib>
++#include <cstring>
+ #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;
+
diff --git a/dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch
new file mode 100644
index 000000000000..cedca2ccdf42
--- /dev/null
+++ b/dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch
@@ -0,0 +1,75 @@
+http://issues.apache.org/jira/browse/LOGCXX-299
+http://bugs.gentoo.org/show_bug.cgi?id=254920
+
+diff -ur apache-log4cxx-0.10.0.orig/src/main/cpp/odbcappender.cpp apache-log4cxx-0.10.0/src/main/cpp/odbcappender.cpp
+--- apache-log4cxx-0.10.0.orig/src/main/cpp/odbcappender.cpp 2008-04-01 01:34:09.000000000 +0300
++++ apache-log4cxx-0.10.0/src/main/cpp/odbcappender.cpp 2010-02-24 14:39:37.000000000 +0200
+@@ -167,7 +167,8 @@
+ throw SQLException( SQL_HANDLE_DBC, con, "Failed to allocate sql handle.", p);
+ }
+
+- SQLWCHAR* wsql = Transcoder::wencode(sql, p);
++ SQLWCHAR* wsql;
++ encode(&wsql, sql, p);
+ ret = SQLExecDirectW(stmt, wsql, SQL_NTS);
+
+ if (ret < 0)
+@@ -237,9 +238,10 @@
+ }
+
+
+- SQLWCHAR* wURL = Transcoder::wencode(databaseURL, p);
++ SQLWCHAR* wURL;
++ encode(&wURL, databaseURL, p);
+
+- wchar_t szOutConnectionString[1024];
++ SQLWCHAR szOutConnectionString[1024];
+ SQLSMALLINT nOutConnctionLength = 0;
+
+ ret = SQLDriverConnectW( connection, NULL,
+@@ -331,3 +333,31 @@
+ }
+ }
+ }
++
++void ODBCAppender::encode(wchar_t** dest, const LogString& src, Pool& p) {
++ *dest = Transcoder::wencode(src, p);
++}
++
++void ODBCAppender::encode(unsigned short** dest,
++ const LogString& src, Pool& p) {
++ // worst case double number of characters from UTF-8 or wchar_t
++ *dest = (unsigned short*)
++ p.palloc((src.size() + 1) * 2 * sizeof(unsigned short));
++ unsigned short* current = *dest;
++ for(LogString::const_iterator i = src.begin();
++ i != src.end();) {
++ unsigned int sv = Transcoder::decode(src, i);
++ if (sv < 0x10000) {
++ *current++ = (unsigned short) sv;
++ } else {
++ unsigned char u = (unsigned char) (sv >> 16);
++ unsigned char w = (unsigned char) (u - 1);
++ unsigned short hs = (0xD800 + ((w & 0xF) << 6) + ((sv & 0xFFFF) >> 10));
++ unsigned short ls = (0xDC00 + (sv && 0x3FF));
++ *current++ = (unsigned short) hs;
++ *current++ = (unsigned short) ls;
++ }
++ }
++ *current = 0;
++}
++
+diff -ur apache-log4cxx-0.10.0.orig/src/main/include/log4cxx/db/odbcappender.h apache-log4cxx-0.10.0/src/main/include/log4cxx/db/odbcappender.h
+--- apache-log4cxx-0.10.0.orig/src/main/include/log4cxx/db/odbcappender.h 2008-04-01 01:34:09.000000000 +0300
++++ apache-log4cxx-0.10.0/src/main/include/log4cxx/db/odbcappender.h 2010-02-24 14:39:39.000000000 +0200
+@@ -279,6 +279,10 @@
+ private:
+ ODBCAppender(const ODBCAppender&);
+ ODBCAppender& operator=(const ODBCAppender&);
++ static void encode(wchar_t** dest, const LogString& src,
++ log4cxx::helpers::Pool& p);
++ static void encode(unsigned short** dest, const LogString& src,
++ log4cxx::helpers::Pool& p);
+ }; // class ODBCAppender
+ LOG4CXX_PTR_DEF(ODBCAppender);
+
diff --git a/dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild b/dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild
new file mode 100644
index 000000000000..a305c20e25e5
--- /dev/null
+++ b/dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P=apache-${P}
+
+DESCRIPTION="Library of C++ classes for logging to files, syslog and other destinations"
+HOMEPAGE="http://logging.apache.org/log4cxx/"
+SRC_URI="mirror://apache/logging/${PN}/${PV}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~ppc-macos"
+IUSE="iodbc unicode odbc smtp"
+
+RDEPEND="dev-libs/apr:1
+ dev-libs/apr-util:1
+ odbc? (
+ iodbc? ( >=dev-db/libiodbc-3.52.4 )
+ !iodbc? ( dev-db/unixODBC ) )
+ smtp? ( net-libs/libesmtp )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+# test suite fails
+RESTRICT="test"
+
+HTML_DOCS=( site/. )
+PATCHES=(
+ "${FILESDIR}/${PN}-0.10.0-missing_includes.patch"
+ "${FILESDIR}/${PN}-0.10.0-gcc44.patch"
+ "${FILESDIR}/${PN}-0.10.0-unixODBC.patch"
+ "${FILESDIR}/${PN}-0.10.0-fix-c++14.patch"
+)
+
+pkg_setup() {
+ if use iodbc && ! use odbc; then
+ elog "Please enable the odbc USE-flag as well if you want odbc-support through iodbc."
+ fi
+}
+
+src_configure() {
+ econf \
+ --disable-doxygen \
+ --disable-html-docs \
+ --with-apr-util="${SYSROOT}${EPREFIX}/usr" \
+ $(use_with smtp SMTP libesmtp) \
+ $(use_with odbc ODBC $(usex iodbc iODBC unixODBC)) \
+ --with-charset=$(usex unicode utf-8 auto)
+}
+
+src_install() {
+ default
+
+ docinto examples
+ dodoc src/examples/cpp/*.cpp
+ docompress -x /usr/share/doc/${PF}/examples
+
+ # package provides .pc files
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/log4cxx/metadata.xml b/dev-libs/log4cxx/metadata.xml
new file mode 100644
index 000000000000..28b539fe62c2
--- /dev/null
+++ b/dev-libs/log4cxx/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>cpp@gentoo.org</email>
+ <name>Gentoo C++ Project</name>
+</maintainer>
+<use>
+ <flag name="smtp">Offer SMTP support via <pkg>net-libs/libesmtp</pkg></flag>
+</use>
+</pkgmetadata>