Fix package build
g0dil [Fri, 28 May 2010 21:15:50 +0000 (21:15 +0000)]
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

SConstruct
boost_ext/boost/bimap/bimap.hpp
boost_ext/boost/multi_index_container.hpp
debian/SConscript
debian/control
debian/rules
senf/Packets/80221Bundle/MIHPacket.cc
senf/Packets/GenericTLV.ct
senf/Packets/GenericTLV.hh
site_scons/senfconf.py

index 17e18b6..fff1692 100644 (file)
@@ -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' ])
index 9af5cbf..e24b729 100644 (file)
@@ -54,7 +54,9 @@ the next step will be:
 #include <boost/mpl/aux_/na.hpp>
 
 #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 <boost/serialization/nvp.hpp>
@@ -151,7 +153,7 @@ class bimap
             ::boost::bimaps::detail::bimap_core<KeyTypeA,KeyTypeB,AP1,AP2,AP3>
         >::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<KeyTypeA,KeyTypeB,AP1,AP2,AP3>
         >::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),
index 11a6597..856afc9 100644 (file)
 #pragma once
 #endif
 
+#ifndef BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
+#define BOOST_MULTI_INDEX_DISABLE_SERIALIZATION 1
+#endif
+
 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
 #include <algorithm>
 #include <boost/detail/allocator_utilities.hpp>
@@ -46,7 +50,7 @@
 #include <boost/multi_index/detail/archive_constructed.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/split_member.hpp>
-#include <boost/throw_exception.hpp> 
+#include <boost/throw_exception.hpp>
 #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<typename InputIterator>
   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);
index 4ea8412..85a7ef8 100644 (file)
@@ -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,
index 63b82fa..5770831 100644 (file)
@@ -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})
index 631b0b4..4899207 100755 (executable)
@@ -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"; \
index 3f549c5..ca896dd 100644 (file)
@@ -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();
+    }
 }
 
 
index e405ce7..2153937 100644 (file)
@@ -102,6 +102,14 @@ prefix_ void senf::GenericTLVParserRegistry<BaseParser,Keytype>::registerParser(
         map_.insert(key, new detail::GenericTLVParserRegistry_Entry<BaseParser, Parser>() );
 }
 
+// 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 <class BaseParser, class Keytype>
 prefix_ void senf::GenericTLVParserRegistry<BaseParser,Keytype>::dump(
         GenericTLVParser const & parser, std::ostream & os)
@@ -109,7 +117,7 @@ prefix_ void senf::GenericTLVParserRegistry<BaseParser,Keytype>::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 <class BaseParser, class Keytype>
@@ -119,7 +127,7 @@ prefix_ void senf::GenericTLVParserRegistry<BaseParser,Keytype>::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 <class BaseParser, class Keytype>
@@ -129,7 +137,7 @@ prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistry<BasePar
 {
     typename Map::const_iterator i (map_.find( parser.type()));
     if (i != map_.end())
-        return (i->second)->bytes(parser);
+        return PTRMAP_GET_CONTENTS(*i).bytes(parser);
     else
         throw TLVParserNotRegisteredException();
 }
@@ -141,12 +149,12 @@ prefix_ senf::PacketParserBase::size_type senf::GenericTLVParserRegistry<BasePar
 {
     typename Map::const_iterator i (map_.find( key));
     if (i != map_.end())
-        return (i->second)->bytes(parser);
+        return PTRMAP_GET_CONTENTS(*i).bytes(parser);
     else
         throw TLVParserNotRegisteredException();
 }
 
-
+#undef PTRMAP_GET_CONTENTS
 
 ///////////////////////////////ct.e////////////////////////////////////////
 #undef prefix_
index 81513bb..2cee061 100644 (file)
@@ -184,6 +184,7 @@ namespace senf {
     namespace detail {
         template <class BaseParser>
         struct GenericTLVParserRegistry_EntryBase {
+            virtual ~GenericTLVParserRegistry_EntryBase() {}
             virtual void dump(GenericTLVParserBase<BaseParser> const & parser, std::ostream & os) const = 0;
             virtual PacketParserBase::size_type bytes(GenericTLVParserBase<BaseParser> const & parser) const = 0;
         };
index bf32926..c6fc6c8 100644 (file)
@@ -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")