6 Commits

Author SHA256 Message Date
aca9304818 Accepting request 1322262 from devel:tools:building
OBS-URL: https://build.opensuse.org/request/show/1322262
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swig?expand=0&rev=87
2025-12-15 10:45:21 +00:00
Klaus Kämpf
3732abff90 - Update to 4.4.1:
* Fix errors with some combinations of Py_LIMITED_API and recent
    Python versions.
  * A couple of other minor fixes/improvements.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=161
2025-12-11 18:42:27 +00:00
d20a2e3b9c Accepting request 1312830 from devel:tools:building
OBS-URL: https://build.opensuse.org/request/show/1312830
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swig?expand=0&rev=86
2025-11-04 17:40:30 +00:00
Klaus Kämpf
0f914b419b Accepting request 1312724 from home:kwk:branches:devel:tools:building
- Update to 4.4.0:
  * Python-3.14 and early Python-3.15 support including modernisations:
    - Remove some DeprecationWarnings.
    - Added support for free-threading Python.
    - Multi-phase module initialization.
    - Use heap types instead of static types.
  * Go minimum version is now 1.20.
  * Removed support for MzScheme/Racket.
  * Minor typemap improvements.
  * compactdefaultarg feature improvements and fixes.
  * Fewer C, C++ and Java compiler warnings in generated code.
  * c++-14 auto return type parsing fixes.
  * Various improvements related to parsing expressions.
  * Runtime type system thread safety fixes.
  * Minor fixes and improvements specific to:
    C#, D, Guile, Java, Javascript, Lua, Perl, PHP, Python, Tcl.

OBS-URL: https://build.opensuse.org/request/show/1312724
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=159
2025-10-21 12:55:03 +00:00
92a08673eb Accepting request 1285433 from devel:tools:building
OBS-URL: https://build.opensuse.org/request/show/1285433
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swig?expand=0&rev=85
2025-06-14 14:17:09 +00:00
c3c17362ed swig 4.3.1
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=157
2025-06-13 10:59:47 +00:00
6 changed files with 53 additions and 65 deletions

4
_service Normal file
View File

@@ -0,0 +1,4 @@
<services>
<service name="download_files" mode="manual"/>
</services>

View File

@@ -1,55 +0,0 @@
From 4e315cdd7c9072fd33ac1df3d208a0990b8231c3 Mon Sep 17 00:00:00 2001
From: Olly Betts <olly@survex.com>
Date: Sun, 27 Oct 2024 10:02:11 +1300
Subject: [PATCH] Fix precedence of casts
Casts should have the same high precedence as unary plus and minus, but
actually had a lower precedence than anything else.
This could lead to the wrong type being deduced in obscure cases, but
also prevented SWIG deducing a type for expressions such as (0)*1+2
which SWIG parses as a cast and then fixes up afterwards.
A bug fixed in 4.3.0 made this latter problem manifest more often
(previously type deduction happened to work for (0)*1+2 due to an
internal field not getting cleared properly).
Fixes #3058
Index: swig-4.3.0/Examples/test-suite/cpp11_auto_variable.i
===================================================================
--- swig-4.3.0.orig/Examples/test-suite/cpp11_auto_variable.i
+++ swig-4.3.0/Examples/test-suite/cpp11_auto_variable.i
@@ -62,3 +62,11 @@ static auto wstring_lit_len2 = sizeof("1
//static auto constexpr greeting = "Hello";
%}
+
+%inline %{
+/* Regression test for #3058 */
+auto CAST_HAD_WRONG_PRECEDENCE1 = (0)*1+2;
+auto CAST_HAD_WRONG_PRECEDENCE2 = (0)&1|2;
+auto CAST_HAD_WRONG_PRECEDENCE3 = (0)-1|2;
+auto CAST_HAD_WRONG_PRECEDENCE4 = (0)+1|2;
+%}
Index: swig-4.3.0/Source/CParse/parser.y
===================================================================
--- swig-4.3.0.orig/Source/CParse/parser.y
+++ swig-4.3.0/Source/CParse/parser.y
@@ -1793,7 +1793,6 @@ static String *add_qualifier_to_declarat
%token <str> DOXYGENSTRING
%token <str> DOXYGENPOSTSTRING
-%precedence CAST
%left QUESTIONMARK
%left LOR
%left LAND
@@ -1809,7 +1808,7 @@ static String *add_qualifier_to_declarat
%left LSHIFT RSHIFT
%left PLUS MINUS
%left STAR SLASH MODULO
-%precedence UMINUS NOT LNOT
+%precedence UMINUS NOT LNOT CAST
%token DCOLON
%type <node> program interface declaration swig_directive ;

