From 489889ab10455998bc96558efc7276487231fb96 Mon Sep 17 00:00:00 2001 From: maokecheng Date: Tue, 26 Dec 2023 16:12:40 +0800 Subject: [PATCH] * Tue Dec 26 2023 maokecheng - 4.0.2-4 - Reference:https://github.com/swig/swig/commit/f0bb77221a3c0a88e65d87b6a611b9e180b16108 - DESC:Bugfix for octave 4.4 --- backport-Bugfix-for-octave-4.4.patch | 35 ++++++++++++++++++++++++++++ swig.spec | 8 +++++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 backport-Bugfix-for-octave-4.4.patch diff --git a/backport-Bugfix-for-octave-4.4.patch b/backport-Bugfix-for-octave-4.4.patch new file mode 100644 index 0000000..192d6d7 --- /dev/null +++ b/backport-Bugfix-for-octave-4.4.patch @@ -0,0 +1,35 @@ +From f0bb77221a3c0a88e65d87b6a611b9e180b16108 Mon Sep 17 00:00:00 2001 +From: Markus Friedrich +Date: Sun, 24 Nov 2019 14:55:36 +0100 +Subject: [PATCH] Bugfix for octave 4.4 + +With octave 4.4 the function +virtual bool octave_base_value::is_object() const +was renamed to +virtual bool octave_base_value::isobject() const + +As noted in CHANGES "2012-03-26: xavier98", is_object() must return true +for swig types whereas octave_base_value::is_object returns false per +default. +--- + Lib/octave/octrun.swg | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg +index ff614e68147..48f179a2131 100644 +--- a/Lib/octave/octrun.swg ++++ b/Lib/octave/octrun.swg +@@ -1096,8 +1096,13 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); + octave_value subsasgn(const std::string &ops, const std::list < octave_value_list > &idx, const octave_value &rhs) + { return ptr->subsasgn(ops, idx, rhs); } + ++#if SWIG_OCTAVE_PREREQ(4,2,0) ++ virtual bool isobject() const ++ { return ptr->is_object(); } ++#else + virtual bool is_object() const + { return ptr->is_object(); } ++#endif + + virtual bool is_string() const + { return ptr->is_string(); } diff --git a/swig.spec b/swig.spec index 0af9443..23ca281 100644 --- a/swig.spec +++ b/swig.spec @@ -1,12 +1,12 @@ Name: swig Version: 4.0.2 -Release: 3 +Release: 4 Summary: Links C/C++/Objective C to languages for some advanced programing License: GPLv3+ and BSD URL: http://swig.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz Source1: description.h2m - +Patch1: backport-Bugfix-for-octave-4.4.patch BuildRequires: perl-interpreter pcre-devel python3-devel autoconf automake gawk dos2unix BuildRequires: gcc-c++ help2man perl-devel perl(base) perl(Config) perl(Devel::Peek) BuildRequires: perl(ExtUtils::MakeMaker) perl(fields) perl(Math::BigInt) perl(strict) @@ -99,6 +99,10 @@ install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb %{_mandir}/man1/swig.1* %changelog +* Tue Dec 26 2023 maokecheng - 4.0.2-4 +- Reference:https://github.com/swig/swig/commit/f0bb77221a3c0a88e65d87b6a611b9e180b16108 +- DESC:Bugfix for octave 4.4 + * Tue Apr 20 2021 panxiaohe - 4.0.2-3 - Type:enhancement - ID:NA -- Gitee