Package: swig2.0 Version: 2.0.4-2 Severity: serious Tags: patch Justification: causes FTBFS
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 std::map has four template arguments, but the code in swig's python/std_map.i only honors the first two. This makes e.g swiginac [1] and syfi [2] fail to build with swig 2.0.4. The attached patch fixes this bug. I've also submitted the patch upstream [3]. [1] http://bugs.debian.org/633710 [2] At least accoording to https://bugs.launchpad.net/fenics-syfi/+bug/793984 [3] https://sourceforge.net/tracker/?func=detail&aid=3365908&group_id=1645&atid=301645 - -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (650, 'unstable'), (601, 'testing'), (600, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.39-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages swig2.0 depends on: ii libc6 2.13-10 Embedded GNU C Library: Shared lib ii libgcc1 1:4.6.1-3 GCC support library ii libpcre3 8.12-3 Perl 5 Compatible Regular Expressi ii libstdc++6 4.6.1-3 GNU Standard C++ Library v3 ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime swig2.0 recommends no packages. Versions of packages swig2.0 suggests: pn swig2.0-doc <none> (no description available) pn swig2.0-examples <none> (no description available) - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOHXVsAAoJEGny/FFupxmTPOgQAJq5epY245HOgQA8xDn1lWA/ NF/XSnFWQA28axPbXTdppm2TQfqDweiCuNSfAYbsaccZUkd2dsrHYHJvCPkcqMb5 KMxBF6ui9piQPzEZ+PhKIGtcXJoX7uiXLu+Me3fJm2jB47iGSLOydL2wV/IgBfYz R/tZoTzj/7976Jj/izUffPJFwj2sWgwbi2aD1gV9dIlO+vgO2QROJaf8wF46s4DB QBqrkWhCHgpjt7PCNMK+j1919U/H40vKepYMQfpQVTPFi+jlh8A9pIQ4kjnRqrF1 i7FPRRLTdBkfSI6CJ/1tCUQOyokY+OcnvwhWXf/OrlGF1nDcs+sxH8GHp//uvszT Nve+Ro9zr8hJc1SEpo7nNmbrffrKsHGHOTmN4x9szXEBQCApey4nvvELRUwSXRyE GLweMHL5GC1VSJY5vqL3JfLRuZBUXzPXo50kRPeszui1O/z29xSZOAKPplL5hMf9 jLqK0zNOGyj/Tc4l6oFp9dn1/N9g+cZpEiQnVBsHCXWr2ZKa2h+I6umUgxS0hyjv MV8jVMlewFuP2LPjOF30274fY4JOWfM8h/i91aKCN14vMxg/51ST/j4IAGMUfcg6 x7uEMpJt9Msq1BlwBWFsKnW0pPSpMcriM43+4CxIRZwbJj9b8L6kImONQ5HcBEjF 5i88JxWYw8p9wTTzO3bu =/ozt -----END PGP SIGNATURE-----
Index: std_map.i =================================================================== --- std_map.i (revision 12755) +++ std_map.i (working copy) @@ -5,19 +5,19 @@ %fragment("StdMapTraits","header",fragment="StdSequenceTraits") { namespace swig { - template <class SwigPySeq, class K, class T > + template <class SwigPySeq, class K, class T, class C, class A> inline void - assign(const SwigPySeq& swigpyseq, std::map<K,T > *map) { - typedef typename std::map<K,T>::value_type value_type; + assign(const SwigPySeq& swigpyseq, std::map<K,T,C,A> *map) { + typedef typename std::map<K,T,C,A>::value_type value_type; typename SwigPySeq::const_iterator it = swigpyseq.begin(); for (;it != swigpyseq.end(); ++it) { map->insert(value_type(it->first, it->second)); } } - template <class K, class T> - struct traits_asptr<std::map<K,T> > { - typedef std::map<K,T> map_type; + template <class K, class T, class C, class A> + struct traits_asptr<std::map<K,T,C,A> > { + typedef std::map<K,T,C,A> map_type; static int asptr(PyObject *obj, map_type **val) { int res = SWIG_ERROR; SWIG_PYTHON_THREAD_BEGIN_BLOCK; @@ -27,7 +27,7 @@ /* In Python 3.x the ".items()" method returns a dict_items object */ items = PySequence_Fast(items, ".items() didn't return a sequence!"); %#endif - res = traits_asptr_stdseq<std::map<K,T>, std::pair<K, T> >::asptr(items, val); + res = traits_asptr_stdseq<std::map<K,T,C,A>, std::pair<K, T> >::asptr(items, val); } else { map_type *p; res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0); @@ -38,9 +38,9 @@ } }; - template <class K, class T > - struct traits_from<std::map<K,T> > { - typedef std::map<K,T> map_type; + template <class K, class T, class C, class A> + struct traits_from<std::map<K,T,C,A> > { + typedef std::map<K,T,C,A> map_type; typedef typename map_type::const_iterator const_iterator; typedef typename map_type::size_type size_type;