public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/moose] rawhide: feat: unbundle fmt, note other bundled libs
@ 2026-08-07 10:26 Ankur Sinha
  0 siblings, 0 replies; only message in thread
From: Ankur Sinha @ 2026-08-07 10:26 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/moose
Branch : rawhide
Commit : b3d1c368ac6a5d24fd8d2e1e541315c77dcb4104
Author : Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
Date   : 2026-08-07T11:25:01+01:00
Stats  : +147/-4 in 7 file(s)
URL    : https://src.fedoraproject.org/rpms/moose/c/b3d1c368ac6a5d24fd8d2e1e541315c77dcb4104?branch=rawhide

Log:
feat: unbundle fmt, note other bundled libs

---
diff --git a/0001-Replace-python-with-python3.patch b/0001-Replace-python-with-python3.patch
index cc8b460..95ae945 100644
--- a/0001-Replace-python-with-python3.patch
+++ b/0001-Replace-python-with-python3.patch
@@ -1,7 +1,7 @@
 From 3af51844e5d3005ab6aa64d5701b5fac50fa6e4e Mon Sep 17 00:00:00 2001
 From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
 Date: Wed, 5 Aug 2026 12:52:21 +0100
-Subject: [PATCH 1/4] Replace python with python3
+Subject: [PATCH 1/6] Replace python with python3
 
 ---
  meson.build          | 2 +-

diff --git a/0002-Use-system-nanobind.patch b/0002-Use-system-nanobind.patch
index 9d4fc27..aeddf4c 100644
--- a/0002-Use-system-nanobind.patch
+++ b/0002-Use-system-nanobind.patch
@@ -1,7 +1,7 @@
 From b80221b69c325f22431cc7ca6d3114c02bdddeca Mon Sep 17 00:00:00 2001
 From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
 Date: Wed, 5 Aug 2026 12:54:09 +0100
-Subject: [PATCH 2/4] Use system nanobind
+Subject: [PATCH 2/6] Use system nanobind
 
 ---
  meson.build         |  2 --

diff --git a/0003-Make-neuroml-optional-dependency.patch b/0003-Make-neuroml-optional-dependency.patch
index 6e05c74..d10f0fb 100644
--- a/0003-Make-neuroml-optional-dependency.patch
+++ b/0003-Make-neuroml-optional-dependency.patch
@@ -1,7 +1,7 @@
 From f526b202010483ee5e0ca0ca5deef205bcab1e26 Mon Sep 17 00:00:00 2001
 From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
 Date: Wed, 5 Aug 2026 13:36:35 +0100
-Subject: [PATCH 3/4] Make neuroml optional dependency
+Subject: [PATCH 3/6] Make neuroml optional dependency
 
 It's not available in Fedora, and is an optional dependency required
 only when importing/exporting NeuroML files. Users can install these in

diff --git a/0004-Remove-pybind11-check-in-test.patch b/0004-Remove-pybind11-check-in-test.patch
index a551d41..bfc7d6a 100644
--- a/0004-Remove-pybind11-check-in-test.patch
+++ b/0004-Remove-pybind11-check-in-test.patch
@@ -1,7 +1,7 @@
 From 03148ad7b50af510177d1555dd89299a03f2b645 Mon Sep 17 00:00:00 2001
 From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
 Date: Wed, 5 Aug 2026 14:14:32 +0100
-Subject: [PATCH 4/4] Remove pybind11 check in test
+Subject: [PATCH 4/6] Remove pybind11 check in test
 
 Looks like a stale guard given that upstream has switched to nanobind.
 ---