Binary file not shown.

3
swig-4.4.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40162a706c56f7592d08fd52ef5511cb7ac191f3593cf07306a0a554c6281fcf
size 8658358

View File

@@ -1,3 +1,41 @@
-------------------------------------------------------------------
Mon Dec 8 09:00:20 UTC 2025 - Klaus Kämpf <kkaempf@suse.de>
- Update to 4.4.1:
* Fix errors with some combinations of Py_LIMITED_API and recent
Python versions.
* A couple of other minor fixes/improvements.
-------------------------------------------------------------------
Tue Oct 21 09:00:34 UTC 2025 - Klaus Kämpf <kkaempf@suse.de>
- Update to 4.4.0:
* Python-3.14 and early Python-3.15 support including modernisations:
- Remove some DeprecationWarnings.
- Added support for free-threading Python.
- Multi-phase module initialization.
- Use heap types instead of static types.
* Go minimum version is now 1.20.
* Removed support for MzScheme/Racket.
* Minor typemap improvements.
* compactdefaultarg feature improvements and fixes.
* Fewer C, C++ and Java compiler warnings in generated code.
* c++-14 auto return type parsing fixes.
* Various improvements related to parsing expressions.
* Runtime type system thread safety fixes.
* Minor fixes and improvements specific to:
C#, D, Guile, Java, Javascript, Lua, Perl, PHP, Python, Tcl.
-------------------------------------------------------------------
Mon Jun 9 08:48:52 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
- Update to 4.3.1:
* Small number of regression fixes for Python and Java
* Corner case operator precedence bug fix affecting type deduction
* Octave 10 compilation errors fix
- drop swig-4.3.0-Fix-precedence-of-casts.patch, included upstream
-------------------------------------------------------------------
Sun Dec 8 18:15:12 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>

View File

@@ -1,8 +1,8 @@
#
# spec file for package swig
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -31,7 +31,7 @@ BuildRequires: ruby
BuildRequires: ruby-devel
%endif
Name: swig
Version: 4.3.0
Version: 4.4.1
Release: 0
Summary: Simplified Wrapper and Interface Generator
License: BSD-3-Clause AND GPL-3.0-or-later
@@ -39,8 +39,11 @@ Group: Development/Languages/C and C++
URL: https://www.swig.org/
Source: https://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1: %{name}.rpmlintrc
Patch0: swig-4.3.0-Fix-precedence-of-casts.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison >= 3.5
BuildRequires: fdupes
BuildRequires: libtool
BuildRequires: pcre2-devel
BuildRequires: perl
BuildRequires: pkgconfig
@@ -72,9 +75,6 @@ BuildRequires: ocaml-camlp4-devel
BuildRequires: ocaml-findlib
%endif
# for swig-4.3.0-Fix-precedence-of-casts.patch
BuildRequires: bison
%description
SWIG is a compiler that attempts to make it easy to integrate C, C++,
or Objective-C code with scripting languages including Perl, Tcl, and
@@ -135,6 +135,7 @@ export CXX=g++-12
%ifarch s390 s390x
export CCSHARED="-fPIC"
%endif
./autogen.sh
%configure \
%if %{without swig_ocaml}
--without-ocaml \