From f233207b66005c753d643aab50f15de96a35e2d12982632216ab9ddf6e3ca240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Mon, 6 Jul 2015 06:23:22 +0000 Subject: [PATCH 1/5] - Update to 3.0.6 - Stability and regression fixes. - Fixed parsing of C++ corner cases. - Language improvements and bug fixes for C#, Go, Java, Lua, Python, R. - Update to version 3.0.5 * Added support for Scilab. * Important Python regression fix when wrapping C++ default arguments. * Minor improvements for C#, Go, Octave, PHP and Python. OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=78 --- swig-3.0.5.tar.gz | 3 --- swig-3.0.6.tar.gz | 3 +++ swig.changes | 17 +++++++++++++---- swig.spec | 5 +++-- 4 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 swig-3.0.5.tar.gz create mode 100644 swig-3.0.6.tar.gz diff --git a/swig-3.0.5.tar.gz b/swig-3.0.5.tar.gz deleted file mode 100644 index 31479c1..0000000 --- a/swig-3.0.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f4cb9e8f213f041853646f58fe5e8428d63250d05f5c943b6fa759c77322a3c -size 5873209 diff --git a/swig-3.0.6.tar.gz b/swig-3.0.6.tar.gz new file mode 100644 index 0000000..cd8231e --- /dev/null +++ b/swig-3.0.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c67f63ea11956106e4cda66416d5020330dc4ce2ee45057d39a9494ce33eca05 +size 5911929 diff --git a/swig.changes b/swig.changes index 20a9fd4..8afc630 100644 --- a/swig.changes +++ b/swig.changes @@ -1,10 +1,19 @@ +------------------------------------------------------------------- +Mon Jul 6 06:22:21 UTC 2015 - kkaempf@suse.com + +- Update to 3.0.6 + - Stability and regression fixes. + - Fixed parsing of C++ corner cases. + - Language improvements and bug fixes for C#, Go, Java, Lua, + Python, R. + ------------------------------------------------------------------- Sun Feb 1 18:32:16 UTC 2015 - dmitry_r@opensuse.org --Update to version 3.0.5 - * Added support for Scilab. - * Important Python regression fix when wrapping C++ default arguments. - * Minor improvements for C#, Go, Octave, PHP and Python. +- Update to version 3.0.5 + * Added support for Scilab. + * Important Python regression fix when wrapping C++ default arguments. + * Minor improvements for C#, Go, Octave, PHP and Python. ------------------------------------------------------------------- Thu Jan 15 06:57:56 UTC 2015 - kkaempf@suse.com diff --git a/swig.spec b/swig.spec index 5cfb418..d27efbc 100644 --- a/swig.spec +++ b/swig.spec @@ -17,7 +17,7 @@ Name: swig -Version: 3.0.5 +Version: 3.0.6 Release: 0 Summary: Simplified Wrapper and Interface Generator License: GPL-3.0+ and BSD-3-Clause @@ -34,7 +34,6 @@ BuildRequires: libtool BuildRequires: pcre-devel BuildRequires: perl BuildRequires: python-devel -# BuildRequires: v8-devel %if 0%{?rhel_version} > 0 BuildRequires: -vim %endif @@ -52,6 +51,8 @@ BuildRequires: perl-devel %endif %endif %if 0%{?suse_version} > 0 +BuildRequires: nodejs-devel +BuildRequires: nodejs-node-gyp %define docpath %{_docdir}/%{name} %if 0%{?suse_version} > 1010 BuildRequires: fdupes From e26735349b39953f60bd293a57f5e139fa7b3640c1c1a459f96d7dda21317fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Mon, 6 Jul 2015 07:27:18 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=79 --- swig.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/swig.spec b/swig.spec index d27efbc..1861390 100644 --- a/swig.spec +++ b/swig.spec @@ -51,8 +51,6 @@ BuildRequires: perl-devel %endif %endif %if 0%{?suse_version} > 0 -BuildRequires: nodejs-devel -BuildRequires: nodejs-node-gyp %define docpath %{_docdir}/%{name} %if 0%{?suse_version} > 1010 BuildRequires: fdupes From 8389bba7dd99af185e2eab371b860f953b4e5b5bed3e403d9f7e90259290f8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Mon, 6 Jul 2015 08:13:54 +0000 Subject: [PATCH 3/5] - explicitly disable ocaml (bug in configure script) OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=80 --- swig.changes | 2 ++ swig.spec | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/swig.changes b/swig.changes index 8afc630..f41d2b7 100644 --- a/swig.changes +++ b/swig.changes @@ -7,6 +7,8 @@ Mon Jul 6 06:22:21 UTC 2015 - kkaempf@suse.com - Language improvements and bug fixes for C#, Go, Java, Lua, Python, R. +- explicitly disable ocaml (bug in configure script) + ------------------------------------------------------------------- Sun Feb 1 18:32:16 UTC 2015 - dmitry_r@opensuse.org diff --git a/swig.spec b/swig.spec index 1861390..d52da19 100644 --- a/swig.spec +++ b/swig.spec @@ -121,7 +121,7 @@ understandig SWIG usage. %setup -q %build -%configure --disable-ccache +%configure --disable-ccache --without-ocaml make %{?_smp_mflags} %check From 821800cf35debb21dc707ec9ab19312b54ec1f616902862f8cbc7fb597273958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Mon, 6 Jul 2015 08:43:16 +0000 Subject: [PATCH 4/5] - Fix ocaml check (swig-3.0.6.patch) OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=81 --- swig-3.0.6.patch | 12 ++++++++++++ swig.changes | 5 +++++ swig.spec | 7 +++++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 swig-3.0.6.patch diff --git a/swig-3.0.6.patch b/swig-3.0.6.patch new file mode 100644 index 0000000..c9726c6 --- /dev/null +++ b/swig-3.0.6.patch @@ -0,0 +1,12 @@ +diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-swig-3.0.6/configure.ac ./configure.ac +--- ../orig-swig-3.0.6/configure.ac 2015-07-05 18:59:41.000000000 +0200 ++++ ./configure.ac 2015-07-06 10:19:14.832123159 +0200 +@@ -1891,7 +1891,7 @@ + + AC_MSG_CHECKING(for Ocaml compiler) + if test -z "$OCAMLC"; then +- AC_CHECK_PROGS(OCAMLC, ocamlc, :) ++ AC_CHECK_PROGS(OCAMLC, ocamlc, ) + fi + + AC_MSG_CHECKING(for Ocaml toplevel creator) diff --git a/swig.changes b/swig.changes index f41d2b7..1844290 100644 --- a/swig.changes +++ b/swig.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 6 08:43:00 UTC 2015 - kkaempf@suse.com + +- Fix ocaml check (swig-3.0.6.patch) + ------------------------------------------------------------------- Mon Jul 6 06:22:21 UTC 2015 - kkaempf@suse.com diff --git a/swig.spec b/swig.spec index d52da19..5478d33 100644 --- a/swig.spec +++ b/swig.spec @@ -25,7 +25,8 @@ Group: Development/Languages/C and C++ Url: http://www.swig.org/ Source: http://sourceforge.net/projects/swig/files/swig/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: %{name}.rpmlintrc - +# Ocaml detection is wrong +Patch: %{name}-%{version}.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: boost-devel @@ -119,9 +120,11 @@ understandig SWIG usage. %prep %setup -q +%patch -p1 %build -%configure --disable-ccache --without-ocaml +./autogen.sh +%configure --disable-ccache make %{?_smp_mflags} %check From 88cf571a4fa20fec4fe587800c271853680800597fb44dd66d2ab4db034d8e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sun, 12 Jul 2015 06:42:47 +0000 Subject: [PATCH 5/5] Accepting request 316053 from home:badshah400:branches:devel:tools:building Fix octave>=4.0 bindings OBS-URL: https://build.opensuse.org/request/show/316053 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=82 --- swig-octave4.patch | 227 +++++++++++++++++++++++++++++++++++++++++++++ swig.changes | 6 ++ swig.spec | 7 +- 3 files changed, 238 insertions(+), 2 deletions(-) create mode 100644 swig-octave4.patch diff --git a/swig-octave4.patch b/swig-octave4.patch new file mode 100644 index 0000000..293a8c2 --- /dev/null +++ b/swig-octave4.patch @@ -0,0 +1,227 @@ +diff --git a/Examples/test-suite/octave/default_constructor_runme.m b/Examples/test-suite/octave/default_constructor_runme.m +index 2f8bb39..ebe553b 100644 +--- a/Examples/test-suite/octave/default_constructor_runme.m ++++ b/Examples/test-suite/octave/default_constructor_runme.m +@@ -14,24 +14,18 @@ try + catch + end_try_catch + +-del_b = dc.delete_B; +- + try + bb = dc.new_BB(); + error("Whoa. new_BB created.") + catch + end_try_catch + +-del_bb = dc.delete_BB; +- + try + c = dc.new_C(); + error("Whoa. new_C created.") + catch + end_try_catch + +-del_c = dc.delete_C; +- + cc = dc.new_CC(); + dc.delete_CC(cc); + +@@ -41,24 +35,18 @@ try + catch + end_try_catch + +-del_d = dc.delete_D; +- + try + dd = dc.new_DD(); + error("Whoa. new_DD created") + catch + end_try_catch + +-dd = dc.delete_DD; +- + try + ad = dc.new_AD(); + error("Whoa. new_AD created") + catch + end_try_catch + +-del_ad = dc.delete_AD; +- + e = dc.new_E(); + dc.delete_E(e); + +@@ -71,12 +59,10 @@ try + catch + end_try_catch + +-del_eb = dc.delete_EB; +- + f = dc.new_F(); + + try +- del_f = dc.delete_F; ++ del_f = dc.delete_F(f); + error("Whoa. delete_F created") + catch + end_try_catch +@@ -86,7 +72,7 @@ dc.F_destroy(f); + g = dc.new_G(); + + try +- del_g = dc.delete_G; ++ del_g = dc.delete_G(g); + error("Whoa. delete_G created") + catch + end_try_catch +diff --git a/Lib/octave/octcontainer.swg b/Lib/octave/octcontainer.swg +index 723256c..0211b33 100644 +--- a/Lib/octave/octcontainer.swg ++++ b/Lib/octave/octcontainer.swg +@@ -12,6 +12,7 @@ + * ----------------------------------------------------------------------------- */ + + %{ ++#include + #include + %} + +diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg +index b5c3e5d..ddfd489 100644 +--- a/Lib/octave/octrun.swg ++++ b/Lib/octave/octrun.swg +@@ -868,6 +868,17 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + } + + #if defined (HAVE_HDF5) ++# if SWIG_OCTAVE_PREREQ(4,0,0) ++ virtual bool ++ save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats) { ++ return true; ++ } ++ ++ virtual bool ++ load_hdf5 (octave_hdf5_id loc_id, const char *name, bool have_h5giterate_bug) { ++ return true; ++ } ++# else + virtual bool + save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats) { + return true; +@@ -877,6 +888,7 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug) { + return true; + } ++# endif + #endif + + virtual octave_value convert_to_str(bool pad = false, bool force = false, char type = '"') const { +@@ -969,7 +981,11 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + return octave_value(); + } + ++#if SWIG_OCTAVE_PREREQ(4,0,0) ++ void print(std::ostream &os, bool pr_as_read_syntax = false) { ++#else + void print(std::ostream &os, bool pr_as_read_syntax = false) const { ++#endif + if (is_string()) { + os << string_value(); + return; +@@ -1089,6 +1105,15 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + { return ptr->load_binary(is, swap, fmt); } + + #if defined (HAVE_HDF5) ++# if SWIG_OCTAVE_PREREQ(4,0,0) ++ virtual bool ++ save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats) ++ { return ptr->save_hdf5(loc_id, name, save_as_floats); } ++ ++ virtual bool ++ load_hdf5 (octave_hdf5_id loc_id, const char *name, bool have_h5giterate_bug) ++ { return ptr->load_hdf5(loc_id, name, have_h5giterate_bug); } ++# else + virtual bool + save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats) + { return ptr->save_hdf5(loc_id, name, save_as_floats); } +@@ -1096,6 +1121,7 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + virtual bool + load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug) + { return ptr->load_hdf5(loc_id, name, have_h5giterate_bug); } ++# endif + #endif + + virtual octave_value convert_to_str(bool pad = false, bool force = false, char type = '"') const +@@ -1104,14 +1130,22 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + virtual octave_value convert_to_str_internal(bool pad, bool force, char type) const + { return ptr->convert_to_str_internal(pad, force, type); } + ++#if SWIG_OCTAVE_PREREQ(4,0,0) ++ void print(std::ostream &os, bool pr_as_read_syntax = false) ++#else + void print(std::ostream &os, bool pr_as_read_syntax = false) const ++#endif + { return ptr->print(os, pr_as_read_syntax); } + + private: ++#if !SWIG_OCTAVE_PREREQ(4,0,0) + DECLARE_OCTAVE_ALLOCATOR; ++#endif + DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA; + }; ++#if !SWIG_OCTAVE_PREREQ(4,0,0) + DEFINE_OCTAVE_ALLOCATOR(octave_swig_ref); ++#endif + DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_swig_ref, "swig_ref", "swig_ref"); + + class octave_swig_packed:public octave_base_value { +@@ -1143,7 +1177,11 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + return true; + } + ++#if SWIG_OCTAVE_PREREQ(4,0,0) ++ void print(std::ostream &os, bool pr_as_read_syntax = false) { ++#else + void print(std::ostream &os, bool pr_as_read_syntax = false) const { ++#endif + indent(os); + os << "swig packed type: name = " << (type ? type->name : std::string()) << ", len = " << buf.size(); newline(os); + } +@@ -1167,6 +1205,17 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + } + + #if defined (HAVE_HDF5) ++# if SWIG_OCTAVE_PREREQ(4,0,0) ++ virtual bool ++ save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats) { ++ return true; ++ } ++ ++ virtual bool ++ load_hdf5 (octave_hdf5_id loc_id, const char *name, bool have_h5giterate_bug) { ++ return true; ++ } ++# else + virtual bool + save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats) { + return true; +@@ -1176,13 +1225,18 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug) { + return true; + } ++# endif + #endif + + private: ++#if !SWIG_OCTAVE_PREREQ(4,0,0) + DECLARE_OCTAVE_ALLOCATOR; ++#endif + DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA; + }; ++#if !SWIG_OCTAVE_PREREQ(4,0,0) + DEFINE_OCTAVE_ALLOCATOR(octave_swig_packed); ++#endif + DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_swig_packed, "swig_packed", "swig_packed"); + + SWIGRUNTIME octave_value_list octave_set_immutable(const octave_value_list &args, int nargout) { diff --git a/swig.changes b/swig.changes index 1844290..30c3b1e 100644 --- a/swig.changes +++ b/swig.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 10 14:02:07 UTC 2015 - badshah400@gmail.com + +- Add swig-octave4.patch to fix swig bindings for octave >= 4.0 + (patch taken from Fedora, and has been submitted upstream). + ------------------------------------------------------------------- Mon Jul 6 08:43:00 UTC 2015 - kkaempf@suse.com diff --git a/swig.spec b/swig.spec index 5478d33..3af8715 100644 --- a/swig.spec +++ b/swig.spec @@ -26,7 +26,9 @@ Url: http://www.swig.org/ Source: http://sourceforge.net/projects/swig/files/swig/%{name}-%{version}/%{name}-%{version}.tar.gz Source1: %{name}.rpmlintrc # Ocaml detection is wrong -Patch: %{name}-%{version}.patch +Patch0: %{name}-%{version}.patch +# PATCH-FIX-UPSTREAM swig-octave4.patch badshah400@gmail.com -- Fix swig bindings for octave >= 4.0 +Patch1: swig-octave4.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: boost-devel @@ -120,7 +122,8 @@ understandig SWIG usage. %prep %setup -q -%patch -p1 +%patch0 -p1 +%patch1 -p1 %build ./autogen.sh