Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45987fab11 | ||
|
|
2510ac580b | ||
|
|
859a5f560f | ||
|
|
3d52b3c5d1 | ||
|
|
6511db03c1 |
4 changed files with 205 additions and 4 deletions
|
|
@ -0,0 +1,27 @@
|
|||
From 3d5157514889c668bc14c245246c388eb23615ea Mon Sep 17 00:00:00 2001
|
||||
From: pekkarr <pekkarr@protonmail.com>
|
||||
Date: Mon, 29 Apr 2024 10:00:38 +0300
|
||||
Subject: [PATCH] Fix gcc's -Wformat-security warning in R Raise function
|
||||
(#2896)
|
||||
|
||||
The `Rf_error` function takes a format string as its first argument.
|
||||
---
|
||||
Lib/r/r.swg | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Lib/r/r.swg b/Lib/r/r.swg
|
||||
index c1ce37c3e..63b69d8cf 100644
|
||||
--- a/Lib/r/r.swg
|
||||
+++ b/Lib/r/r.swg
|
||||
@@ -28,7 +28,7 @@ SWIGEXPORT void SWIG_init(void) {
|
||||
|
||||
%runtime %{
|
||||
SWIGINTERN void SWIG_R_Raise(SEXP obj, const char *msg) {
|
||||
- Rf_error(Rf_isString(obj) ? CHAR(Rf_asChar(obj)) : msg);
|
||||
+ Rf_error("%s", Rf_isString(obj) ? CHAR(Rf_asChar(obj)) : msg);
|
||||
}
|
||||
%}
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From 8a19cb77adfec168236e2c63d1a9d1a310f886cc Mon Sep 17 00:00:00 2001
|
||||
From: Olly Betts <olly@survex.com>
|
||||
Date: Fri, 1 Mar 2024 10:40:12 +1300
|
||||
Subject: [PATCH] [java] Avoid using deprecated API in doxygen example
|
||||
|
||||
Passing a String command to Runtime.exec() has been deprecated since
|
||||
Java 18.
|
||||
---
|
||||
Examples/java/doxygen/runme.java | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Examples/java/doxygen/runme.java b/Examples/java/doxygen/runme.java
|
||||
index 6b7bb3d01..5970521c8 100644
|
||||
--- a/Examples/java/doxygen/runme.java
|
||||
+++ b/Examples/java/doxygen/runme.java
|
||||
@@ -33,8 +33,8 @@ public class runme {
|
||||
System.out.println(" perimeter = " + shapes[i].perimeter());
|
||||
}
|
||||
|
||||
- String command = "javadoc -quiet -public -d javadocs example.java Shape.java Circle.java Square.java RectangleInt.java";
|
||||
- System.out.println("\nRunning: " + command);
|
||||
+ String[] command = {"javadoc", "-quiet", "-public", "-d", "javadocs", "example.java", "Shape.java", "Circle.java", "Square.java", "RectangleInt.java"};
|
||||
+ System.out.println("\nRunning: " + String.join(" ", command));
|
||||
Process p = Runtime.getRuntime().exec(command);
|
||||
int exitCode = p.waitFor();
|
||||
System.out.println("javadoc exited with code " + exitCode);
|
||||
--
|
||||
2.44.0
|
||||
|
||||
118
swig-java-Suppress-System.runFinalization-removal-warning.patch
Normal file
118
swig-java-Suppress-System.runFinalization-removal-warning.patch
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
From ec56bff28d3ad5acf82e139a83da8135aa2dd618 Mon Sep 17 00:00:00 2001
|
||||
From: Olly Betts <olly@survex.com>
|
||||
Date: Fri, 1 Mar 2024 10:42:22 +1300
|
||||
Subject: [PATCH] [java] Suppress System.runFinalization() removal warnings
|
||||
|
||||
These need to be addressed, but meanwhile it makes running the testsuite
|
||||
with OpenJDK 21 or newer unhelpfully noisy so suppressing it seems more
|
||||
helpful than not.
|
||||
|
||||
Closes: #2819
|
||||
---
|
||||
Examples/test-suite/java/cpp11_std_unique_ptr_runme.java | 2 ++
|
||||
Examples/test-suite/java/director_pass_by_value_runme.java | 2 ++
|
||||
Examples/test-suite/java/java_director_runme.java | 2 ++
|
||||
Examples/test-suite/java/li_boost_intrusive_ptr_runme.java | 4 ++++
|
||||
Examples/test-suite/java/li_boost_shared_ptr_runme.java | 4 ++++
|
||||
Examples/test-suite/java/li_std_auto_ptr_runme.java | 2 ++
|
||||
6 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/Examples/test-suite/java/cpp11_std_unique_ptr_runme.java b/Examples/test-suite/java/cpp11_std_unique_ptr_runme.java
|
||||
index f90ef7041..c5622f65f 100644
|
||||
--- a/Examples/test-suite/java/cpp11_std_unique_ptr_runme.java
|
||||
+++ b/Examples/test-suite/java/cpp11_std_unique_ptr_runme.java
|
||||
@@ -10,6 +10,8 @@ public class cpp11_std_unique_ptr_runme {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
private static void WaitForGC()
|
||||
{
|
||||
System.gc();
|
||||
diff --git a/Examples/test-suite/java/director_pass_by_value_runme.java b/Examples/test-suite/java/director_pass_by_value_runme.java
|
||||
index 1d34c3b55..48ccabf73 100644
|
||||
--- a/Examples/test-suite/java/director_pass_by_value_runme.java
|
||||
+++ b/Examples/test-suite/java/director_pass_by_value_runme.java
|
||||
@@ -12,6 +12,8 @@ public class director_pass_by_value_runme {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
private static void WaitForGC() {
|
||||
System.gc();
|
||||
System.runFinalization();
|
||||
diff --git a/Examples/test-suite/java/java_director_runme.java b/Examples/test-suite/java/java_director_runme.java
|
||||
index 2167d2621..40829463b 100644
|
||||
--- a/Examples/test-suite/java/java_director_runme.java
|
||||
+++ b/Examples/test-suite/java/java_director_runme.java
|
||||
@@ -13,6 +13,8 @@ public class java_director_runme {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
private static void WaitForGC()
|
||||
{
|
||||
System.gc();
|
||||
diff --git a/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java b/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java
|
||||
index 750ec5067..721a78d56 100644
|
||||
--- a/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java
|
||||
+++ b/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java
|
||||
@@ -13,6 +13,8 @@ public class li_boost_intrusive_ptr_runme {
|
||||
// Debugging flag
|
||||
public final static boolean debug = false;
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
private static void WaitForGC()
|
||||
{
|
||||
System.gc();
|
||||
@@ -23,6 +25,8 @@ public class li_boost_intrusive_ptr_runme {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
public static void main(String argv[])
|
||||
{
|
||||
if (debug)
|
||||
diff --git a/Examples/test-suite/java/li_boost_shared_ptr_runme.java b/Examples/test-suite/java/li_boost_shared_ptr_runme.java
|
||||
index b513fade7..c1ec7f7bf 100644
|
||||
--- a/Examples/test-suite/java/li_boost_shared_ptr_runme.java
|
||||
+++ b/Examples/test-suite/java/li_boost_shared_ptr_runme.java
|
||||
@@ -13,6 +13,8 @@ public class li_boost_shared_ptr_runme {
|
||||
// Debugging flag
|
||||
public final static boolean debug = false;
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
private static void WaitForGC()
|
||||
{
|
||||
System.gc();
|
||||
@@ -23,6 +25,8 @@ public class li_boost_shared_ptr_runme {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
public static void main(String argv[])
|
||||
{
|
||||
if (debug)
|
||||
diff --git a/Examples/test-suite/java/li_std_auto_ptr_runme.java b/Examples/test-suite/java/li_std_auto_ptr_runme.java
|
||||
index 24e353ddc..978a72504 100644
|
||||
--- a/Examples/test-suite/java/li_std_auto_ptr_runme.java
|
||||
+++ b/Examples/test-suite/java/li_std_auto_ptr_runme.java
|
||||
@@ -10,6 +10,8 @@ public class li_std_auto_ptr_runme {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Suppress warning about System.runFinalization() call.
|
||||
+ @SuppressWarnings({"deprecation", "removal"})
|
||||
private static void WaitForGC()
|
||||
{
|
||||
System.gc();
|
||||
--
|
||||
2.44.0
|
||||
|
||||
35
swig.spec
35
swig.spec
|
|
@ -19,9 +19,17 @@
|
|||
%{!?tcl:%global tcl 1}
|
||||
%{!?lualang:%global lualang 1}
|
||||
%{!?perllang:%global perllang 1}
|
||||
%{!?phplang:%global phplang 1}
|
||||
%{!?rubylang:%global rubylang 1}
|
||||
%{!?python3lang:%global python3lang 1}
|
||||
|
||||
# PHP drop support for 32-bit builds since Fedora 41.
|
||||
%if 0%{?fedora} >= 41
|
||||
%ifarch %{ix86}
|
||||
%global phplang 0
|
||||
%endif
|
||||
%endif
|
||||
%{!?phplang:%global phplang 1}
|
||||
|
||||
# OCaml packages not built on i686 since OCaml 5 / Fedora 39.
|
||||
%ifarch %{ix86}
|
||||
%{!?ocamllang:%global ocamllang 0}
|
||||
|
|
@ -42,10 +50,12 @@
|
|||
%bcond_without build_ccache_swig
|
||||
%endif
|
||||
|
||||
%ifarch i686
|
||||
%ifarch %{ix86}
|
||||
%{!?javalang:%global javalang 0}
|
||||
%else
|
||||
%{!?javalang:%global javalang 1}
|
||||
# Temporary disable java tests, because they doesn't pass with java-21-openjdk
|
||||
# https://github.com/swig/swig/issues/2767
|
||||
%{!?javalang:%global javalang 0}
|
||||
%endif
|
||||
|
||||
# Do not run Go tests, they failed with 4.0.0 on ppc64le, s390
|
||||
|
|
@ -58,7 +68,7 @@
|
|||
Summary: Connects C/C++/Objective C to some high-level programming languages
|
||||
Name: swig
|
||||
Version: 4.2.1
|
||||
Release: 1%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPL-3.0-or-later AND BSD-3-Clause
|
||||
URL: https://www.swig.org/
|
||||
Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz
|
||||
|
|
@ -69,6 +79,12 @@ Source2: description-ccache.h2m
|
|||
Source3: ccache-swig.sh
|
||||
Source4: ccache-swig.csh
|
||||
%endif
|
||||
# Small fixes for java tests, in upstream after 4.2.1
|
||||
Patch0: swig-java-Avoid-using-deprecated-API-in-doxygen-example.patch
|
||||
Patch1: swig-java-Suppress-System.runFinalization-removal-warning.patch
|
||||
# Fix gcc's -Wformat-security warning in R Raise function
|
||||
# https://github.com/swig/swig/pull/2896
|
||||
Patch2: swig-R-Fix-gcc-s-Wformat-security-warning-in-R-Raise-functi.patch
|
||||
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
|
|
@ -352,6 +368,17 @@ install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb
|
|||
%{_datadir}/%{name}/gdb
|
||||
|
||||
%changelog
|
||||
* Mon Apr 29 2024 Jitka Plesnikova <jplesnik@redhat.com> - 4.2.1-4
|
||||
- Fix gcc's -Wformat-security warning in R Raise function (rhbz#2277767)
|
||||
|
||||
* Fri Apr 12 2024 Remi Collet <remi@remirepo.net> - 4.2.1-3
|
||||
- disable PHP support on 32-bit
|
||||
https://fedoraproject.org/wiki/Changes/php_no_32_bit
|
||||
|
||||
* Sat Mar 02 2024 Jiri Vanek <jvanek@redhat.com> - 4.2.1-2
|
||||
- Rebuilt for java-21-openjdk as system jdk
|
||||
- Temporary disable java tests (rhbz#2266693)
|
||||
|
||||
* Mon Feb 26 2024 Jitka Plesnikova <jplesnik@redhat.com> - 4.2.1-1
|
||||
- 4.2.1 bump (rhbz#2265786)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue