[packages/lal-xml] - fix building with numpy2 and fresh libxml2, rel 10
baggins
baggins at pld-linux.org
Sun May 11 14:45:12 CEST 2025
commit 585ebb62e0af4e26a09f98dd7b36dc4d56dcc9ee
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun May 11 15:59:59 2025 +0200
- fix building with numpy2 and fresh libxml2, rel 10
lal-xml-libxml2.patch | 10 ++++++++++
lal-xml.spec | 4 +++-
numpy2.patch | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+), 1 deletion(-)
---
diff --git a/lal-xml.spec b/lal-xml.spec
index 4aff135..f5e08fb 100644
--- a/lal-xml.spec
+++ b/lal-xml.spec
@@ -2,7 +2,7 @@ Summary: LAL wrapping of the XML library
Summary(pl.UTF-8): Obudowanie LAL do biblioteki XML
Name: lal-xml
Version: 1.2.4
-Release: 9
+Release: 10
License: GPL v2+
Group: Libraries
Source0: http://software.igwn.org/lscsoft/source/lalsuite/lalxml-%{version}.tar.xz
@@ -10,6 +10,7 @@ Source0: http://software.igwn.org/lscsoft/source/lalsuite/lalxml-%{version}.tar.
Patch0: %{name}-env.patch
Patch1: %{name}-octave.patch
Patch2: %{name}-libxml2.patch
+Patch3: numpy2.patch
URL: https://wiki.ligo.org/Computing/LALSuite
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1:1.11
@@ -98,6 +99,7 @@ Wiązania Pythona do biblioteki LAL XML.
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
+%patch -P 3 -p1
%build
%{__libtoolize}
diff --git a/lal-xml-libxml2.patch b/lal-xml-libxml2.patch
index a4a818d..54b06bc 100644
--- a/lal-xml-libxml2.patch
+++ b/lal-xml-libxml2.patch
@@ -8,3 +8,13 @@
#include <libxml/xmlschemas.h>
#include <lal/LALStdio.h>
+--- lalxml-1.2.4/gnuscripts/lalsuite_gccflags.m4~ 2016-09-13 16:51:01.000000000 +0200
++++ lalxml-1.2.4/gnuscripts/lalsuite_gccflags.m4 2025-05-11 15:58:41.169998418 +0200
+@@ -30,7 +30,6 @@
+ -g3
+ -Wall
+ -W
+- -Werror
+ -Wmissing-prototypes
+ -Wstrict-prototypes
+ -Wshadow
diff --git a/numpy2.patch b/numpy2.patch
new file mode 100644
index 0000000..da6f623
--- /dev/null
+++ b/numpy2.patch
@@ -0,0 +1,35 @@
+--- lalxml-1.2.4/gnuscripts/lalsuite_swig.m4~ 2025-05-11 15:52:07.000000000 +0200
++++ lalxml-1.2.4/gnuscripts/lalsuite_swig.m4 2025-05-11 15:54:09.069998383 +0200
+@@ -436,14 +436,7 @@
+
+ # determine Python preprocessor flags
+ AC_SUBST([SWIG_PYTHON_CPPFLAGS],[])
+- python_out=[`cat <<EOD | ${PYTHON} - 2>/dev/null
+-import sys
+-import distutils.sysconfig as cfg
+-import numpy.lib.utils as npyutil
+-sys.stdout.write( '-I' + cfg.get_python_inc())
+-sys.stdout.write(' -I' + cfg.get_python_inc(plat_specific=1))
+-sys.stdout.write(' -I' + npyutil.get_include())
+-EOD`]
++ python_out=[`numpy-config --cflags`]
+ AS_IF([test $? -ne 0],[
+ AC_MSG_ERROR([could not determine Python preprocessor flags])
+ ])
+@@ -459,6 +452,8 @@
+ cflags = cfg.get_config_var('CFLAGS').split()
+ cflags = [f for f in cflags if f != '-DNDEBUG']
+ sys.stdout.write(" ".join(cflags))
++sys.stdout.write(' -I' + cfg.get_python_inc())
++sys.stdout.write(' -I' + cfg.get_python_inc(plat_specific=1))
+ EOD`]
+ AS_IF([test $? -ne 0],[
+ AC_MSG_ERROR([could not determine Python compiler flags])
+@@ -502,6 +502,7 @@
+ # check for Python and NumPy headers
+ LALSUITE_PUSH_UVARS
+ CPPFLAGS="${SWIG_PYTHON_CPPFLAGS}"
++ CFLAGS="${SWIG_PYTHON_CFLAGS}"
+ AC_CHECK_HEADER([Python.h],[],[
+ AC_MSG_ERROR([could not find the header "Python.h"])
+ ],[
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lal-xml.git/commitdiff/585ebb62e0af4e26a09f98dd7b36dc4d56dcc9ee
More information about the pld-cvs-commit
mailing list