package init

This commit is contained in:
chengzihan2 2021-01-20 16:58:10 +08:00
parent 61d7ba73a2
commit 608a9c1331
7 changed files with 214 additions and 0 deletions

View File

@ -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

34
log4cpp-1.0-gcc43.patch Normal file
View File

@ -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 <cstdlib>
+#include <memory>
#include <log4cpp/BasicLayout.hh>
#include <log4cpp/Priority.hh>
#include <log4cpp/FactoryParams.hh>
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 <cstdlib>
#include <log4cpp/PatternLayout.hh>
#include <log4cpp/Priority.hh>
#include <log4cpp/NDC.hh>
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

View File

@ -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 \

View File

@ -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)

BIN
log4cpp-1.1.3.tar.gz Normal file

Binary file not shown.

View File

@ -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.

81
log4cpp.spec Normal file
View File

@ -0,0 +1,81 @@
Name: log4cpp
Version: 1.1.3
Release: 1
Summary: C++ logging library
License: LGPLv2+
URL: http://sourceforge.net/projects/log4cpp/
Source0: http://downloads.sourceforge.net/log4cpp/%{name}-%{version}.tar.gz
Patch0: log4cpp-1.0-gcc43.patch
Patch1: log4cpp-1.0-remove-pc-cflags.patch
Patch2: log4cpp-1.0-fix-doc-dest.patch
Patch3: log4cpp-1.0-no-snprintf.patch
Patch4: log4cpp-version-1.1.3.patch
BuildRequires: gcc-c++ doxygen automake, autoconf, libtool
%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}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%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 help
Summary: Development documentation for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description help
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
%setup -q -n log4cpp
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1 -b .no-snprintf
%patch4 -p1
rm -rf src/snprintf.c
iconv -f iso8859-1 -t utf-8 ChangeLog > ChangeLog.conv && mv -f ChangeLog.conv ChangeLog
%build
aclocal -I m4
autoconf
autoheader
automake --add-missing --copy
libtoolize --copy --force
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
mv %{buildroot}/usr/share/doc/log4cpp-%{version} rpmdocs
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
%ldconfig_scriptlets
%files
%{_libdir}/liblog4cpp.so.5*
%doc ChangeLog COPYING
%files devel
%{_bindir}/log4cpp-config
%{_includedir}/log4cpp/
%{_libdir}/liblog4cpp.so
%{_libdir}/pkgconfig/log4cpp.pc
%{_datadir}/aclocal/log4cpp.m4
%{_mandir}/man3/log4cpp*
%files help
%doc rpmdocs/*
%changelog
* Sat Jan 9 2021 chengzihan <chengzihan2@huawei.com> - 1.1.3-1
- Package init