From: g0dil Date: Fri, 28 May 2010 21:15:50 +0000 (+0000) Subject: Fix package build X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=dbacfefe277bd5a1ff81e4e75448e2789da27e1b;p=senf.git Fix package build Disable documentation build for debian packages Fixes to make SENF compile under debian 'etch' git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1629 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index 17e18b6..fff1692 100644 --- a/SConstruct +++ b/SConstruct @@ -223,6 +223,7 @@ if env['sparse_tests']: #### install_all, default, all_tests, all env.Install('${SCONSINSTALLDIR}', [ 'site_scons/__init__.py', 'site_scons/senfutil.py', + 'site_scons/senfconf.py', 'site_scons/yaptu.py' ]) env.InstallDir('${SCONSINSTALLDIR}', [ 'site_scons/site_tools', 'site_scons/lib' ], FILTER_SUFFIXES=[ '','.css','.pl','.py','.sh','.sty','.xml','.xsl','.yap' ]) diff --git a/boost_ext/boost/bimap/bimap.hpp b/boost_ext/boost/bimap/bimap.hpp index 9af5cbf..e24b729 100644 --- a/boost_ext/boost/bimap/bimap.hpp +++ b/boost_ext/boost/bimap/bimap.hpp @@ -54,7 +54,9 @@ the next step will be: #include #define BOOST_BIMAP_DISABLE_SERIALIZATION -#define BOOST_MULTI_INDEX_DISABLE_SERIALIZATION +#ifndef BOOST_MULTI_INDEX_DISABLE_SERIALIZATION +#define BOOST_MULTI_INDEX_DISABLE_SERIALIZATION 1 +#endif #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION #include @@ -151,7 +153,7 @@ class bimap ::boost::bimaps::detail::bimap_core >::type >, - public ::boost::bimaps::detail::right_map_view_extra_typedefs< + public ::boost::bimaps::detail::right_map_view_extra_typedefs< BOOST_DEDUCED_TYPENAME ::boost::bimaps::detail::right_map_view_type< ::boost::bimaps::detail::bimap_core >::type @@ -209,8 +211,8 @@ class bimap base_::relation_set( ::boost::multi_index::get< - BOOST_DEDUCED_TYPENAME base_::logic_relation_set_tag - >(core) + BOOST_DEDUCED_TYPENAME base_::logic_relation_set_tag + >(core) ), left ( ::boost::multi_index::get< @@ -219,7 +221,7 @@ class bimap ), right ( ::boost::multi_index::get< - BOOST_DEDUCED_TYPENAME base_::logic_right_tag + BOOST_DEDUCED_TYPENAME base_::logic_right_tag >(core) ) @@ -231,7 +233,7 @@ class bimap base_::relation_set( ::boost::multi_index::get< BOOST_DEDUCED_TYPENAME base_::logic_relation_set_tag - >(core) + >(core) ), core(first,last), @@ -254,7 +256,7 @@ class bimap base_::relation_set( ::boost::multi_index::get< BOOST_DEDUCED_TYPENAME base_::logic_relation_set_tag - >(core) + >(core) ), core(x.core), diff --git a/boost_ext/boost/multi_index_container.hpp b/boost_ext/boost/multi_index_container.hpp index 11a6597..856afc9 100644 --- a/boost_ext/boost/multi_index_container.hpp +++ b/boost_ext/boost/multi_index_container.hpp @@ -15,6 +15,10 @@ #pragma once #endif +#ifndef BOOST_MULTI_INDEX_DISABLE_SERIALIZATION +#define BOOST_MULTI_INDEX_DISABLE_SERIALIZATION 1 +#endif + #include /* keep it first to prevent nasty warns in MSVC */ #include #include @@ -46,7 +50,7 @@ #include #include #include -#include +#include #endif #if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING) @@ -129,7 +133,7 @@ public: typedef typename super::ctor_args_list ctor_args_list; typedef IndexSpecifierList index_specifier_type_list; - + #if BOOST_WORKAROUND(BOOST_MSVC,<1300) /* MSVC++ 6.0 chokes on moderately long index lists (around 6 indices * or more), with errors ranging from corrupt exes to duplicate @@ -191,7 +195,7 @@ public: node_count(0) { BOOST_MULTI_INDEX_CHECK_INVARIANT; - } + } template multi_index_container( @@ -641,7 +645,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS: { BOOST_MULTI_INDEX_CHECK_INVARIANT; - clear_(); + clear_(); std::size_t s; ar>>serialization::make_nvp("count",s); diff --git a/debian/SConscript b/debian/SConscript index 4ea8412..85a7ef8 100644 --- a/debian/SConscript +++ b/debian/SConscript @@ -76,10 +76,10 @@ def dpkgIgnoredFilesOpts(target, source, env, for_signature): return [ '-I%s' % (('/' in f) and (os.path.split(os.getcwd())[1])+f or f) for f in env.subst('$DPKG_IGNORED_FILES').split() ] -if env.has_key('REVISION'): - rev = env['REVISION'] -else: - rev = "(Version %s)" % rev +# if env.has_key('REVISION'): +# rev = env['REVISION'] +# else: +# rev = "(Version %s)" % rev env.Append( ENV = { 'REVISION': rev, diff --git a/debian/control b/debian/control index 63b82fa..5770831 100644 --- a/debian/control +++ b/debian/control @@ -8,11 +8,9 @@ Build-Depends: debhelper (>= 5), scons (>= 0.97), g++, binutils-dev, libboost-regex-dev | libboost-regex1.35-dev, libboost-filesystem-dev | libboost-filesystem1.35-dev, libboost-iostreams-dev | libboost-iostreams1.35-dev, - libboost-signals-dev | libboost-signals1.35-dev, - doxygen (>= 1.5.5), dia, tidy, xsltproc, graphviz, - perl-base, linklint, netpbm, gs, tetex-extra | texlive-extra-utils, - python-4suite-xml -Standards-Version: 3.7.2 Section: libs + libboost-signals-dev | libboost-signals1.35-dev +Standards-Version: 3.7.2 +Section: libs Package: libsenf Section: libdevel @@ -45,6 +43,7 @@ Depends: binutils-dev, libboost-dev | libboost-1.35-dev, libboost-thread-dev | libboost-thread1.35-dev, libboost-filesystem-dev | libboost-filesystem1.35-dev, libboost-signals-dev | libboost-signals1.35-dev, + libboost-iostreams-dev | libboost-iostreams1.35-dev, libsenf (=${source:Version}) | libsenf-dbg (=${source:Version}) Recommends: libsenf (=${source:Version}), libsenf-dbg (=${source:Version}) Suggests: libsenf-doc (=${source:Version}) diff --git a/debian/rules b/debian/rules index 631b0b4..4899207 100755 --- a/debian/rules +++ b/debian/rules @@ -61,14 +61,15 @@ build-arch-debug-stamp: configure-stamp build-indep: build-indep-stamp build-indep-stamp: configure-stamp # Add here commands to compile the indep part of the package. - scons -j $(CONCURRENCY_LEVEL) all_docs - scons linklint - scons fixlinks - scons $(destdir)/usr/include $(destdir)/usr/share/doc \ - syslayout=1 PREFIX='$(destdir)/usr' \ - DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc/html' +# scons -j $(CONCURRENCY_LEVEL) all_docs +# scons linklint +# scons fixlinks +# scons $(destdir)/usr/include $(destdir)/usr/share/doc \ +# syslayout=1 PREFIX='$(destdir)/usr' \ +# DOCINSTALLDIR='$$PREFIX/share/doc/libsenf-doc/html' + scons $(destdir)/usr/include syslayout=1 PREFIX='$(destdir)/usr' # We need to install the example sourcecode - find Examples \( -name "*.hh" -o -name "*.cc" \) -printf "%P\n" | \ + find Examples \( -name "*.hh" -o -name "*.cc" -o -name SConstruct \) -printf "%P\n" | \ while read src; do \ dir="$(destdir)/usr/share/doc/libsenf-doc/examples/$$(dirname "$$src")"; \ mkdir -p "$$dir"; \ diff --git a/senf/Packets/80221Bundle/MIHPacket.cc b/senf/Packets/80221Bundle/MIHPacket.cc index 3f549c5..ca896dd 100644 --- a/senf/Packets/80221Bundle/MIHPacket.cc +++ b/senf/Packets/80221Bundle/MIHPacket.cc @@ -94,8 +94,10 @@ prefix_ void senf::MIHGenericPayloadPacketType::finalize(packet p) { typedef parser::tlvList_t::container tlvContainer_t; tlvContainer_t tlvs (p->tlvList() ); - for (tlvContainer_t::iterator i (tlvs.begin()); i != tlvs.end(); ++i) - i->finalize(); + for (tlvContainer_t::iterator i (tlvs.begin()); i != tlvs.end(); ++i) { + MIHGenericTLVParser p (*i); + p.finalize(); + } } diff --git a/senf/Packets/GenericTLV.ct b/senf/Packets/GenericTLV.ct index e405ce7..2153937 100644 --- a/senf/Packets/GenericTLV.ct +++ b/senf/Packets/GenericTLV.ct @@ -102,6 +102,14 @@ prefix_ void senf::GenericTLVParserRegistry::registerParser( map_.insert(key, new detail::GenericTLVParserRegistry_Entry() ); } +// Wow ... this is stupid .. Boost 1.33 ptr_map API is broken ... + +#if BOOST_VERSION < 103400 +#define PTRMAP_GET_CONTENTS(v) (v) +#else +#define PTRMAP_GET_CONTENTS(v) (*(v).second) +#endif + template prefix_ void senf::GenericTLVParserRegistry::dump( GenericTLVParser const & parser, std::ostream & os) @@ -109,7 +117,7 @@ prefix_ void senf::GenericTLVParserRegistry::dump( { typename Map::const_iterator i (map_.find( parser.type())); if (i != map_.end()) - (i->second)->dump(parser, os); + PTRMAP_GET_CONTENTS(*i).dump(parser, os); } template @@ -119,7 +127,7 @@ prefix_ void senf::GenericTLVParserRegistry::dump( { typename Map::const_iterator i (map_.find( key)); if (i != map_.end()) - (i->second)->dump(parser, os); + PTRMAP_GET_CONTENTS(*i).dump(parser, os); } template @@ -129,7 +137,7 @@ prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistrysecond)->bytes(parser); + return PTRMAP_GET_CONTENTS(*i).bytes(parser); else throw TLVParserNotRegisteredException(); } @@ -141,12 +149,12 @@ prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistrysecond)->bytes(parser); + return PTRMAP_GET_CONTENTS(*i).bytes(parser); else throw TLVParserNotRegisteredException(); } - +#undef PTRMAP_GET_CONTENTS ///////////////////////////////ct.e//////////////////////////////////////// #undef prefix_ diff --git a/senf/Packets/GenericTLV.hh b/senf/Packets/GenericTLV.hh index 81513bb..2cee061 100644 --- a/senf/Packets/GenericTLV.hh +++ b/senf/Packets/GenericTLV.hh @@ -184,6 +184,7 @@ namespace senf { namespace detail { template struct GenericTLVParserRegistry_EntryBase { + virtual ~GenericTLVParserRegistry_EntryBase() {} virtual void dump(GenericTLVParserBase const & parser, std::ostream & os) const = 0; virtual PacketParserBase::size_type bytes(GenericTLVParserBase const & parser) const = 0; }; diff --git a/site_scons/senfconf.py b/site_scons/senfconf.py index bf32926..c6fc6c8 100644 --- a/site_scons/senfconf.py +++ b/site_scons/senfconf.py @@ -1,4 +1,4 @@ -from __future__ import with_statement +# from __future__ import with_statement _configTests = {} @@ -10,17 +10,17 @@ def Test(func): global _configTests _configTests[func.__name__] = func -class TemporaryContext: - def __init__(self, context): - self._context = context - self._env = self._context.env.Clone() +# class TemporaryContext: +# def __init__(self, context): +# self._context = context +# self._env = self._context.env.Clone() - def __enter__(self): - return None +# def __enter__(self): +# return None - def __exit__(self,*args): - self._context.env.Replace(**self._env.Dictionary()) - return False +# def __exit__(self,*args): +# self._context.env.Replace(**self._env.Dictionary()) +# return False @Test def CheckBoostVersion(context): @@ -39,7 +39,9 @@ def CheckBoostVersion(context): @Test def CheckBoostVariants(context, *variants): useVariant = None - with TemporaryContext(context): +# with TemporaryContext(context): + try: + _env = context.env.Clone() for variant in variants: if variant : variantStr = "'%s'" % variant else : variantStr = "default" @@ -54,6 +56,8 @@ def CheckBoostVariants(context, *variants): context.Result( ret ) if ret and useVariant is None: useVariant = variant + finally: + context.env.Replace(**_env.Dictionary()) if useVariant is not None and not context.env.GetOption('no_progress'): print "Using %s boost variant." % ( useVariant and "'%s'" % useVariant or "default")