Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lal for openSUSE:Factory checked in 
at 2026-11-17 22:17:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lal (Old)
 and      /work/SRC/openSUSE:Factory/.lal.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lal"

Tue Nov 17 22:17:39 2026 rev:22 rq:1398181 version:7.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/lal/lal.changes  2026-08-26 19:52:33.174261268 
+0200
+++ /work/SRC/openSUSE:Factory/.lal.new.1251/lal.changes        2026-11-17 
22:17:41.347483523 +0100
@@ -1,0 +2,14 @@
+Tue Nov 17 14:00:00 UTC 2026 - Ana Guerrero <[email protected]>
+
+- Add lal-swig-4_5.patch: compatibility with SWIG 4.5, which dropped
+  Python 2 support. This patch also fixes the issue with tests and
+  contains previous patch lal-swig-4_5-fragment.patch
+
+-------------------------------------------------------------------
+Mon Nov 16 14:41:00 UTC 2026 - Dominique Leuenberger <[email protected]>
+
+- Add lal-swig-4_5-fragment.patch: define dummy fragment for
+  swiglal_new_copy_array to satisfy SWIG 4.5+ fragment dependency
+  in %typemaps_string_alloc.
+
+-------------------------------------------------------------------

New:
----
  lal-swig-4_5.patch

----------(New B)----------
  New:
- Add lal-swig-4_5.patch: compatibility with SWIG 4.5, which dropped
  Python 2 support. This patch also fixes the issue with tests and
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lal.spec ++++++
--- /var/tmp/diff_new_pack.niqfxJ/_old  2026-11-17 22:17:42.176518556 +0100
+++ /var/tmp/diff_new_pack.niqfxJ/_new  2026-11-17 22:17:42.177518598 +0100
@@ -48,6 +48,8 @@
 Patch3:         lal-gcc16.patch
 # PATCH-FIX-UPSTREAM lal-ptr-const-qualifier.patch [email protected] -- Add 
const qualifier to pointer returned by strchr to prevent 'discarded-qualifiers' 
error
 Patch4:         lal-ptr-const-qualifier.patch
+# PATCH-FIX-UPSTREAM lal-swig-4_5.patch -- compatibility with SWIG 4.5 (Python 
2 support removed)
+Patch5:         lal-swig-4_5.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module numpy-devel}
 BuildRequires:  %{python_module numpy}
@@ -152,6 +154,7 @@
 %patch -P2 -p1
 %patch -P3 -p1
 %patch -P4 -p1
+%patch -P5 -p1
 
 %build
 autoreconf -fvi

++++++ lal-swig-4_5.patch ++++++
Subject: compatibility with SWIG 4.5

SWIG 4.5 dropped Python 2 support. LAL needs three small adjustments to keep
building and passing its Python tests with that version:

- %typemaps_string_alloc requires a named fragment for the copy helper, so
  define %swiglal_new_copy_char_array and pass that instead of the bare macro.
- PyInt_AsLong no longer exists; use PyLong_AsLong.
- The python:slot feature nb_nonzero was renamed to nb_bool. Wire __nonzero__
  to nb_bool as well, otherwise types such as LIGOTimeGPS and LALUnit become
  truthy even when they are zero and test_LIGOTimeGPS_operations fails with
  "assert (not LIGOTimeGPS(0, 0))".

--- a/swig/SWIGCommon.i
+++ b/swig/SWIGCommon.i
@@ -182,6 +182,8 @@ MACRO(A, B, C, X);
 #define %swiglal_new_copy(VAL, TYPE...) 
%reinterpret_cast(memcpy(%swiglal_new_instance(TYPE), &(VAL), sizeof(TYPE)), 
TYPE*)
 #define %swiglal_new_array(SIZE, TYPE...) %reinterpret_cast(XLALCalloc(SIZE, 
sizeof(TYPE)), TYPE*)
 #define %swiglal_new_copy_array(PTR, SIZE, TYPE...) 
