fix debian packaging and fix build on new mac; refs #11

master
Marc Wäckerlin 10 years ago
parent f07fe7dc85
commit 83530df845
  1. 21
      configure.in
  2. 4
      debian/changelog.in
  3. 4
      debian/control.in
  4. 20
      makefile.am
  5. 12
      src/mrw/checkcxx11.hxx

@ -52,7 +52,7 @@ while test $MINOR -gt 255; do
MAJOR=$((MAJOR+1)) MAJOR=$((MAJOR+1))
done done
AC_MSG_NOTICE([Version number of $PACKAGENAME is: ${MAJOR}.${MINOR}.${LEAST}]) AC_MSG_NOTICE([Version number of $PACKAGENAME is: ${MAJOR}.${MINOR}.${LEAST}$(<build-string)])
AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org])
# author for signing packages # author for signing packages
@ -60,8 +60,6 @@ if test -z "$PACKAGERID"; then
PACKAGERID="Marc Wäckerlin (http://marc.waeckerlin.org) <marc@waeckerlin.org>" PACKAGERID="Marc Wäckerlin (http://marc.waeckerlin.org) <marc@waeckerlin.org>"
fi fi
AC_ARG_VAR(PACKAGERID, [Signature identification of the package author.]) AC_ARG_VAR(PACKAGERID, [Signature identification of the package author.])
BUILDDATE=$(date --rfc-2822)
AC_SUBST(BUILDDATE)
# files to create # files to create
AC_CONFIG_FILES([makefile ${PACKAGENAME}.spec src/version.cxx AC_CONFIG_FILES([makefile ${PACKAGENAME}.spec src/version.cxx
@ -98,6 +96,8 @@ README=README
AC_SUBST_FILE(README) AC_SUBST_FILE(README)
CHANGE_LOG=ChangeLog CHANGE_LOG=ChangeLog
AC_SUBST_FILE(CHANGE_LOG) AC_SUBST_FILE(CHANGE_LOG)
DISTRO=$(lsb_release -sc)
AC_SUBST(DISTRO)
AM_CPPFLAGS="-DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'" AM_CPPFLAGS="-DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'"
@ -127,7 +127,7 @@ AC_CHECK_HEADERS(unistd.h fcntl.h, [have_exec=yes])
AC_CHECK_HEADER(dirent.h, [have_dir=yes]) AC_CHECK_HEADER(dirent.h, [have_dir=yes])
# solaris? # solaris?
AC_CHECK_HEADER(sys/old_procfs.h, [AM_CPPFLAGS=-D__solaris__]) AC_CHECK_HEADER(sys/old_procfs.h, [AM_CPPFLAGS+="-D__solaris__"])
# Arguments # Arguments
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
@ -253,9 +253,11 @@ AC_ARG_WITH([boost-thread],AS_HELP_STRING([--with-boost-thread],
else else
chk_libs="" chk_libs=""
fi], fi],
[chk_libs="boost_thread boost_thread-mt boost_thread-${CXX} boost_thread-${CC} boost_thread-${CXX}-mt boost_thread-${CC}-mt"]) [chk_libs=( "boost_thread boost_thread-mt boost_thread-${CXX} boost_thread-${CC} boost_thread-${CXX}-mt boost_thread-${CC}-mt" "boost_system" )])
for ax_lib in $chk_libs; do for (( i=0; i<${#chk_libs[*]}; ++i )); do rnd=${chk_libs[$i]}
AC_CHECK_LIB($ax_lib, main, [BOOST_THREAD_LIB="-l$ax_lib" break]) for ax_lib in $rnd; do
AC_CHECK_LIB($ax_lib, main, [BOOST_THREAD_LIB="${BOOST_THREAD_LIB} -l$ax_lib" break])
done
done done
AC_SUBST(BOOST_THREAD_LIB) AC_SUBST(BOOST_THREAD_LIB)
AM_CONDITIONAL(HAVE_BOOST_THREAD, test -n "$BOOST_THREAD_LIB") AM_CONDITIONAL(HAVE_BOOST_THREAD, test -n "$BOOST_THREAD_LIB")
@ -263,7 +265,7 @@ AC_ARG_ENABLE(pedantic,
[AS_HELP_STRING([--enable-pedantic], [AS_HELP_STRING([--enable-pedantic],
[enable all warnings and checks, abort on warnings])], [enable all warnings and checks, abort on warnings])],
[have_pedantic="$enableval"; test "$enableval" = "yes" && \ [have_pedantic="$enableval"; test "$enableval" = "yes" && \
AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) CXXFLAGS="${CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"])
dnl problem in libs: -Wshadow -Wcast-qual dnl problem in libs: -Wshadow -Wcast-qual
dnl auto.hxx: -Wno-ctor-dtor-privacy (removed) dnl auto.hxx: -Wno-ctor-dtor-privacy (removed)
AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes")
@ -291,6 +293,8 @@ AM_CONDITIONAL(MAC, test "$MAC" = "yes")
# export macros # export macros
RPMBUILD=${BUILD_NUMBER:-1} RPMBUILD=${BUILD_NUMBER:-1}
AC_SUBST(RPMBUILD) AC_SUBST(RPMBUILD)
BUILD_NUMBER=${BUILD_NUMBER:-1}
AC_SUBST(BUILD_NUMBER)
SRCDIR=${srcdir} SRCDIR=${srcdir}
AC_SUBST(SRCDIR) AC_SUBST(SRCDIR)
AC_SUBST(SRC_DIR) AC_SUBST(SRC_DIR)
@ -300,6 +304,7 @@ AC_SUBST(HAVE_DOT)
AC_SUBST(HAVE_DOXYGEN) AC_SUBST(HAVE_DOXYGEN)
AC_SUBST(THREADS) AC_SUBST(THREADS)
AC_SUBST(PACKAGENAME) AC_SUBST(PACKAGENAME)
AC_SUBST(VERSION)
AC_SUBST(AM_CXXFLAGS) AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_CPPFLAGS) AC_SUBST(AM_CPPFLAGS)
AC_SUBST(LIBS) AC_SUBST(LIBS)

@ -1,5 +1,5 @@
@PACKAGE@ (@VERSION@-1) unstable; urgency=low @PACKAGE@ (@VERSION@-@BUILD_NUMBER@) @DISTRO@; urgency=low
* see https://dev.marc.waeckerlin.org/projects/mrw-c++++ for changes * see https://dev.marc.waeckerlin.org/projects/mrw-c++ for changes
-- @PACKAGERID@ @BUILDDATE@ -- @PACKAGERID@ @BUILDDATE@

4
debian/control.in vendored

@ -1,10 +1,10 @@
Source: mrw-c++ Source: mrw-c++
Priority: extra Priority: extra
Maintainer: Marc Wäckerlin (http://marc.waeckerlin.org) <marc@waeckerlin.org> Maintainer: Marc Wäckerlin (http://marc.waeckerlin.org) <marc@waeckerlin.org>
Build-Depends: debhelper (>= 7), autotools-dev Build-Depends: debhelper (>= 7), autotools-dev, libiberty-dev, libboost-thread-dev
Standards-Version: 3.8.1 Standards-Version: 3.8.1
Section: libs Section: libs
Homepage: https://dev.marc.waeckerlin.org/projects/mrw-c++++ Homepage: https://dev.marc.waeckerlin.org/projects/mrw-c++
Package: mrw-c++-dev Package: mrw-c++-dev
Section: libdevel Section: libdevel

@ -15,7 +15,7 @@ SUBDIRS = @SRC_DIR@ @TST_DIR@ @DOC_DIR@
doc_DATA = AUTHORS COPYING ChangeLog NEWS README INSTALL doc_DATA = AUTHORS COPYING ChangeLog NEWS README INSTALL
EXTRA_DIST = bootstrap.sh debian EXTRA_DIST = bootstrap.sh debian build-string
DISTCLEANFILES = debian/changelog 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 deps = ${top_srcdir}/COPYING ${top_srcdir}/README ${top_srcdir}/INSTALL ${top_srcdir}/NEWS ${top_srcdir}/ChangeLog
build-string:
touch build-string
clean-local: clean-local:
- rm README.debian - rm README.debian
- rm @PACKAGENAME@-dev_@MAJOR@.@MINOR@.@LEAST@-*.deb \ - rm @PACKAGENAME@-dev_@MAJOR@.@MINOR@.@LEAST@-*.deb \
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.changes \ @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.changes \
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.tar.gz \ @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.tar.gz \
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.dsc \ @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.dsc \
@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \ @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@*.tar.gz \
@PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.deb @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@*.deb
distclean-local: 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 - rm makefile makefile.in doxygen.err libmrw.doxytag
- find . -name '*~' | xargs rm - find . -name '*~' | xargs rm
- rm -rf autom4te.cache SPECS RPMS BUILD BUILDROOT SRPMS - rm -rf autom4te.cache SPECS RPMS BUILD BUILDROOT SRPMS
- rm aclocal.m4 config.guess config.sub configure \ - rm aclocal.m4 config.guess config.sub configure \
depcomp install-sh ltmain.sh makefile makefile.in \ depcomp install-sh ltmain.sh makefile makefile.in \
missing mkinstalldirs missing mkinstalldirs
MAINTAINERCLEANFILES = debian/control build-string

@ -71,13 +71,14 @@ namespace std {
# warning trying standard C++11 support # warning trying standard C++11 support
# endif # endif
# elif __APPLE__ # elif __APPLE__
# 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 /// Code is compiled with an old non C++11 standard compliant compiler
/** There are workarounds for old non C++11 compatible /** There are workarounds for old non C++11 compatible
compilers. These workarounds are deprecated, but will remain compilers. These workarounds are deprecated, but will
until most compilers fully support C++11. So this workaround remain until most compilers fully support C++11. So this
will be removed in future releases, when support for C++11 is workaround will be removed in future releases, when support
more common. Only rely on this workaround, if you really have for C++11 is more common. Only rely on this workaround, if
to. */ you really have to. */
# define MRW__OLD_PRE11_COMPILER # define MRW__OLD_PRE11_COMPILER
# warning you need a C++11 compliant compiler, on gcc: add -std=c++11 # 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 emulating C++11 - this changes the way you use the library
@ -95,5 +96,6 @@ namespace std {
}; };
} }
# endif # endif
# endif
#endif #endif

Loading…
Cancel
Save