diff --git a/ChangeLog b/ChangeLog index fa9ebcb..b80f03f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +* Tue Mar 18 2008 Marc Waeckerlin - mrw-c++-3.3.0 (mrw) + - Create Debian (Kubuntu) package + - Adaptions for SuSE-Buildservice * Mon Aug 20 2007 Marc Waeckerlin - mrw-c++-3.2.5 (mrw) - New checkinstall.sh, cause checkinstall does not work otherwise - "#if _REENTRANT" needs "defined(...)" diff --git a/bootstrap.sh b/bootstrap.sh index 91e94a9..59aa175 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -15,4 +15,5 @@ ## added file header ## +sed -e 's/^ *$/ ./g' -e 's/^/ /' < README > README.dpkg aclocal && libtoolize --force && automake -a && autoconf diff --git a/configure.in b/configure.in index dcad22c..6c8ca36 100644 --- a/configure.in +++ b/configure.in @@ -16,8 +16,12 @@ AC_INIT([mrw/mrw.hpp.in]) AC_CANONICAL_SYSTEM PACKAGENAME=mrw-c++ m4_define(x_major, 3) -m4_define(x_minor, 2) -m4_define(x_least, 5) +m4_define(x_minor, 3) +m4_define(x_least, 0) +DEBBUILD=1 +RPMBUILD=1 +AC_SUBST(DEBBUILD) +AC_SUBST(RPMBUILD) # copy M4 to shell MAJOR=x_major @@ -39,10 +43,14 @@ AC_SUBST(LIB_VERSION) # macros README=README AC_SUBST_FILE(README) +README_DEB=README.dpkg +AC_SUBST_FILE(README_DEB) CHANGE_LOG=ChangeLog AC_SUBST_FILE(CHANGE_LOG) +AUTHORS=AUTHORS +AC_SUBST_FILE(AUTHORS) -# Get rid of that stupid -O2 -g opions! +# Get rid of that stupid -O2 -g options! CXXFLAGS="${CXXFLAGS:-}" # languages @@ -200,6 +208,7 @@ AC_SUBST(LIBS) # create output AC_CONFIG_FILES([makefile mrw-c++.spec mrw-c++-minimal.spec + mrw-c++.dsc mrw/makefile mrw/doxyfile mrw/mrw.hpp mrw/version.cpp]) AC_OUTPUT diff --git a/makefile.am b/makefile.am index 80ab1d1..22f9cad 100644 --- a/makefile.am +++ b/makefile.am @@ -79,3 +79,6 @@ maintainer-clean-local: - rm aclocal.m4 config.guess config.sub configure \ depcomp install-sh ltmain.sh makefile makefile.in \ missing mkinstalldirs + +CLEANFILES = README.dpkg +MAINTAINER_CLEANFILES = DEBIAN/control diff --git a/mrw-c++.dsc.in b/mrw-c++.dsc.in new file mode 100644 index 0000000..26f84ed --- /dev/null +++ b/mrw-c++.dsc.in @@ -0,0 +1,15 @@ +## $Id$ + +## 1 2 3 4 5 6 7 8 +## 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +Format: 1.0 +Source: @PACKAGENAME@ +Version: @MAJOR@.@MINOR@.@LEAST@-@DEBBUILD@ +Binary: @PACKAGENAME@ +Maintainer: @AUTHORS@ +Architecture: any +Build-Depends: debhelper (>= 4.1.16), boost-devel, log4cxx-devel, ghostscript-library, gcc-c++, doxygen, graphviz, texlive-latex-base, texlive-latex-extra, texlive-latex-recommended +Files: + 0 0 @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.orig.tar.gz + 0 0 @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-@DEBBUILD@.diff.tar.gz diff --git a/mrw-c++.spec.in b/mrw-c++.spec.in index 29ed801..729aca1 100644 --- a/mrw-c++.spec.in +++ b/mrw-c++.spec.in @@ -10,11 +10,19 @@ ## # rpmbuild -bb --clean @PACKAGENAME@.spec -BuildRequires: gcc-c++ doxygen graphviz cppunit-devel boost-devel log4cxx-devel freefont te_latex ghostscript-library tetex +BuildRequires: boost-devel log4cxx-devel ghostscript-library +BuildRequires: gcc-c++ doxygen graphviz +#%if 0%(?suse_version) >= 1030 +BuildRequires: texlive-bin-latex cppunit-devel unixODBC-devel libxml2-devel freefont +##%elseif 0%(?debian_version) +##BuildRequires: libcppunit-dev unixodbc-dev libxml2-dev latex209-bin ttf-freefont +#%else +#BuildRequires: te_latex cppunit-devel unixODBC-devel libxml2-devel freefont +#%endif Summary: MRW's C++ Class Library, facilities for modern C++ programming Name: @PACKAGENAME@ Version: @MAJOR@.@MINOR@.@LEAST@ -Release: 1 +Release: @RPMBUILD@ License: LGPL Group: Development/Libraries/C++ URL: http://marc.waeckerlin.org/mrw-c++/index.html @@ -35,11 +43,13 @@ This package contains only the shared libraries required at runtime. CXXFLAGS="-O3" ./configure --prefix=/usr \ --datadir=/usr/share/doc/packages \ --enable-doxygen \ -%ifarch x86_64 - --libdir=/usr/lib64 -%else --libdir=/usr/lib -%endif +# +#%ifarch x86_64 +# --libdir=/usr/lib64 +#%else +# --libdir=/usr/lib +#%endif %build make @@ -52,26 +62,26 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%ifarch x86_64 -/usr/lib64/libmrw.so -/usr/lib64/libmrw.so.@MAJOR@ -/usr/lib64/libmrw.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwexcstderr.so -/usr/lib64/libmrwexcstderr.so.@MAJOR@ -/usr/lib64/libmrwexcstderr.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwexclog4cxx.so -/usr/lib64/libmrwexclog4cxx.so.@MAJOR@ -/usr/lib64/libmrwexclog4cxx.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwautofunctiontracelog4cxx.so -/usr/lib64/libmrwautofunctiontracelog4cxx.so.@MAJOR@ -/usr/lib64/libmrwautofunctiontracelog4cxx.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwautofunctiontracestdlog.so -/usr/lib64/libmrwautofunctiontracestdlog.so.@MAJOR@ -/usr/lib64/libmrwautofunctiontracestdlog.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwlog4cxxconfiguration.so -/usr/lib64/libmrwlog4cxxconfiguration.so.@MAJOR@ -/usr/lib64/libmrwlog4cxxconfiguration.so.@MAJOR@.@MINOR@.@LEAST@ -%else +#%ifarch x86_64 +#/usr/lib64/libmrw.so +#/usr/lib64/libmrw.so.@MAJOR@ +#/usr/lib64/libmrw.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwexcstderr.so +#/usr/lib64/libmrwexcstderr.so.@MAJOR@ +#/usr/lib64/libmrwexcstderr.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwexclog4cxx.so +#/usr/lib64/libmrwexclog4cxx.so.@MAJOR@ +#/usr/lib64/libmrwexclog4cxx.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwautofunctiontracelog4cxx.so +#/usr/lib64/libmrwautofunctiontracelog4cxx.so.@MAJOR@ +#/usr/lib64/libmrwautofunctiontracelog4cxx.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwautofunctiontracestdlog.so +#/usr/lib64/libmrwautofunctiontracestdlog.so.@MAJOR@ +#/usr/lib64/libmrwautofunctiontracestdlog.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwlog4cxxconfiguration.so +#/usr/lib64/libmrwlog4cxxconfiguration.so.@MAJOR@ +#/usr/lib64/libmrwlog4cxxconfiguration.so.@MAJOR@.@MINOR@.@LEAST@ +#%else /usr/lib/libmrw.so /usr/lib/libmrw.so.@MAJOR@ /usr/lib/libmrw.so.@MAJOR@.@MINOR@.@LEAST@ @@ -90,7 +100,7 @@ rm -rf $RPM_BUILD_ROOT /usr/lib/libmrwlog4cxxconfiguration.so /usr/lib/libmrwlog4cxxconfiguration.so.@MAJOR@ /usr/lib/libmrwlog4cxxconfiguration.so.@MAJOR@.@MINOR@.@LEAST@ -%endif +#%endif /usr/share/doc/packages/@PACKAGENAME@/COPYING /usr/share/doc/packages/@PACKAGENAME@/README /usr/share/doc/packages/@PACKAGENAME@/AUTHORS @@ -110,26 +120,26 @@ This Package contains thread safe libraries. %files mt %defattr(-,root,root,-) -%ifarch x86_64 -/usr/lib64/libmrw-mt.so -/usr/lib64/libmrw-mt.so.@MAJOR@ -/usr/lib64/libmrw-mt.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwexcstderr-mt.so -/usr/lib64/libmrwexcstderr-mt.so.@MAJOR@ -/usr/lib64/libmrwexcstderr-mt.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwexclog4cxx-mt.so -/usr/lib64/libmrwexclog4cxx-mt.so.@MAJOR@ -/usr/lib64/libmrwexclog4cxx-mt.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwautofunctiontracelog4cxx-mt.so -/usr/lib64/libmrwautofunctiontracelog4cxx-mt.so.@MAJOR@ -/usr/lib64/libmrwautofunctiontracelog4cxx-mt.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwautofunctiontracestdlog-mt.so -/usr/lib64/libmrwautofunctiontracestdlog-mt.so.@MAJOR@ -/usr/lib64/libmrwautofunctiontracestdlog-mt.so.@MAJOR@.@MINOR@.@LEAST@ -/usr/lib64/libmrwlog4cxxconfiguration-mt.so -/usr/lib64/libmrwlog4cxxconfiguration-mt.so.@MAJOR@ -/usr/lib64/libmrwlog4cxxconfiguration-mt.so.@MAJOR@.@MINOR@.@LEAST@ -%else +#%ifarch x86_64 +#/usr/lib64/libmrw-mt.so +#/usr/lib64/libmrw-mt.so.@MAJOR@ +#/usr/lib64/libmrw-mt.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwexcstderr-mt.so +#/usr/lib64/libmrwexcstderr-mt.so.@MAJOR@ +#/usr/lib64/libmrwexcstderr-mt.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwexclog4cxx-mt.so +#/usr/lib64/libmrwexclog4cxx-mt.so.@MAJOR@ +#/usr/lib64/libmrwexclog4cxx-mt.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwautofunctiontracelog4cxx-mt.so +#/usr/lib64/libmrwautofunctiontracelog4cxx-mt.so.@MAJOR@ +#/usr/lib64/libmrwautofunctiontracelog4cxx-mt.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwautofunctiontracestdlog-mt.so +#/usr/lib64/libmrwautofunctiontracestdlog-mt.so.@MAJOR@ +#/usr/lib64/libmrwautofunctiontracestdlog-mt.so.@MAJOR@.@MINOR@.@LEAST@ +#/usr/lib64/libmrwlog4cxxconfiguration-mt.so +#/usr/lib64/libmrwlog4cxxconfiguration-mt.so.@MAJOR@ +#/usr/lib64/libmrwlog4cxxconfiguration-mt.so.@MAJOR@.@MINOR@.@LEAST@ +#%else /usr/lib/libmrw-mt.so /usr/lib/libmrw-mt.so.@MAJOR@ /usr/lib/libmrw-mt.so.@MAJOR@.@MINOR@.@LEAST@ @@ -148,7 +158,7 @@ This Package contains thread safe libraries. /usr/lib/libmrwlog4cxxconfiguration-mt.so /usr/lib/libmrwlog4cxxconfiguration-mt.so.@MAJOR@ /usr/lib/libmrwlog4cxxconfiguration-mt.so.@MAJOR@.@MINOR@.@LEAST@ -%endif +#%endif %package devel Summary: MRW's C++ Class Library (development files) @@ -164,32 +174,32 @@ This Package contains all files required for developement. %files devel %defattr(-,root,root,-) -%ifarch x86_64 -/usr/lib64/libmrw.a -/usr/lib64/libmrw.la -/usr/lib64/libmrwexcstderr.a -/usr/lib64/libmrwexcstderr.la -/usr/lib64/libmrwexclog4cxx.a -/usr/lib64/libmrwexclog4cxx.la -/usr/lib64/libmrw-mt.a -/usr/lib64/libmrw-mt.la -/usr/lib64/libmrwautofunctiontracelog4cxx-mt.a -/usr/lib64/libmrwautofunctiontracelog4cxx-mt.la -/usr/lib64/libmrwautofunctiontracelog4cxx.a -/usr/lib64/libmrwautofunctiontracelog4cxx.la -/usr/lib64/libmrwautofunctiontracestdlog-mt.a -/usr/lib64/libmrwautofunctiontracestdlog-mt.la -/usr/lib64/libmrwautofunctiontracestdlog.a -/usr/lib64/libmrwautofunctiontracestdlog.la -/usr/lib64/libmrwlog4cxxconfiguration.a -/usr/lib64/libmrwlog4cxxconfiguration.la -/usr/lib64/libmrwexclog4cxx-mt.a -/usr/lib64/libmrwexclog4cxx-mt.la -/usr/lib64/libmrwexcstderr-mt.a -/usr/lib64/libmrwexcstderr-mt.la -/usr/lib64/libmrwlog4cxxconfiguration-mt.a -/usr/lib64/libmrwlog4cxxconfiguration-mt.la -%else +#%ifarch x86_64 +#/usr/lib64/libmrw.a +#/usr/lib64/libmrw.la +#/usr/lib64/libmrwexcstderr.a +#/usr/lib64/libmrwexcstderr.la +#/usr/lib64/libmrwexclog4cxx.a +#/usr/lib64/libmrwexclog4cxx.la +#/usr/lib64/libmrw-mt.a +#/usr/lib64/libmrw-mt.la +#/usr/lib64/libmrwautofunctiontracelog4cxx-mt.a +#/usr/lib64/libmrwautofunctiontracelog4cxx-mt.la +#/usr/lib64/libmrwautofunctiontracelog4cxx.a +#/usr/lib64/libmrwautofunctiontracelog4cxx.la +#/usr/lib64/libmrwautofunctiontracestdlog-mt.a +#/usr/lib64/libmrwautofunctiontracestdlog-mt.la +#/usr/lib64/libmrwautofunctiontracestdlog.a +#/usr/lib64/libmrwautofunctiontracestdlog.la +#/usr/lib64/libmrwlog4cxxconfiguration.a +#/usr/lib64/libmrwlog4cxxconfiguration.la +#/usr/lib64/libmrwexclog4cxx-mt.a +#/usr/lib64/libmrwexclog4cxx-mt.la +#/usr/lib64/libmrwexcstderr-mt.a +#/usr/lib64/libmrwexcstderr-mt.la +#/usr/lib64/libmrwlog4cxxconfiguration-mt.a +#/usr/lib64/libmrwlog4cxxconfiguration-mt.la +#%else /usr/lib/libmrw.a /usr/lib/libmrw.la /usr/lib/libmrwexcstderr.a @@ -214,7 +224,7 @@ This Package contains all files required for developement. /usr/lib/libmrwexcstderr-mt.la /usr/lib/libmrwlog4cxxconfiguration-mt.a /usr/lib/libmrwlog4cxxconfiguration-mt.la -%endif +#%endif /usr/include /usr/share/doc/packages/@PACKAGENAME@/examples /usr/share/doc/packages/@PACKAGENAME@/doc diff --git a/mrw/makefile.am b/mrw/makefile.am index b9bb460..75282f2 100644 --- a/mrw/makefile.am +++ b/mrw/makefile.am @@ -15,6 +15,7 @@ if HAVE_STACKTRACE AM_CPPFLAGS += -DHAVE_STACKTRACE endif +EXTRA_DIST = head.html foot.html style.css hintergrund.png CLEANFILES = doxygen.errors functiontrace_test.log \ mrwautofunctiontracelog4cxx_test.log \ mrwautofunctiontracelog4cxx_test-mt.log \ @@ -25,7 +26,8 @@ htmldir = $(pkgdatadir)/doc/html pdfdir = $(pkgdatadir)/doc/pdf if HAVE_DOXYGEN html_DATA = $(top_builddir)/doc/html/index.html -dist_pdf_DATA = $(top_builddir)/doc/latex/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.pdf +pdf_DATA = $(top_builddir)/doc/latex/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.pdf +EXTRA_DIST += $(pdf_DATA) endif lib_LTLIBRARIES = libmrw.la @@ -362,7 +364,6 @@ endif endif dist_check_DATA = test.dat configfile.ini configfile.ini.result -EXTRA_DIST = head.html foot.html style.css hintergrund.png if HAVE_VALGRIND VALTESTS=$(VALGRIND_CHECKS:%=valcheck_%) TESTS = $(VALTESTS) $(NO_VALGRIND_CHECKS) $(dist_check_SCRIPTS) @@ -379,7 +380,7 @@ check_PROGRAMS = $(VALGRIND_CHECKS) $(NO_VALGRIND_CHECKS) deps = $(top_srcdir)/COPYING $(top_srcdir)/README $(top_srcdir)/INSTALL $(top_srcdir)/NEWS $(top_srcdir)/ChangeLog -doc: $(top_builddir)/doc/html/index.html $(top_builddir)/doc/latex/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.pdf +doc: $(html_DATA) $(pdf_DATA) $(html_DATA): doxyfile *.[ch]pp $(deps) style.css head.html foot.html test -d $(top_builddir)/doc/latex || mkdir -p $(top_builddir)/doc/latex @@ -394,11 +395,10 @@ if PEDANTIC test \! -s doxygen.errors endif -$(top_builddir)/doc/latex/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.pdf: doxyfile *.[ch]pp $(deps) $(html_DATA) +$(pdf_DATA): doxyfile *.[ch]pp $(deps) $(html_DATA) cd $(top_builddir)/doc/latex && make && \ - mv refman.pdf @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.pdf || \ - ( echo "**** ERROR in Doxygen-PDF ****" && \ - cat refman.log && false ) + mv refman.pdf $(pdf_DATA) || \ + ( echo "**** ERROR in Doxygen-PDF ****" && false ) clean-local: - rm doxygen.err libmrw.doxytag @@ -407,12 +407,12 @@ distclean-local: - rm -r $(top_builddir)/doc/html/* $(top_builddir)/doc/latex/* - rm makefile makefile.in doxygen.err libmrw.doxytag +if HAVE_DOXYGEN dist-hook: test -d $(distdir)/doc/html || \ mkdir -p $(distdir)/doc/html cp $(top_builddir)/doc/html/* $(distdir)/doc/html/. -if HAVE_DOXYGEN install-data-hook: env | grep -i tmp test -d "$(DESTDIR)$(pkgdatadir)/doc" || \ diff --git a/mrw/stacktrace.hpp b/mrw/stacktrace.hpp index 0405869..9daa7e3 100644 --- a/mrw/stacktrace.hpp +++ b/mrw/stacktrace.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/mrw/string.hpp b/mrw/string.hpp index c3bd73c..e4cbc67 100644 --- a/mrw/string.hpp +++ b/mrw/string.hpp @@ -231,13 +231,13 @@ namespace mrw { @param l the list of strings to join @param delimiter the delimiter between the joined strings */ - template class LIST, - typename CONTENTS> - std::string join(const LIST& l, + template class LIST, + typename CONTENTS, typename ALLOC> + std::string join(const LIST& l, const std::string& delimiter=" ") throw(std::bad_exception) { std::string result; - for (typename LIST::const_iterator it(l.begin()); + for (typename LIST::const_iterator it(l.begin()); it!=l.end(); ++it) result+=(result.size()?delimiter:"")+mrw::string(*it); return result;