%reinterpret_cast(memcpy(%swiglal_new_array(SIZE, TYPE), PTR, 
sizeof(TYPE)*(SIZE)), TYPE*)
+#define %swiglal_new_copy_char_array(PTR, SIZE) %swiglal_new_copy_array(PTR, 
SIZE, char)
+%fragment("%swiglal_new_copy_char_array", "header") {}
 
 ///
 /// # General interface code
@@ -1800,12 +1802,12 @@ if (strides[I-1] == 0) {
 %typemaps_string_alloc(%checkcode(STRING), %checkcode(char),
                        SWIGWARN_TYPEMAP_CHARLEAK_MSG, char, LALchar,
                        SWIG_AsLALcharPtrAndSize, SWIG_FromLALcharPtrAndSize,
-                       strlen, SWIG_strnlen, %swiglal_new_copy_array, XLALFree,
+                       strlen, SWIG_strnlen, %swiglal_new_copy_char_array, 
XLALFree,
                        "<limits.h>", CHAR_MIN, CHAR_MAX);
 #else
 %typemaps_string_alloc(%checkcode(STRING), %checkcode(char), char, LALchar,
                        SWIG_AsLALcharPtrAndSize, SWIG_FromLALcharPtrAndSize,
-                       strlen, SWIG_strnlen, %swiglal_new_copy_array, XLALFree,
+                       strlen, SWIG_strnlen, %swiglal_new_copy_char_array, 
XLALFree,
                        "<limits.h>", CHAR_MIN, CHAR_MAX);
 #endif
 
--- a/swig/SWIGPython.i
+++ b/swig/SWIGPython.i
@@ -160,6 +160,10 @@ SWIGINTERN int swiglal_output_stdouterr(void) {
 %swiglal_py_ury_op(int, unaryfunc, nb_int);
 %swiglal_py_ury_op(long, unaryfunc, nb_long);
 %swiglal_py_ury_op(nonzero, inquiry, nb_nonzero);
+#if SWIG_VERSION >= 0x040500
+// SWIG 4.5 removed Python 2 support: nb_nonzero was renamed to nb_bool.
+%swiglal_py_ury_op(nonzero, inquiry, nb_bool);
+#endif
 %swiglal_py_ury_op(repr, reprfunc, tp_repr);
 %swiglal_py_ury_op(str, reprfunc, tp_str);
 
@@ -420,15 +424,15 @@ SWIGINTERN int swiglal_SWIG_AsVal_COMPLEX16(PyObject 
*obj, COMPLEX16* val) {
       %argument_fail(SWIG_ValueError, "$type (must have 9 elements)", 
$symname, $argnum);
     }
     PyObject *seq = PySequence_Fast($input, "$type (not a sequence)");
-    temptm.tm_year  = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 0)), int);
-    temptm.tm_mon   = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 1)), int);
-    temptm.tm_mday  = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 2)), int);
-    temptm.tm_hour  = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 3)), int);
-    temptm.tm_min   = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 4)), int);
-    temptm.tm_sec   = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 5)), int);
-    temptm.tm_wday  = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 6)), int);
-    temptm.tm_yday  = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 7)), int);
-    temptm.tm_isdst = 
%static_cast(PyInt_AsLong(PySequence_Fast_GET_ITEM($input, 8)), int);
+    temptm.tm_year  = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 0)), int);
+    temptm.tm_mon   = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 1)), int);
+    temptm.tm_mday  = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 2)), int);
+    temptm.tm_hour  = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 3)), int);
+    temptm.tm_min   = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 4)), int);
+    temptm.tm_sec   = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 5)), int);
+    temptm.tm_wday  = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 6)), int);
+    temptm.tm_yday  = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 7)), int);
+    temptm.tm_isdst = 
%static_cast(PyLong_AsLong(PySequence_Fast_GET_ITEM($input, 8)), int);
     Py_CLEAR(seq);
     if (PyErr_Occurred()) {  // Catch any errors while converting items to 
integers
       SWIG_fail;

Reply via email to