Sat May 11 21:30:09 2013 UTC ()
Fix iterator types for STL containers to use const_iterator as defined.
This fixes the build of GNU radio with libc++.


(joerg)
diff -r1.32 -r1.33 pkgsrc/devel/swig/Makefile
diff -r1.11 -r1.12 pkgsrc/devel/swig/distinfo
diff -r0 -r1.1 pkgsrc/devel/swig/patches/patch-Lib_std_std__container.i

cvs diff -r1.32 -r1.33 pkgsrc/devel/swig/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/swig/Makefile 2012/11/03 23:44:44 1.32
+++ pkgsrc/devel/swig/Makefile 2013/05/11 21:30:09 1.33
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.32 2012/11/03 23:44:44 gdt Exp $ 1# $NetBSD: Makefile,v 1.33 2013/05/11 21:30:09 joerg Exp $
2 2
3DISTNAME= swig-1.3.36 3DISTNAME= swig-1.3.36
4PKGREVISION= 2 4PKGREVISION= 3
5CATEGORIES= devel 5CATEGORIES= devel
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=swig/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=swig/}
7 7
8# 8#
9# 1.3.37 has a bug where .py files are written to the directory of the 9# 1.3.37 has a bug where .py files are written to the directory of the
10# .i file instead of where the output is supposed to go, and this 10# .i file instead of where the output is supposed to go, and this
11# breaks gnuradio. Please try to contact gdt@netbsd.org before 11# breaks gnuradio. Please try to contact gdt@netbsd.org before
12# updating to 1.3.37. See message on discuss-gnuradio: 12# updating to 1.3.37. See message on discuss-gnuradio:
13# Message-Id: <FA0E4567-C660-4C30-B604-2FA000330874@alum.mit.edu> 13# Message-Id: <FA0E4567-C660-4C30-B604-2FA000330874@alum.mit.edu>
14# As of 2012-10, gnuradio is known to work with swig 2. 14# As of 2012-10, gnuradio is known to work with swig 2.
15# 15#
16# x11/ruby-wxruby-2.0.1 requires 1.3.32 for Ruby 1.8 and 1.3.37 for 16# x11/ruby-wxruby-2.0.1 requires 1.3.32 for Ruby 1.8 and 1.3.37 for
17# Ruby 1.9. And SWIG 1.3.39 introduced some incompatibility with 17# Ruby 1.9. And SWIG 1.3.39 introduced some incompatibility with

cvs diff -r1.11 -r1.12 pkgsrc/devel/swig/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/swig/distinfo 2010/04/12 13:57:59 1.11
+++ pkgsrc/devel/swig/distinfo 2013/05/11 21:30:09 1.12
@@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
1$NetBSD: distinfo,v 1.11 2010/04/12 13:57:59 taca Exp $ 1$NetBSD: distinfo,v 1.12 2013/05/11 21:30:09 joerg Exp $
2 2
3SHA1 (swig-1.3.36.tar.gz) = eed715da3200f45cfe688a64ab6630eadf118ae4 3SHA1 (swig-1.3.36.tar.gz) = eed715da3200f45cfe688a64ab6630eadf118ae4
4RMD160 (swig-1.3.36.tar.gz) = bd57f6837de1dc3aebefd9ad23a52235deefcd33 4RMD160 (swig-1.3.36.tar.gz) = bd57f6837de1dc3aebefd9ad23a52235deefcd33
5Size (swig-1.3.36.tar.gz) = 4604982 bytes 5Size (swig-1.3.36.tar.gz) = 4604982 bytes
 6SHA1 (patch-Lib_std_std__container.i) = e4bb2b51b88651adfcec63318d8a228e7f3f8971
6SHA1 (patch-aa) = 66374c0708cfda23810bd5744e0c4bb0abc605f5 7SHA1 (patch-aa) = 66374c0708cfda23810bd5744e0c4bb0abc605f5
7SHA1 (patch-ab) = c690480ad10256c7198fc19699557e0b3f46b087 8SHA1 (patch-ab) = c690480ad10256c7198fc19699557e0b3f46b087
8SHA1 (patch-ad) = f5787be95bb896cdba0f42587c4f586caed9b7a2 9SHA1 (patch-ad) = f5787be95bb896cdba0f42587c4f586caed9b7a2

File Added: pkgsrc/devel/swig/patches/patch-Lib_std_std__container.i
$NetBSD: patch-Lib_std_std__container.i,v 1.1 2013/05/11 21:30:09 joerg Exp $

--- Lib/std/std_container.i.orig	2008-03-26 20:25:56.000000000 +0000
+++ Lib/std/std_container.i
@@ -46,8 +46,8 @@
   void resize(size_type new_size);
   
   #ifdef SWIG_EXPORT_ITERATOR_METHODS
-  iterator erase(iterator pos);
-  iterator erase(iterator first, iterator last);
+  iterator erase(const_iterator pos);
+  iterator erase(const_iterator first, const_iterator last);
   #endif
   
 %enddef
@@ -68,8 +68,8 @@
   void resize(size_type new_size, const value_type& x);
   
   #ifdef SWIG_EXPORT_ITERATOR_METHODS
-  iterator insert(iterator pos, const value_type& x);
-  void insert(iterator pos, size_type n, const value_type& x);
+  iterator insert(const_iterator pos, const value_type& x);
+  void insert(const_iterator pos, size_type n, const value_type& x);
   #endif
   
 %enddef
@@ -89,8 +89,8 @@
   void resize(size_type new_size, value_type x);
   
   #ifdef SWIG_EXPORT_ITERATOR_METHODS
-  iterator insert(iterator pos, value_type x);
-  void insert(iterator pos, size_type n, value_type x);
+  iterator insert(const_iterator pos, value_type x);
+  void insert(const_iterator pos, size_type n, value_type x);
   #endif
   
 %enddef