From 83530df845e5a55714101e5726ec7b26773107fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 6 Nov 2014 10:24:05 +0000 Subject: [PATCH] fix debian packaging and fix build on new mac; refs #11 --- configure.in | 21 +++++++++++------- debian/changelog.in | 4 ++-- debian/control.in | 4 ++-- makefile.am | 20 ++++++++++++------ src/mrw/checkcxx11.hxx | 48 ++++++++++++++++++++++-------------------- 5 files changed, 55 insertions(+), 42 deletions(-) diff --git a/configure.in b/configure.in index b1669e6..54c3de7 100644 --- a/configure.in +++ b/configure.in @@ -52,7 +52,7 @@ while test $MINOR -gt 255; do MAJOR=$((MAJOR+1)) done -AC_MSG_NOTICE([Version number of $PACKAGENAME is: ${MAJOR}.${MINOR}.${LEAST}]) +AC_MSG_NOTICE([Version number of $PACKAGENAME is: ${MAJOR}.${MINOR}.${LEAST}$( -Build-Depends: debhelper (>= 7), autotools-dev +Build-Depends: debhelper (>= 7), autotools-dev, libiberty-dev, libboost-thread-dev Standards-Version: 3.8.1 Section: libs -Homepage: https://dev.marc.waeckerlin.org/projects/mrw-c++++ +Homepage: https://dev.marc.waeckerlin.org/projects/mrw-c++ Package: mrw-c++-dev Section: libdevel diff --git a/makefile.am b/makefile.am index b2ca1b0..7a4014d 100644 --- a/makefile.am +++ b/makefile.am @@ -15,7 +15,7 @@ SUBDIRS = @SRC_DIR@ @TST_DIR@ @DOC_DIR@ doc_DATA = AUTHORS COPYING ChangeLog NEWS README INSTALL -EXTRA_DIST = bootstrap.sh debian +EXTRA_DIST = bootstrap.sh debian build-string DISTCLEANFILES = debian/changelog @@ -44,20 +44,26 @@ rpm: dist deps = ${top_srcdir}/COPYING ${top_srcdir}/README ${top_srcdir}/INSTALL ${top_srcdir}/NEWS ${top_srcdir}/ChangeLog +build-string: + touch build-string + clean-local: - rm README.debian - rm @PACKAGENAME@-dev_@MAJOR@.@MINOR@.@LEAST@-*.deb \ - @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.changes \ - @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.tar.gz \ - @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.dsc \ - @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \ - @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.deb + @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.changes \ + @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.tar.gz \ + @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.dsc \ + @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@*.tar.gz \ + @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.deb distclean-local: - - rm -r ${top_builddir}/@DOC_DIR@/html/* ${top_builddir}/@DOC_DIR@/latex/* + - rm -r ${top_builddir}/@DOC_DIR@/html/* + - rm -r ${top_builddir}/@DOC_DIR@/latex/* - rm makefile makefile.in doxygen.err libmrw.doxytag - find . -name '*~' | xargs rm - rm -rf autom4te.cache SPECS RPMS BUILD BUILDROOT SRPMS - rm aclocal.m4 config.guess config.sub configure \ depcomp install-sh ltmain.sh makefile makefile.in \ missing mkinstalldirs + +MAINTAINERCLEANFILES = debian/control build-string diff --git a/src/mrw/checkcxx11.hxx b/src/mrw/checkcxx11.hxx index c104a6a..3a9e9e6 100644 --- a/src/mrw/checkcxx11.hxx +++ b/src/mrw/checkcxx11.hxx @@ -71,29 +71,31 @@ namespace std { # warning trying standard C++11 support # endif # elif __APPLE__ - /// Code is compiled with an old non C++11 standard compliant compiler - /** There are workarounds for old non C++11 compatible - compilers. These workarounds are deprecated, but will remain - until most compilers fully support C++11. So this workaround - will be removed in future releases, when support for C++11 is - more common. Only rely on this workaround, if you really have - to. */ -# define MRW__OLD_PRE11_COMPILER -# warning you need a C++11 compliant compiler, on gcc: add -std=c++11 -# warning emulating C++11 - this changes the way you use the library -# warning this is deprecated and will be removed in future releases -# warning refere to the library documentation for more details -# warning special workaround for apple -# include - namespace std { - // there is no std::shared_ptr in apple, but - // std::tr1::shared_ptr in - template class shared_ptr: public tr1::shared_ptr { - public: - explicit shared_ptr(): tr1::shared_ptr() {} - explicit shared_ptr(T* p): tr1::shared_ptr(p) {} - }; - } +# if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 + /// Code is compiled with an old non C++11 standard compliant compiler + /** There are workarounds for old non C++11 compatible + compilers. These workarounds are deprecated, but will + remain until most compilers fully support C++11. So this + workaround will be removed in future releases, when support + for C++11 is more common. Only rely on this workaround, if + you really have to. */ +# define MRW__OLD_PRE11_COMPILER +# warning you need a C++11 compliant compiler, on gcc: add -std=c++11 +# warning emulating C++11 - this changes the way you use the library +# warning this is deprecated and will be removed in future releases +# warning refere to the library documentation for more details +# warning special workaround for apple +# include + namespace std { + // there is no std::shared_ptr in apple, but + // std::tr1::shared_ptr in + template class shared_ptr: public tr1::shared_ptr { + public: + explicit shared_ptr(): tr1::shared_ptr() {} + explicit shared_ptr(T* p): tr1::shared_ptr(p) {} + }; + } +# endif # endif #endif