commit:     e4a4fa20a6e983c3819af888c35db4c61a715856
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 23:42:18 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 23:58:28 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4a4fa20

dev-libs/log4cxx: Allow for compiling with GCC 6

Gentoo-bug: 593874
* EAPI=6
* [QA] Fixed overlong DESCRIPTION

Package-Manager: portage-2.3.0

 .../log4cxx/files/log4cxx-0.10.0-fix-c++14.patch   | 100 +++++++++++++++++++++
 dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild          |  64 +++++++++++++
 2 files changed, 164 insertions(+)

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 00000000..86ebdcc
--- /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/log4cxx-0.10.0-r1.ebuild 
b/dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild
new file mode 100644
index 00000000..d9e8878
--- /dev/null
+++ b/dev-libs/log4cxx/log4cxx-0.10.0-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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}/${PV}-missing_includes.patch"
+       "${FILESDIR}/${P}-gcc44.patch"
+       "${FILESDIR}/${P}-unixODBC.patch"
+       "${FILESDIR}/${P}-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
+}

Reply via email to