diff --git a/03_aclocal_automake.diff b/03_aclocal_automake.diff new file mode 100644 index 0000000000000000000000000000000000000000..503c197d4e674accc0bbf4e08d78eaa8aa2083fa --- /dev/null +++ b/03_aclocal_automake.diff @@ -0,0 +1,8 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,3 +1,5 @@ ++ACLOCAL_AMFLAGS = -I m4 ++ + if DOC + SUBDIRS = msvc6 bcb5 config src include tests doc + else diff --git a/log4cpp-1.0-fix-doc-dest.patch b/log4cpp-1.0-fix-doc-dest.patch new file mode 100644 index 0000000000000000000000000000000000000000..aa7f60c4afed262dfc9bf082d695bc83e8102209 --- /dev/null +++ b/log4cpp-1.0-fix-doc-dest.patch @@ -0,0 +1,46 @@ +--- log4cpp-1.0.orig/doc/Makefile.am 2007-09-03 05:50:42.000000000 -0400 ++++ log4cpp-1.0/doc/Makefile.am 2008-12-12 12:14:24.000000000 -0500 +@@ -1,7 +1,7 @@ + SUBDIRS = html + + man3dir = $(mandir)/man3 +-docdir = $(prefix)/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@ ++docdir = $(prefix)/share/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@ + + EXTRA_DIST = \ + mainPage.txt +@@ -22,23 +22,23 @@ + + + install-data-local: +- $(mkinstalldirs) $(man3dir) ++ $(mkinstalldirs) $(DESTDIR)/$(man3dir) + @for i in ./man/man3/log4cpp.3 ./man/man3/log4cpp_*.3; do \ + inst=`basename $$i | sed 's/_/::/g'`; \ + echo "$(INSTALL_DATA) $$i$(man3dir)/$$inst"; \ +- $(INSTALL_DATA) $$i $(man3dir)/$$inst; \ ++ $(INSTALL_DATA) $$i $(DESTDIR)/$(man3dir)/$$inst; \ + done +- $(mkinstalldirs) $(docdir) +- cp -r html/. $(docdir) +- $(RM) -r -f $(docdir)/CVS \ +- $(docdir)/Makefile.am \ +- $(docdir)/Makefile.in \ +- $(docdir)/Makefile ++ $(mkinstalldirs) $(DESTDIR)/$(docdir) ++ cp -r html/. $(DESTDIR)/$(docdir) ++ $(RM) -r -f $(DESTDIR)/$(docdir)/CVS \ ++ $(DESTDIR)/$(docdir)/Makefile.am \ ++ $(DESTDIR)/$(docdir)/Makefile.in \ ++ $(DESTDIR)/$(docdir)/Makefile + + uninstall-local: +- $(RM) $(man3dir)/log4cpp.3 +- $(RM) $(man3dir)/log4cpp::*.3 +- $(RM) -r -f $(docdir) ++ $(RM) $(DESTDIR)/$(man3dir)/log4cpp.3 ++ $(RM) $(DESTDIR)/$(man3dir)/log4cpp::*.3 ++ $(RM) -r -f $(DESTDIR)/$(docdir) + + clean-local: + $(RM) -r latex diff --git a/log4cpp-1.0-gcc43.patch b/log4cpp-1.0-gcc43.patch new file mode 100644 index 0000000000000000000000000000000000000000..9979426b789dacbcb15ec9fb9045b0e2f35dfe07 --- /dev/null +++ b/log4cpp-1.0-gcc43.patch @@ -0,0 +1,34 @@ +Only in log4cpp-1.0: config.log +diff -ru log4cpp-1.0.orig/src/BasicLayout.cpp log4cpp-1.0/src/BasicLayout.cpp +--- log4cpp-1.0.orig/src/BasicLayout.cpp 2006-09-30 02:03:20.000000000 -0400 ++++ log4cpp-1.0/src/BasicLayout.cpp 2008-12-12 12:01:16.000000000 -0500 +@@ -8,6 +8,8 @@ + */ + + #include "PortabilityImpl.hh" ++#include ++#include + #include + #include + #include +Only in log4cpp-1.0/src: BasicLayout.cpp~ +Only in log4cpp-1.0/src: BasicLayout.cpp.gcc43 +Only in log4cpp-1.0/src/.deps: BasicLayout.Tpo +Only in log4cpp-1.0/src/.deps: PatternLayout.Plo +Only in log4cpp-1.0.orig/src/.deps: PatternLayout.Tpo +Only in log4cpp-1.0/src/.libs: PatternLayout.o +diff -ru log4cpp-1.0.orig/src/PatternLayout.cpp log4cpp-1.0/src/PatternLayout.cpp +--- log4cpp-1.0.orig/src/PatternLayout.cpp 2007-08-28 03:54:12.000000000 -0400 ++++ log4cpp-1.0/src/PatternLayout.cpp 2008-12-12 11:57:59.000000000 -0500 +@@ -8,6 +8,7 @@ + + #include "PortabilityImpl.hh" + ++#include + #include + #include + #include +Only in log4cpp-1.0/src: PatternLayout.cpp.gcc43 +Only in log4cpp-1.0/src: PatternLayout.lo +Only in log4cpp-1.0.orig/src: PatternLayout.loT +Only in log4cpp-1.0/src: PatternLayout.o diff --git a/log4cpp-1.0-no-snprintf.patch b/log4cpp-1.0-no-snprintf.patch new file mode 100644 index 0000000000000000000000000000000000000000..bd367df9bbf56392a6f8651a01e2a764cae417ef --- /dev/null +++ b/log4cpp-1.0-no-snprintf.patch @@ -0,0 +1,24 @@ +diff -up log4cpp/src/Makefile.am.no-snprintf log4cpp/src/Makefile.am +--- log4cpp/src/Makefile.am.no-snprintf 2017-07-12 23:39:11.000000000 -0600 ++++ log4cpp/src/Makefile.am 2019-11-20 09:24:22.934246996 -0700 +@@ -2,7 +2,7 @@ lib_LTLIBRARIES = liblog4cpp.la + + INCLUDES = -I$(top_srcdir)/include + +-noinst_HEADERS = snprintf.c Localtime.hh ++noinst_HEADERS = Localtime.hh + + liblog4cpp_la_SOURCES = \ + Appender.cpp \ +diff -up log4cpp/src/Makefile.in.no-snprintf log4cpp/src/Makefile.in +--- log4cpp/src/Makefile.in.no-snprintf 2019-11-20 09:24:22.936246987 -0700 ++++ log4cpp/src/Makefile.in 2019-11-20 09:25:05.758058149 -0700 +@@ -297,7 +297,7 @@ top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + lib_LTLIBRARIES = liblog4cpp.la + INCLUDES = -I$(top_srcdir)/include +-noinst_HEADERS = snprintf.c Localtime.hh ++noinst_HEADERS = Localtime.hh + liblog4cpp_la_SOURCES = Appender.cpp AppenderSkeleton.cpp \ + AppendersFactory.cpp BufferingAppender.cpp FactoryParams.cpp \ + LayoutsFactory.cpp LevelEvaluator.cpp Localtime.cpp \ diff --git a/log4cpp-1.0-remove-pc-cflags.patch b/log4cpp-1.0-remove-pc-cflags.patch new file mode 100644 index 0000000000000000000000000000000000000000..00d4d3e023371e8077e979cda8b5690109789f3c --- /dev/null +++ b/log4cpp-1.0-remove-pc-cflags.patch @@ -0,0 +1,20 @@ +--- log4cpp-1.0.orig/log4cpp.pc.in 2008-12-12 11:37:04.000000000 -0500 ++++ log4cpp-1.0/log4cpp.pc.in 2008-12-12 12:07:24.000000000 -0500 +@@ -6,5 +6,5 @@ + Name: @PACKAGE@ + Description: C++ library for flexible logging, modeled after Log4j + Version: @VERSION@ +-Libs: -L${libdir} @log4cpp_libs@ ++Libs: -L${libdir} + Cflags: -I${includedir} @log4cpp_cflags@ +--- log4cpp-1.0.orig/m4/ac_config_pkgconfig_in.m4 2004-01-27 05:27:38.000000000 -0500 ++++ log4cpp-1.0/m4/ac_config_pkgconfig_in.m4 2008-12-12 12:10:47.000000000 -0500 +@@ -121,7 +121,7 @@ + fi + echo 'Version: @VERSION@' >>$PKGCONFIG_FILE + echo 'Libs: -L${libdir} @MODULE_DOWN[]_libs@' >>$PKGCONFIG_FILE +-echo 'Cflags: -I${includedir} @MODULE_DOWN[]_cflags@' >>$PKGCONFIG_FILE ++echo 'Cflags: -I${includedir}' >>$PKGCONFIG_FILE + m4_pushdef([PKGCONFIG_UP], [m4_translit([$1], [a-z], [A-Z])])dnl + PKGCONFIG_UP[]_PKGCONFIG="PKGCONFIG_DIR[]$1-config" + AC_SUBST(PKGCONFIG_UP[]_PKGCONFIG) diff --git a/log4cpp-1.1.3.tar.gz b/log4cpp-1.1.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..920e9da72e06e85c0569ac7c8447f98962454c82 Binary files /dev/null and b/log4cpp-1.1.3.tar.gz differ diff --git a/log4cpp-version-1.1.3.patch b/log4cpp-version-1.1.3.patch new file mode 100644 index 0000000000000000000000000000000000000000..79e2999c9e75bf51c2012cb5fddf5e0f5d7b123a --- /dev/null +++ b/log4cpp-version-1.1.3.patch @@ -0,0 +1,9 @@ +diff -uNr log4cpp.ORIG/configure.in log4cpp/configure.in +--- log4cpp.ORIG/configure.in 2015-03-23 14:35:01.946455951 +0100 ++++ log4cpp/configure.in 2015-03-23 14:35:25.304824413 +0100 +@@ -1,4 +1,4 @@ +-AC_INIT(log4cpp, 1.1) ++AC_INIT(log4cpp, 1.1.3) + + # autoconf 2.50 or higher to rebuild aclocal.m4, because the + # AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro. diff --git a/log4cpp.spec b/log4cpp.spec new file mode 100644 index 0000000000000000000000000000000000000000..99ed513e4b39dce89eb7522c9525e2f7ac8045ac --- /dev/null +++ b/log4cpp.spec @@ -0,0 +1,97 @@ +%define anolis_release 1 +%define __brp_remove_la_files %{nil} + +Name: log4cpp +Version: 1.1.3 +Release: %{anolis_release}%{?dist} +Summary: C++ logging library + +License: LGPLv2+ +URL: http://sourceforge.net/projects/log4cpp/ +Source0: http://downloads.sourceforge.net/log4cpp/%{name}-%{version}.tar.gz +# Fix errors when compiling with gcc >= 4.3 +Patch0: log4cpp-1.0-gcc43.patch +# Don't put build cflags in .pc +Patch1: log4cpp-1.0-remove-pc-cflags.patch +# Install docs into DESTDIR +Patch2: log4cpp-1.0-fix-doc-dest.patch +# Don't try to build snprintf.c +Patch3: log4cpp-1.0-no-snprintf.patch +# Version is actually 1.1.3 +Patch4: log4cpp-version-1.1.3.patch +Patch5: 03_aclocal_automake.diff + +BuildRequires: gcc-c++ +BuildRequires: doxygen +BuildRequires: automake, autoconf, libtool +BuildRequires: make + +%description +A library of C++ classes for flexible logging to files, syslog, IDSA and +other destinations. It is modeled after the Log for Java library +(http://www.log4j.org), staying as close to their API as is reasonable. + +%package devel +Summary: Header files, libraries and development man pages %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the header files, static libraries and development +man pages for %{name}. If you like to develop programs using %{name}, +you will need to install %{name}-devel. + +%package static +Summary: Static files for %{name} +Requires: %{name} = %{version}-%{release} + +%description static +Static files for %{name} + +%package doc +Summary: Development documentation for %{name} +Requires: %{name} = %{version}-%{release} + +%description doc +This package contains the development documentation for %{name}. +If you like to documentation to develop programs using %{name}, +you will need to install %{name}-devel. + +%prep +%autosetup -n log4cpp -p1 +rm -rf src/snprintf.c +#Convert line endings. +iconv -f iso8859-1 -t utf-8 ChangeLog > ChangeLog.conv && mv -f ChangeLog.conv ChangeLog + +%build +autoreconf -fi +%configure +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} +mv %{buildroot}/usr/share/doc/log4cpp-%{version} rpmdocs + +%ldconfig_scriptlets + +%files +%license ChangeLog COPYING +%{_libdir}/liblog4cpp.so.5* + +%files devel +%{_bindir}/log4cpp-config +%{_includedir}/log4cpp/ +%{_libdir}/liblog4cpp.so +%{_libdir}/pkgconfig/log4cpp.pc +%{_datadir}/aclocal/log4cpp.m4 +%{_mandir}/man3/log4cpp* + +%files static +%{_libdir}/*.a +%{_libdir}/*.la + +%files doc +%doc rpmdocs/* + +%changelog +* Mon Sep 05 2022 happy_orange - 1.1.3-1 +- Init package from upstream