summaryrefslogtreecommitdiff
path: root/dev-libs/log4cxx
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/log4cxx
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/log4cxx')
-rw-r--r--dev-libs/log4cxx/Manifest1
-rw-r--r--dev-libs/log4cxx/files/0.10.0-missing_includes.patch37
-rw-r--r--dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch12
-rw-r--r--dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch75
-rw-r--r--dev-libs/log4cxx/log4cxx-0.10.0.ebuild65
-rw-r--r--dev-libs/log4cxx/metadata.xml11
6 files changed, 201 insertions, 0 deletions
diff --git a/dev-libs/log4cxx/Manifest b/dev-libs/log4cxx/Manifest
new file mode 100644
index 00000000000..ddaffb727af
--- /dev/null
+++ b/dev-libs/log4cxx/Manifest
@@ -0,0 +1 @@
+DIST apache-log4cxx-0.10.0.tar.gz 1667425 SHA256 0de0396220a9566a580166e66b39674cb40efd2176f52ad2c65486c99c920c8c SHA512 1c34d80983db5648bc4582ddcf6b4fdefdc6594c2769f95235f5441cd6d03cf279cc8f365e9a687085b113f79ebac9d7d33a54b6aa3b3b808c0e1a56a15ffa37 WHIRLPOOL 5d541b2113fa6170fcedd025182ce99dd6e6540ab29b5d751c823cef685bbc502c3e3ba9966671d86d3f1acb43b224bf88fcbcc206010d748b204fca586ef153
diff --git a/dev-libs/log4cxx/files/0.10.0-missing_includes.patch b/dev-libs/log4cxx/files/0.10.0-missing_includes.patch
new file mode 100644
index 00000000000..78a57916bde
--- /dev/null
+++ b/dev-libs/log4cxx/files/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-gcc44.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-gcc44.patch
new file mode 100644
index 00000000000..854d34a1749
--- /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-unixODBC.patch b/dev-libs/log4cxx/files/log4cxx-0.10.0-unixODBC.patch
new file mode 100644
index 00000000000..cedca2ccdf4
--- /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.ebuild b/dev-libs/log4cxx/log4cxx-0.10.0.ebuild
new file mode 100644
index 00000000000..95e94378362
--- /dev/null
+++ b/dev-libs/log4cxx/log4cxx-0.10.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils
+
+MY_P=apache-${P}
+
+DESCRIPTION="Library of C++ classes for flexible 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"
+
+DEPEND="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 )"
+
+S=${WORKDIR}/${MY_P}
+
+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_prepare() {
+ epatch "${FILESDIR}"/${PV}-missing_includes.patch \
+ "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-unixODBC.patch
+}
+
+src_configure() {
+ local myconf
+ use smtp && myconf="${myconf} --with-SMTP=libesmtp"
+ if use odbc; then
+ if use iodbc; then
+ myconf="${myconf} --with-ODBC=iODBC"
+ else
+ myconf="${myconf} --with-ODBC=unixODBC"
+ fi
+ fi
+ use unicode && myconf="${myconf} --with-charset=utf-8"
+
+ econf \
+ --disable-doxygen \
+ --disable-html-docs \
+ --with-apr-util="${SYSROOT:-${EPREFIX}}/usr" \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dohtml -r site/*
+
+ insinto /usr/share/doc/${PF}/examples
+ doins src/examples/cpp/*.cpp
+}
diff --git a/dev-libs/log4cxx/metadata.xml b/dev-libs/log4cxx/metadata.xml
new file mode 100644
index 00000000000..6c89210a566
--- /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>
+<herd>cpp</herd>
+<use>
+ <flag name='smtp' restrict='&lt;dev-libs/log4cxx-0.10'>Offer SMTP support via
+ <pkg>net-libs/libsmtp</pkg></flag>
+ <flag name='smtp' restrict='&gt;=dev-libs/log4cxx-0.10'>Offer SMTP support via
+ <pkg>net-libs/libesmtp</pkg></flag>
+</use>
+</pkgmetadata>