--- log4cxx-0.10.0.orig/debian/watch +++ log4cxx-0.10.0/debian/watch @@ -0,0 +1,6 @@ +# format version number, currently 3; this line is compulsory! +version=3 + +# this is the main Apache server as far as I can tell +# dists are in separate directories by version number +http://www.apache.org/dist/logging/log4cxx/(?:[\d\.]+)/apache-log4cxx-([\d\.]+)\.tar\.gz --- log4cxx-0.10.0.orig/debian/liblog4cxx10-doc.docs +++ log4cxx-0.10.0/debian/liblog4cxx10-doc.docs @@ -0,0 +1 @@ +debian/tmp/usr/share/log4cxx/html --- log4cxx-0.10.0.orig/debian/liblog4cxx10-dev.install +++ log4cxx-0.10.0/debian/liblog4cxx10-dev.install @@ -0,0 +1,4 @@ +usr/include +usr/lib/liblog4cxx.a +usr/lib/liblog4cxx.so +usr/lib/pkgconfig/liblog4cxx.pc --- log4cxx-0.10.0.orig/debian/liblog4cxx10-doc.doc-base +++ log4cxx-0.10.0/debian/liblog4cxx10-doc.doc-base @@ -0,0 +1,11 @@ +Document: liblog4cxx10-doc +Title: Log4cxx Reference Documentation +Author: Apache Software Foundation +Abstract: Log4cxx is the C++ port of log4j, a logging framework for JAVA. + Log4cxx attempts to mimic log4j usage as much as the language will + allow and to be compatible with log4j configuration and output formats. +Section: Programming/C++ + +Format: HTML +Index: /usr/share/doc/liblog4cxx10-doc/html/index.html +Files: /usr/share/doc/liblog4cxx10-doc/html/*.html --- log4cxx-0.10.0.orig/debian/rules +++ log4cxx-0.10.0/debian/rules @@ -0,0 +1,125 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# debian/rules for the log4cxx logging library +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + + +# shared library versions, option 1 +version=2.0.5 +major=2 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +configure: configure-stamp +configure-stamp: patch-stamp + dh_testdir + dh_autotools-dev_updateconfig + +# After the patches have been applied we need to clean up the timestamps +# of some files, otherwise we get some ugly warnings because make tries +# to rebuild the autoconf scripts. + touch aclocal.m4 + touch configure + find . -name "Makefile.in" -exec touch {} \; + + # Add here commands to configure the package. + touch configure-stamp + ./configure --prefix=/usr + + +build: build-stamp test-stamp +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +test-stamp: build-stamp +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + CLASSPATH=/usr/share/java/ant-contrib-cpptasks.jar ant run-unittest +endif + +clean-patched: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + + dh_autotools-dev_restoreconfig + dh_clean + +clean: clean-patched unpatch + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp + + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + + dh_installchangelogs -i + dh_installdocs -i + dh_installexamples -i + dh_install -i --sourcedir=debian/tmp + dh_compress -i + dh_fixperms -i + dh_installdeb -i + + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + + dh_installchangelogs -a + dh_installdocs -a + dh_installexamples -a + dh_install -a --sourcedir=debian/tmp + dh_installman -a + dh_strip -a + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a -V + dh_installdeb -a + dh_shlibdeps -a + + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- log4cxx-0.10.0.orig/debian/liblog4cxx10.install +++ log4cxx-0.10.0/debian/liblog4cxx10.install @@ -0,0 +1 @@ +usr/lib/liblog4cxx.so.* --- log4cxx-0.10.0.orig/debian/copyright +++ log4cxx-0.10.0/debian/copyright @@ -0,0 +1,23 @@ +This package was debianized by Andreas Fester on +Thu, 31 Mar 2005 22:49:55 +0200. + +It was downloaded from + http://logging.apache.org/log4cxx/download.html + +Upstream Authors: + Michael Catanzariti + Edmond Nolan + +Copyright 2004-2007 The Apache Software Foundation + +License: + +Licensed uder Apache License, Version 2.0; you may not use this work +except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + + On a Debian system, the license can be found at + /usr/share/common-licenses/Apache-2.0 . + --- log4cxx-0.10.0.orig/debian/liblog4cxx10-dev.dirs +++ log4cxx-0.10.0/debian/liblog4cxx10-dev.dirs @@ -0,0 +1,3 @@ +usr/lib +usr/lib/pkgconfig +usr/include --- log4cxx-0.10.0.orig/debian/compat +++ log4cxx-0.10.0/debian/compat @@ -0,0 +1 @@ +5 --- log4cxx-0.10.0.orig/debian/control +++ log4cxx-0.10.0/debian/control @@ -0,0 +1,38 @@ +Source: log4cxx +Section: devel +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Matthew Vernon +Homepage: http://logging.apache.org/log4cxx/index.html +Build-Depends: debhelper (>= 5), dpatch, zlib1g-dev, doxygen, graphviz, gsfonts, c++-compiler, libapr1-dev, libaprutil1-dev, ant, ant-contrib-cpptasks, zip, autotools-dev +Standards-Version: 3.8.0 + +Package: liblog4cxx10-dev +Section: libdevel +Architecture: any +Depends: liblog4cxx10 (= ${binary:Version}), libapr1-dev, libaprutil1-dev +Conflicts: liblog4cxx9-dev +Replaces: liblog4cxx9-dev +Suggests: liblog4cxx10-doc (= ${source:Version}), pkg-config +Description: A logging library for C++ (development files) + Log4cxx is the C++ port of log4j, a logging framework for JAVA. + Log4cxx attempts to mimic log4j usage as much as the language will + allow and to be compatible with log4j configuration and output formats. + +Package: liblog4cxx10 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A logging library for C++ + Log4cxx is the C++ port of log4j, a logging framework for JAVA. + Log4cxx attempts to mimic log4j usage as much as the language will + allow and to be compatible with log4j configuration and output formats. + +Package: liblog4cxx10-doc +Section: doc +Architecture: all +Depends: base-files (>=4.0.4) +Description: Documentation for log4cxx + Log4cxx is the C++ port of log4j, a logging framework for JAVA. + Log4cxx attempts to mimic log4j usage as much as the language will + allow and to be compatible with log4j configuration and output formats. --- log4cxx-0.10.0.orig/debian/changelog +++ log4cxx-0.10.0/debian/changelog @@ -0,0 +1,198 @@ +log4cxx (0.10.0-1.2ubuntu3) saucy; urgency=low + + * Use the autotools-dev dh addon to update config.guess/config.sub for + arm64. + + -- Colin Watson Mon, 14 Oct 2013 23:27:48 +0100 + +log4cxx (0.10.0-1.2ubuntu2) precise; urgency=low + + * Pass dh_makeshlibs to have stronger version dependencies. + (LP: #945112) + * d/rules: Run unit tests on build. (LP: #945118). d/control: add + ant, ant-contrib-cpptasks, and zip all used to run unit tests. + * d/patches/91-bugfix-LOGCXX-365.dpatch: Fixes test suite to run post + 2010. Upstream bug LOGCXX-365, fixed in next release. + + -- Clint Byrum Fri, 02 Mar 2012 14:54:05 -0800 + +log4cxx (0.10.0-1.2ubuntu1) oneiric; urgency=low + + * Merge from debian/unstable, new changes: + - debian/patches/130-bugfix-LOGCXX-322.dpatch: + patch from Stephan Sürke to fix a potential segfault on exit + (Closes: #578649) + - debian/patches/140-fix-socket-thread-not-starting.dpatch: + patch from Peter Soertens to fix an issue with the socket + reconnection thread not starting (LP: #785134) + + -- Andreas Moog Sun, 03 Jul 2011 10:22:17 +0000 + +log4cxx (0.10.0-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Don't ship .la files (Closes: #522197, #622538). + + -- Luk Claes Sun, 26 Jun 2011 15:11:52 +0200 + +log4cxx (0.10.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/patches/120-gcc-4.4.dpatch added, fixes FTBFS with + GCC 4.4, thanks to Martin Michlmayr (Closes: #510759) + + -- David Paleino Mon, 21 Dec 2009 17:10:21 +0100 + +log4cxx (0.10.0-1) unstable; urgency=low + + * New maintainer (Closes: #491015) + * New Upstream Release (Closes: #474138, #483191). + + * Upstream release no longer uses libxml2 (Closes: #475891, #416758) + + * debian/changelog: updated with new changes + * debian/watch: added watch file for uscan upstream version monitoring + * debian/control: added c++-compiler, libapr1-dev, and libaprutil1-dev to + Build-Depends + * debian/control: updated standards version to 3.0.0 (per lintian) + * debian/control: updated package names to log4cxx10* + * debian/control: added replaces and conflicts for -dev packages + to allow upgrade from liblog4cxx9-dev + * debian/control: added Homepage field to source package + * debian/control: changed debhelper version to >=5 + * debian/control: set conflict for liblog4cxx10-dev to liblog4cxx9-dev + * debian/control: added depends for liblog4cxx10-dev to libapr1-dev and + libaprutil1-dev + * debian/copyright: updated source location + * debian/copyright: removed apache license and referenced + /usr/share/common-licenses/Apache-2.0 + * debian/compat: changed to compatibility level 5 (recommended level) but + could be set back to 4 if someone tests it + * debian/docs: removed missing upstream files NEWS, README + * debian/liblog4cxx9*: moved to liblog4cxx10* + * debian/liblog4cxx10-doc.doc-base: changed name and install locations from + liblog4cxx9-doc to liblog4cxx10-doc + * debian/liblog4cxx10-doc.doc-base: changed section from Apps/Programming to + Programming/C++ per lintian warning + * debian/rules: removed changelog installation reference to ChangeLog which + no longer exists upstream + * debian/rules: changed "-$(MAKE) distclean" to "[ ! -f Makefile ] || + $(MAKE) distclean" per lintian + * debian/patches/50-pkgconfig.dpatch: removed - pkg-config was integrated + upstream + * debian/patches/60-gcc-4.1.dpatch: removed - patch was applied upstream + * debian/patches/70-gcc-4.3.dpatch: replaced with upstream patch + * debian/liblog4cxx10-dev.dirs: added /usr/lib/pkgconfig for install of + liblog4cxx.pc + * debian/patches/40-manpage.dpatch, debian/liblog4cxx10.manpages: removed - + simplesocketserver no longer in upstream source + * debian/liblog4cxx10.install: removed usr/bin - not used without + simplesocketserver which was removed upstream + * debian/patches/80-bugfix-LOGCXX-298.dpatch, 110-bugfix-LOGCXX-280.dpatch, + 100-bugfix-LOGCXX-284.dpatch, 110-bugfix-LOGCXX-249.dpatch: added + upstream build and crash bugfixes + + -- Matthew Vernon Wed, 16 Jul 2008 06:56:24 -0700 + +log4cxx (0.9.7-6.1) unstable; urgency=low + + * Non-maintainer upload. + * Add patches/70-gcc-4.3.dpatch to fix FTBFS with gcc-4.3, thanks to Brian + M. Carlson (Closes: 455134). + + -- Pierre Habouzit Sun, 16 Mar 2008 21:33:00 +0100 + +log4cxx (0.9.7-6) unstable; urgency=low + + * debian/patches: added descriptions to the patch files + * debian/control: removed Uploaders: line; changed standards + version to 3.7.2; made package relationships binary NMU safe + * debian/rules: separated architecture dependant from architecture + independant debfile creation; removed unnecessary handling of + nostrip option + * debian/rules, debian/control: Removed architecture dependant compiler + version for arm, hppa, m68k (closes: #343008) + + -- Andreas Fester Sat, 12 Aug 2006 11:23:05 +0200 + +log4cxx (0.9.7-5) unstable; urgency=low + + * debian/patches/60-gcc-4.1.dpatch: fixes FTBFS with gcc-4.1 + (closes: #358281) + * debian/liblog4cxx9-doc.doc-base: new file to create a doc-base entry + (closes: #348819) + + -- Andreas Fester Fri, 14 Apr 2006 14:23:21 +0000 + +log4cxx (0.9.7-4) unstable; urgency=low + + * debian/control: New library package name to force rebuild with + gcc >= 4.0.2-4 (closes: #339228) + * debian/control: Added Section header to source package + + -- Andreas Fester Sun, 18 Dec 2005 21:36:16 +0100 + +log4cxx (0.9.7-3) unstable; urgency=low + + * debian/: control, rules: Temporary fix for internal compiler error + on arm/m68k/hppa + * debian/control: fixed override disparity, changed section devel to + libdevel + + -- Andreas Fester Sun, 4 Sep 2005 12:34:12 +0200 + +log4cxx (0.9.7-2) unstable; urgency=low + + * debian/control: adjusted Standards-Version to 3.6.2 + * debian/control: removed build-dependency on libstdc++-3.3-dev + (closes: #321558) + + -- Andreas Fester Sat, 6 Aug 2005 10:33:54 +0200 + +log4cxx (0.9.7-1) unstable; urgency=low + + * debian/changelog: added summary of latest changes + * debian/rules: added target "apply-patches" to clean up timestamps + after the patches have been applied; no need to make "configure" + executable anymore since its now part of the .orig tarball + * debian/patches/50-pkgconfig.dpatch: added missing patch for configure and + Makefile.in + * debian/patches/Makefile, debian/patches/00list, debian/control, + debian/patches/50-pkgconfig.dpatch, debian/patches/40-manpage.dpatch, + debian/rules: Added dpatch support and moved changes outside of debian/ + into separate patch files + * Re-created .orig tarball so that it contains the configure script + * debian/control: added doc package version to Suggests: for dev + package + * debian/control: added doc package to the list of suggested packages for + the dev package + * debian/: rules, liblog4cxx9-dev.install, liblog4cxx9.install: moved .la + and .a files to the dev package, removed debian/tmp prefix and + use --sourcedir with dh_install + * debian/control: added build dependency to gsfonts, needed by + graphviz to properly render the diagrams + * debian/: liblog4cxx9-dev.install, liblog4cxx9.install: corrected file + format + * debian/control: added library SONAME to the doc package + * debian/: added library SONAME to the package files + * debian/control: added library SONAME to the package names + * debian/liblog4cxx.manpages: fixed path for man page + * docs/simplesocketserver.1: moved to the docs directory; man is the + output directory for doxygen generated man pages and is deleted by + distclean + * debian/rules: use distclean instead of clean to cleanup after the build + * Makefile.am, configure.in, pkgconfig/liblog4cxx.pc.in, + debian/control, liblog4cxx-dev.install: added pkgconfig files + (thanks to martin f. krafft ) + * debian/control: added "Uploaders:" entry; renamed package names from + log4cxx to liblog4cxx + * debian/: Renamed log4cxx packages to liblog4cxx + * debian/rules: must make configure executable before launching it + * debian/rules: removed call of ./autogen.sh + * autogen.sh: Modify upstream version to copy automake files instead of + linking them + + * Initial Release (closes: #303892) + + -- Andreas Fester Thu, 31 Mar 2005 22:49:55 +0200 + --- log4cxx-0.10.0.orig/debian/patches/80-bugfix-LOGCXX-298.dpatch +++ log4cxx-0.10.0/debian/patches/80-bugfix-LOGCXX-298.dpatch @@ -0,0 +1,28 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 80-bugfix-LOGCXX-298.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Bugfix for build errors with smtp + +@DPATCH@ +diff -urNad log4cxx-0.10.0~/src/main/cpp/smtpappender.cpp log4cxx-0.10.0/src/main/cpp/smtpappender.cpp +--- log4cxx-0.10.0~/src/main/cpp/smtpappender.cpp 2008-03-31 15:34:09.000000000 -0700 ++++ log4cxx-0.10.0/src/main/cpp/smtpappender.cpp 2008-07-17 06:39:34.000000000 -0700 +@@ -496,7 +496,7 @@ + activate &= asciiCheck(bcc, LOG4CXX_STR("bcc")); + activate &= asciiCheck(from, LOG4CXX_STR("from")); + +-#if !LOG4CXX_HAS_LIBESMTP ++#if !LOG4CXX_HAVE_LIBESMTP + LogLog::error(LOG4CXX_STR("log4cxx built without SMTP support.")); + activate = false; + #endif +@@ -598,7 +598,7 @@ + */ + void SMTPAppender::sendBuffer(Pool& p) + { +-#if LOG4CXX_HAS_LIBESMTP ++#if LOG4CXX_HAVE_LIBESMTP + // Note: this code already owns the monitor for this + // appender. This frees us from needing to synchronize on 'cb'. + try --- log4cxx-0.10.0.orig/debian/patches/70-gcc-4.3.dpatch +++ log4cxx-0.10.0/debian/patches/70-gcc-4.3.dpatch @@ -0,0 +1,43 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 50-gcc43.dpatch by Maik Beckmann (upstream developer) +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix build issue with gcc 4.3 from upstream patch (bug LOG4CXX-286 on Apache Jira) + +@DPATCH@ +diff --git a/src/examples/cpp/console.cpp b/src/examples/cpp/console.cpp +index 6a01d8a..a673a10 100755 +--- a/src/examples/cpp/console.cpp ++++ b/src/examples/cpp/console.cpp +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff --git a/src/main/cpp/inputstreamreader.cpp b/src/main/cpp/inputstreamreader.cpp +index 52b1c0a..cb45181 100644 +--- a/src/main/cpp/inputstreamreader.cpp ++++ b/src/main/cpp/inputstreamreader.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff --git a/src/main/cpp/socketoutputstream.cpp b/src/main/cpp/socketoutputstream.cpp +index 185f835..c61eb11 100644 +--- a/src/main/cpp/socketoutputstream.cpp ++++ b/src/main/cpp/socketoutputstream.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; --- log4cxx-0.10.0.orig/debian/patches/130-bugfix-LOGCXX-322.dpatch +++ log4cxx-0.10.0/debian/patches/130-bugfix-LOGCXX-322.dpatch @@ -0,0 +1,100 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 130-bugfix-LOGCXX-322.dpatch by Stephan Sürken +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: This is from a patch for Jira issue +## DP: https://issues.apache.org/jira/browse/LOGCXX-322 +## DP: published in the mailing list thread +## DP: http://mail-archives.apache.org/mod_mbox/logging-log4cxx-dev/200901.mbox/%3c1232120052.30824.62.camel@bjhlinux%3e +## DP: It's not yet (2010 Jul) accepted into svn, but it does fixes possible serious segfaults on program exit. + +@DPATCH@ +diff -urNad log4cxx-0.10.0~/src/main/cpp/aprinitializer.cpp log4cxx-0.10.0/src/main/cpp/aprinitializer.cpp +--- log4cxx-0.10.0~/src/main/cpp/aprinitializer.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ log4cxx-0.10.0/src/main/cpp/aprinitializer.cpp 2010-07-06 16:04:28.000000000 +0200 +@@ -42,7 +42,7 @@ + } + + APRInitializer::~APRInitializer() { +- apr_terminate(); ++ //apr_terminate(); + isDestructed = true; + } + +diff -urNad log4cxx-0.10.0~/src/main/cpp/level.cpp log4cxx-0.10.0/src/main/cpp/level.cpp +--- log4cxx-0.10.0~/src/main/cpp/level.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ log4cxx-0.10.0/src/main/cpp/level.cpp 2010-07-06 16:04:34.000000000 +0200 +@@ -30,44 +30,44 @@ + IMPLEMENT_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(Level, LevelClass) + + LevelPtr Level::getOff() { +- static LevelPtr level(new Level(Level::OFF_INT, LOG4CXX_STR("OFF"), 0)); +- return level; ++ static LevelPtr *level = new LevelPtr(new Level(Level::OFF_INT, LOG4CXX_STR("OFF"), 0)); ++ return *level; + } + + LevelPtr Level::getFatal() { +- static LevelPtr level(new Level(Level::FATAL_INT, LOG4CXX_STR("FATAL"), 0)); +- return level; ++ static LevelPtr *level = new LevelPtr((new Level(Level::FATAL_INT, LOG4CXX_STR("FATAL"), 0))); ++ return *level; + } + + LevelPtr Level::getError() { +- static LevelPtr level(new Level(Level::ERROR_INT, LOG4CXX_STR("ERROR"), 3)); +- return level; ++ static LevelPtr *level = new LevelPtr((new Level(Level::ERROR_INT, LOG4CXX_STR("ERROR"), 3))); ++ return *level; + } + + LevelPtr Level::getWarn() { +- static LevelPtr level(new Level(Level::WARN_INT, LOG4CXX_STR("WARN"), 4)); +- return level; ++ static LevelPtr *level = new LevelPtr((new Level(Level::WARN_INT, LOG4CXX_STR("WARN"), 4))); ++ return *level; + } + + LevelPtr Level::getInfo() { +- static LevelPtr level(new Level(Level::INFO_INT, LOG4CXX_STR("INFO"), 6)); +- return level; ++ static LevelPtr *level = new LevelPtr((new Level(Level::INFO_INT, LOG4CXX_STR("INFO"), 6))); ++ return *level; + } + + LevelPtr Level::getDebug() { +- static LevelPtr level(new Level(Level::DEBUG_INT, LOG4CXX_STR("DEBUG"), 7)); +- return level; ++ static LevelPtr *level = new LevelPtr((new Level(Level::DEBUG_INT, LOG4CXX_STR("DEBUG"), 7))); ++ return *level; + } + + LevelPtr Level::getTrace() { +- static LevelPtr level(new Level(Level::TRACE_INT, LOG4CXX_STR("TRACE"), 7)); +- return level; ++ static LevelPtr *level = new LevelPtr((new Level(Level::TRACE_INT, LOG4CXX_STR("TRACE"), 7))); ++ return *level; + } + + + LevelPtr Level::getAll() { +- static LevelPtr level(new Level(Level::ALL_INT, LOG4CXX_STR("ALL"), 7)); +- return level; ++ static LevelPtr *level = new LevelPtr((new Level(Level::ALL_INT, LOG4CXX_STR("ALL"), 7))); ++ return *level; + } + + +diff -urNad log4cxx-0.10.0~/src/main/cpp/logmanager.cpp log4cxx-0.10.0/src/main/cpp/logmanager.cpp +--- log4cxx-0.10.0~/src/main/cpp/logmanager.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ log4cxx-0.10.0/src/main/cpp/logmanager.cpp 2010-07-06 16:04:21.000000000 +0200 +@@ -57,7 +57,8 @@ + // call to initialize APR and trigger "start" of logging clock + // + APRInitializer::initialize(); +- static spi::RepositorySelectorPtr selector; ++ static spi::RepositorySelectorPtr * pselector = new spi::RepositorySelectorPtr; ++ static spi::RepositorySelectorPtr & selector = * pselector; + return selector; + } + --- log4cxx-0.10.0.orig/debian/patches/120-gcc-4.4.dpatch +++ log4cxx-0.10.0/debian/patches/120-gcc-4.4.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 120-gcc-4.4.dpatch by Martin Michlmayr +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: FTBFS with GCC 4.4: missing #include + +@DPATCH@ +diff -urNad log4cxx-0.10.0~/src/examples/cpp/console.cpp log4cxx-0.10.0/src/examples/cpp/console.cpp +--- log4cxx-0.10.0~/src/examples/cpp/console.cpp 2009-12-21 17:09:09.000000000 +0100 ++++ log4cxx-0.10.0/src/examples/cpp/console.cpp 2009-12-21 17:09:24.000000000 +0100 +@@ -15,6 +15,7 @@ + * limitations under the License. + */ + ++#include + #include + #include + #include --- log4cxx-0.10.0.orig/debian/patches/140-fix-socket-thread-not-starting.dpatch +++ log4cxx-0.10.0/debian/patches/140-fix-socket-thread-not-starting.dpatch @@ -0,0 +1,74 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +Description: The thread that needs to do the reconnection is never started. +Bug-Ubuntu: https://bugs.launchpad.net/bugs/785134 +Author: Peter Soetens + +diff -aur apache-log4cxx-0.10.0.orig/src/main/cpp/socketappenderskeleton.cpp apache-log4cxx-0.10.0.new/src/main/cpp/socketappenderskeleton.cpp +--- apache-log4cxx-0.10.0.orig/src/main/cpp/socketappenderskeleton.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ apache-log4cxx-0.10.0.new/src/main/cpp/socketappenderskeleton.cpp 2011-05-19 18:11:47.293896800 +0200 +@@ -28,7 +28,6 @@ + #include + #include + +- + using namespace log4cxx; + using namespace log4cxx::helpers; + using namespace log4cxx::net; +@@ -130,8 +129,13 @@ + void SocketAppenderSkeleton::fireConnector() + { + synchronized sync(mutex); +- if (thread.isActive()) { +- thread.run(monitor, this); ++ if ( !thread.isAlive() ) { ++ LogLog::debug(LOG4CXX_STR( "Connector thread not alive: starting monitor.")); ++ try { ++ thread.run(monitor, this); ++ } catch( ThreadException& te ) { ++ LogLog::error(LOG4CXX_STR("Monitor not started: "), te ); ++ } + } + } + +diff -aur apache-log4cxx-0.10.0.orig/src/main/cpp/threadcxx.cpp apache-log4cxx-0.10.0.new/src/main/cpp/threadcxx.cpp +--- apache-log4cxx-0.10.0.orig/src/main/cpp/threadcxx.cpp 2008-04-01 00:34:09.000000000 +0200 ++++ apache-log4cxx-0.10.0.new/src/main/cpp/threadcxx.cpp 2011-05-19 18:10:05.422074536 +0200 +@@ -57,6 +57,11 @@ + + void Thread::run(Runnable start, void* data) { + #if APR_HAS_THREADS ++ // Try to join first if previous instance did exit ++ if ( isActive() && !isAlive() ) { ++ join(); ++ } ++ // now we're ready to create the thread again + // + // if attempting a second run method on the same Thread object + // throw an exception +@@ -77,6 +82,9 @@ + if (stat != APR_SUCCESS) { + throw ThreadException(stat); + } ++ // we need to set alive here already, since we use isAlive() to check ++ // if run() has been called in a thread-safe way. ++ apr_atomic_set32(&alive, 0xFFFFFFFF); + #else + throw ThreadException(LOG4CXX_STR("APR_HAS_THREADS is not true")); + #endif +@@ -96,10 +104,12 @@ + LaunchPackage* package = (LaunchPackage*) data; + ThreadLocal& tls = getThreadLocal(); + tls.set(package->getThread()); +- LaunchStatus alive(&package->getThread()->alive); +- void* retval = (package->getRunnable())(thread, package->getData()); +- apr_thread_exit(thread, 0); +- return retval; ++ { ++ (package->getRunnable())(thread, package->getData()); ++ package->getThread()->ending(); ++ } ++ apr_thread_exit(thread, 0); // this function never returns ! ++ return 0; + } + #endif + --- log4cxx-0.10.0.orig/debian/patches/Makefile +++ log4cxx-0.10.0/debian/patches/Makefile @@ -0,0 +1,4 @@ + +.PHONY: 00list +00list: $(wildcard *.dpatch) + ls -1 $^ | sed -ne 's,\.dpatch,,p' >| $@ --- log4cxx-0.10.0.orig/debian/patches/90-bugfix-LOGCXX-280.dpatch +++ log4cxx-0.10.0/debian/patches/90-bugfix-LOGCXX-280.dpatch @@ -0,0 +1,42 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 110-bugfix-LOGCXX-280.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: fixes build problem on HP-UX + +@DPATCH@ +diff -urNad log4cxx-0.10.0~/src/changes/changes.xml log4cxx-0.10.0/src/changes/changes.xml +--- log4cxx-0.10.0~/src/changes/changes.xml 2008-03-31 15:34:52.000000000 -0700 ++++ log4cxx-0.10.0/src/changes/changes.xml 2008-07-17 06:55:12.000000000 -0700 +@@ -227,6 +227,7 @@ + ServerSocket::accept hangs on Unix + unable to build from make dist package due to missing doxygen file + Several appenders fail to compile in Visual Studio 2008 ++tests and sample code unnecessarily compiled during default make target + + + Fixed examples source code in the "Short introduction to log4cxx". +diff -urNad log4cxx-0.10.0~/src/examples/cpp/Makefile.am log4cxx-0.10.0/src/examples/cpp/Makefile.am +--- log4cxx-0.10.0~/src/examples/cpp/Makefile.am 2008-03-31 15:34:52.000000000 -0700 ++++ log4cxx-0.10.0/src/examples/cpp/Makefile.am 2008-07-17 06:53:23.000000000 -0700 +@@ -13,7 +13,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + # +-noinst_PROGRAMS = trivial delayedloop stream console ++check_PROGRAMS = trivial delayedloop stream console + + INCLUDES = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include + +diff -urNad log4cxx-0.10.0~/src/test/cpp/Makefile.am log4cxx-0.10.0/src/test/cpp/Makefile.am +--- log4cxx-0.10.0~/src/test/cpp/Makefile.am 2008-03-31 15:33:32.000000000 -0700 ++++ log4cxx-0.10.0/src/test/cpp/Makefile.am 2008-07-17 06:53:50.000000000 -0700 +@@ -24,7 +24,7 @@ + + INCLUDES = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include + +-noinst_PROGRAMS = testsuite ++check_PROGRAMS = testsuite + + customlogger_tests = \ + customlogger/xlogger.cpp\ --- log4cxx-0.10.0.orig/debian/patches/100-bugfix-LOGCXX-284.dpatch +++ log4cxx-0.10.0/debian/patches/100-bugfix-LOGCXX-284.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 100-bugfix-LOGCXX-284.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixes build error on AIX with xlc_r + +@DPATCH@ +diff -urNad log4cxx-0.10.0~/src/test/cpp/helpers/datetimedateformattestcase.cpp log4cxx-0.10.0/src/test/cpp/helpers/datetimedateformattestcase.cpp +--- log4cxx-0.10.0~/src/test/cpp/helpers/datetimedateformattestcase.cpp 2008-03-31 15:33:09.000000000 -0700 ++++ log4cxx-0.10.0/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 buffer; +-#if defined(_USEFAC) ++#if defined(_MSC_VER) && _MSC_VER < 1300 + _USEFAC(locale, std::time_put) + .put(buffer, buffer, &date, fmt.c_str(), fmt.c_str() + fmt.length()); + #else --- log4cxx-0.10.0.orig/debian/patches/00list +++ log4cxx-0.10.0/debian/patches/00list @@ -0,0 +1,9 @@ +70-gcc-4.3.dpatch +80-bugfix-LOGCXX-298 +90-bugfix-LOGCXX-280 +91-bugfix-LOGCXX-365 +100-bugfix-LOGCXX-284 +110-bugfix-LOGCXX-249 +120-gcc-4.4.dpatch +130-bugfix-LOGCXX-322.dpatch +140-fix-socket-thread-not-starting.dpatch --- log4cxx-0.10.0.orig/debian/patches/110-bugfix-LOGCXX-249.dpatch +++ log4cxx-0.10.0/debian/patches/110-bugfix-LOGCXX-249.dpatch @@ -0,0 +1,61 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 110-bugfix-LOGCXX-249.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixes crash when using ConsoleAppender without setting a layout + +@DPATCH@ +diff -urNad log4cxx-0.10.0~/src/changes/changes.xml log4cxx-0.10.0/src/changes/changes.xml +--- log4cxx-0.10.0~/src/changes/changes.xml 2008-03-31 15:34:52.000000000 -0700 ++++ log4cxx-0.10.0/src/changes/changes.xml 2008-07-17 06:58:26.000000000 -0700 +@@ -219,6 +219,7 @@ + Config refresh hangs a client application that uses TelnetAppender + MSVC project has wrong additional include directories + ODBCAppender has unicode issues ++Console appender crashes if layout is not set + NDC::cloneStack and NDC::inherit missing in 0.10.0 RC2 + Add documentation for use of operator<< in logging requests + Transcoder compilation error with utf-8 charset +diff -urNad log4cxx-0.10.0~/src/main/cpp/writerappender.cpp log4cxx-0.10.0/src/main/cpp/writerappender.cpp +--- log4cxx-0.10.0~/src/main/cpp/writerappender.cpp 2008-03-31 15:34:09.000000000 -0700 ++++ log4cxx-0.10.0/src/main/cpp/writerappender.cpp 2008-07-17 06:57:48.000000000 -0700 +@@ -115,6 +115,10 @@ + + return false; + } ++ ++ if (layout == 0) { ++ return false; ++ } + + return true; + } +diff -urNad log4cxx-0.10.0~/src/test/cpp/consoleappendertestcase.cpp log4cxx-0.10.0/src/test/cpp/consoleappendertestcase.cpp +--- log4cxx-0.10.0~/src/test/cpp/consoleappendertestcase.cpp 2008-03-31 15:33:32.000000000 -0700 ++++ log4cxx-0.10.0/src/test/cpp/consoleappendertestcase.cpp 2008-07-17 06:59:42.000000000 -0700 +@@ -33,7 +33,7 @@ + // + LOGUNIT_TEST(testDefaultThreshold); + LOGUNIT_TEST(testSetOptionThreshold); +- ++ LOGUNIT_TEST(testNoLayout); + LOGUNIT_TEST_SUITE_END(); + + +@@ -42,6 +42,16 @@ + WriterAppender* createWriterAppender() const { + return new log4cxx::ConsoleAppender(); + } ++ ++ void testNoLayout() { ++ Pool p; ++ ConsoleAppenderPtr appender(new ConsoleAppender()); ++ appender->activateOptions(p); ++ LoggerPtr logger(Logger::getRootLogger()); ++ logger->addAppender(appender); ++ LOG4CXX_INFO(logger, "No layout specified for ConsoleAppender"); ++ logger->removeAppender(appender); ++ } + }; + + LOGUNIT_TEST_SUITE_REGISTRATION(ConsoleAppenderTestCase); --- log4cxx-0.10.0.orig/debian/patches/91-bugfix-LOGCXX-365.dpatch +++ log4cxx-0.10.0/debian/patches/91-bugfix-LOGCXX-365.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 91-bugfix-LOGCXX-365.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: fixes test suite to not expect the year to be between 2000 and 2009. +## DP: ORIGIN: http://svn.apache.org/viewvc?view=rev&rev=954335 +## DP: Upstream bug https://issues.apache.org/jira/browse/LOGCXX-365 + +@DPATCH@ +--- a/src/test/cpp/util/filter.h 2010/06/14 00:24:42 954334 ++++ b/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]+" +