diff --git a/0005-Use-system-fmt.patch b/0005-Use-system-fmt.patch
new file mode 100644
index 0000000..247e510
--- /dev/null
+++ b/0005-Use-system-fmt.patch
@@ -0,0 +1,106 @@
+From a3465165f8b7a8e4cbba79bfb3f96c17a8e91a15 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
+Date: Wed, 5 Aug 2026 15:50:51 +0100
+Subject: [PATCH 5/6] Use system fmt
+
+---
+ builtins/meson.build | 5 ++---
+ meson.build          | 7 ++++---
+ pymoose/meson.build  | 1 +
+ utility/meson.build  | 2 +-
+ utility/strutil.h    | 2 +-
+ 5 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/builtins/meson.build b/builtins/meson.build
+index 31a4e18bb..ac9602f28 100644
+--- a/builtins/meson.build
++++ b/builtins/meson.build
+@@ -30,11 +30,10 @@ builtins_src = ['Arith.cpp',
+ if host_machine.system() != 'windows'
+   builtins_src += files(['SocketStreamer.cpp'])
+ endif
+-include_directories = ['../external/fmt/include']
+ 
+ if use_hdf5
+-  builtins_lib = static_library('builtins', builtins_src, include_directories: include_directories, dependencies: hdf5_dep)
++  builtins_lib = static_library('builtins', builtins_src, dependencies: hdf5_dep)
+ else
+-  builtins_lib = static_library('builtins', builtins_src, include_directories: include_directories)
++  builtins_lib = static_library('builtins', builtins_src)
+ endif
+ 
+diff --git a/meson.build b/meson.build
+index 381052214..27c2ebe5c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -209,6 +209,9 @@ endif
+ # GSL is required
+ gsl_dep = dependency('gsl', version: '>=1.16')
+ 
++# Use the system fmt library instead of the bundled copy in external/fmt
++fmt_dep = dependency('fmt')
++
+ 
+ # libsoda = static_library('lsoda', 'external/libsoda/LSODA.cpp',
+ #                           include_directories: 'external/libsoda',
+@@ -217,7 +220,6 @@ gsl_dep = dependency('gsl', version: '>=1.16')
+ #                                  link_with: libsoda)
+ 
+ subdir(join_paths('external', 'libsoda'))
+-subdir(join_paths('external', 'fmt'))
+ if is_msvc
+   subdir(join_paths('external', 'getopt'))
+ endif
+@@ -246,7 +248,6 @@ subdir('utility')
+ 
+ sublibs = [
+     lsoda_lib,
+-    fmt_lib,
+     basecode_lib,
+     biophysics_lib,
+     builtins_lib,
+@@ -300,7 +301,7 @@ endif
+ pymoose = py.extension_module('_moose',
+                               link_whole: sublibs,
+                               link_args: link_args,
+-                              dependencies: [gsl_dep, mpi_dep, hdf5_dep], #, libsoda_dep],
++                              dependencies: [gsl_dep, mpi_dep, hdf5_dep, fmt_dep], #, libsoda_dep],
+                               include_directories: include_dirs,
+                               install: true,
+                               subdir: 'moose')
+diff --git a/pymoose/meson.build b/pymoose/meson.build
+index dcc169de5..f8a0df604 100644
+--- a/pymoose/meson.build
++++ b/pymoose/meson.build
+@@ -32,4 +32,5 @@ inc_dirs = [
+ 
+ pymoose_lib = static_library('pymoose', pymoose_src + nanobind_src,
+   include_directories: inc_dirs,
++  dependencies: fmt_dep,
+   cpp_args: '-fno-strict-aliasing')
+diff --git a/utility/meson.build b/utility/meson.build
+index 6f05015b9..78dc173d5 100644
+--- a/utility/meson.build
++++ b/utility/meson.build
+@@ -11,4 +11,4 @@ utility_src = ['strutil.cpp',
+                'cnpy.cpp'
+                ]
+ 
+-utility_lib = static_library('utility', utility_src)
++utility_lib = static_library('utility', utility_src, dependencies: fmt_dep)
+diff --git a/utility/strutil.h b/utility/strutil.h
+index 626b99999..2ab0ee19c 100644
+--- a/utility/strutil.h
++++ b/utility/strutil.h
+@@ -8,7 +8,7 @@
+ #ifndef _STRINGUTIL_H
+ #define _STRINGUTIL_H
+ 
+-#include "../external/fmt/include/fmt/core.h"
++#include <fmt/format.h>
+ 
+ #include <string>
+ #include <sstream>
+-- 
+2.55.0
+

diff --git a/0006-Add-missing-includes.patch b/0006-Add-missing-includes.patch
new file mode 100644
index 0000000..25537f2
--- /dev/null
+++ b/0006-Add-missing-includes.patch
@@ -0,0 +1,26 @@
+From 2d91177ade25a3629f2c25dd36861167fe6c0c98 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
+Date: Wed, 5 Aug 2026 15:59:27 +0100
+Subject: [PATCH 6/6] Add missing includes
+
+To be sent upstream
+---
+ pymoose/Finfo.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pymoose/Finfo.cpp b/pymoose/Finfo.cpp
+index 199dd8759..d3334ed29 100644
+--- a/pymoose/Finfo.cpp
++++ b/pymoose/Finfo.cpp
+@@ -9,6 +9,8 @@
+ //
+ // =====================================================================================
+ 
++#include <functional>
++
+ #include "../basecode/header.h"
+ #include "../builtins/Variable.h"
+ #include "../utility/print_function.hpp"
+-- 
+2.55.0
+

diff --git a/moose.spec b/moose.spec
index c2fae2f..ff33f60 100644
--- a/moose.spec
+++ b/moose.spec
@@ -18,12 +18,15 @@ Patch:          0001-Replace-python-with-python3.patch
 Patch:          0002-Use-system-nanobind.patch
 Patch:          0003-Make-neuroml-optional-dependency.patch
 Patch:          0004-Remove-pybind11-check-in-test.patch
+Patch:          0005-Use-system-fmt.patch
+Patch:          0006-Add-missing-includes.patch
 
 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
 
 ExcludeArch: s390x
 
+BuildRequires:  fmt-devel
 BuildRequires:  gcc-c++
 BuildRequires:  git-core
 BuildRequires:  gsl-devel
@@ -55,6 +58,12 @@ deprecated. MOOSE numerical code is written in C++.
 %package -n python3-%{name}
 Summary:  %{summary}
 
+# libsoda and exprtk are bundled in the compiled module; they are not
+# packaged in Fedora and upstream has no mechanism to build against system
+# versions.
+Provides: bundled(libsoda)
+Provides: bundled(exprtk)
+
 Requires: python3-libsbml
 Requires: python3-matplotlib-qt5
 Requires: %{py3_dist lxml}
@@ -68,6 +77,8 @@ This package contains the %{summary}.
 %prep
 %autosetup -n moose-core-%{version} -S git
 rm -f python/rdesigneur/.gitignore
+# remove unused bundled bits
+rm -rf external/fmt external/tinyexpr external/getopt external/boost-numeric-bindings
 sed -i '/^#!/d' python/moose/channels/build_icg_meta.py python/moose/channels/update_citations_icg.py
 
 %conf

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 10:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 10:26 [rpms/moose] rawhide: feat: unbundle fmt, note other bundled libs Ankur Sinha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox