public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/FAudio] rawhide: csharp: only build on mono_arches, correct requires
@ 2026-11-20  2:12 Zephyr Lykos
  0 siblings, 0 replies; only message in thread
From: Zephyr Lykos @ 2026-11-20  2:12 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/FAudio
Branch : rawhide
Commit : 807e288d69db9166607785de88f36c5a0b2b5ac6
Author : Zephyr Lykos <git@mochaa.ws>
Date   : 2026-11-20T06:20:28+08:00
Stats  : +28/-3 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/FAudio/c/807e288d69db9166607785de88f36c5a0b2b5ac6?branch=rawhide

Log:
csharp: only build on mono_arches, correct requires

---
diff --git a/FAudio.spec b/FAudio.spec
index a32f0d3..90ff8d7 100644
--- a/FAudio.spec
+++ b/FAudio.spec
@@ -1,6 +1,9 @@
+# TODO: extract to mono-srpm-macros?
+%global mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} alpha s390x ppc ppc64 ppc64le
+
 Name:     FAudio
 Version:  26.11
-Release:  1%{?dist}
+Release:  2%{?dist}
 Summary:  FNA is a reimplementation of the Microsoft XNA Game Studio 4.0 Refresh libraries
 
 License:  zlib
@@ -12,8 +15,10 @@ BuildRequires: ninja-build
 BuildRequires: gcc
 BuildRequires: gcc-c++
 
+%ifarch %{mono_arches}
 BuildRequires: mono-core
 BuildRequires: mono-devel
+%endif
 
 BuildRequires: SDL3-devel
 
@@ -40,17 +45,25 @@ This is FAudio, an XAudio reimplementation that focuses solely on developing
 fully accurate DirectX Audio runtime libraries for the FNA project, including
 XAudio2, X3DAudio, XAPO, and XACT3.
 
-
+%ifarch %{mono_arches}
 %package csharp
 Summary:   %{summary}
 BuildArch: noarch
-Requires:  (libFAudio%{?_isa} = %{version}-%{release} if mono-core)
+%{lua:
+  local mono_arches = rpm.expand("%{mono_arches}")
+  local version = rpm.expand("%{version}")
+  local release = rpm.expand("%{release}")
+  for arch in string.gmatch(mono_arches, "[^ ]+") do
+    print("Requires: (libFAudio." .. arch .. " = " .. version .. "-" .. release .. " if mono-core." .. arch .. ")\n")
+  end
+}
 Requires:  (mingw32-%{name} = %{version}-%{release} if mingw32-wine-mono)
 Requires:  (mingw64-%{name} = %{version}-%{release} if mingw64-wine-mono)
 
 
 %description csharp
 This is FAudio#, a C# wrapper for FAudio, an XAudio reimplementation for FNA.
+%endif
 
 %package -n libFAudio-devel
 Summary:  Development files for the FAudio library
@@ -90,10 +103,12 @@ BuildArch:      noarch
 %cmake -GNinja
 %cmake_build
 
+%ifarch %{mono_arches}
 cp csharp/app.config %{_vpath_builddir}/FAudio-CS.dll.config
 # We don't have a bundled key, so borrow mono's.
 # This is intended usage, read rpms/mono's changelog for more info.
 mcs -unsafe -debug -keyfile:/etc/pki/mono/mono.snk -out:%{_vpath_builddir}/FAudio-CS.dll -target:library csharp/FAudio.cs
+%endif
 
 %mingw_cmake -GNinja
 %mingw_ninja
@@ -102,6 +117,7 @@ mcs -unsafe -debug -keyfile:/etc/pki/mono/mono.snk -out:%{_vpath_builddir}/FAudi
 %install
 %cmake_install
 
+%ifarch %{mono_arches}
 gacutil -i %{_vpath_builddir}/FAudio-CS.dll -package %{name} -root %{buildroot}%{_prefix}/lib
 mkdir -p %{buildroot}%{_datadir}/pkgconfig/
 cat <<'EOF' > %{buildroot}%{_datadir}/pkgconfig/FAudio-CS.pc
@@ -114,15 +130,18 @@ Description: Mono bindings for FAudio, an XAudio reimplementation for FNA.
 Version: %{version}
 Libs: -r:${libdir}/mono/FAudio/FAudio-CS.dll
 EOF
+%endif
 
 %mingw_ninja_install
 %mingw_debug_install_post
 
 
 %check
+%ifarch %{mono_arches}
 pushd %{_vpath_builddir}
 mono-shlib-cop FAudio-CS.dll
 popd
+%endif
 
 
 %files -n libFAudio
@@ -145,11 +164,13 @@ popd
 %{_includedir}/FAudioFX.h
 
 
+%ifarch %{mono_arches}
 %files csharp
 %license LICENSE
 %{_monodir}/%{name}/
 %{_monogacdir}/FAudio-CS/
 %{_datadir}/pkgconfig/FAudio-CS.pc
+%endif
 
 
 %files -n mingw32-%{name}
@@ -185,6 +206,10 @@ popd
 
 
 %changelog
+* Thu Nov 19 2026 Zephyr Lykos <fedora@mochaa.ws> - 26.11-2
+- conditionally build FAudio-CS
+- depend on the correct native lib for corresponding mono-core
+
 * Tue Nov 17 2026 Zephyr Lykos <fedora@mochaa.ws> - 26.11-1
 - new version
 

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

only message in thread, other threads:[~2026-11-20  2:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-20  2:12 [rpms/FAudio] rawhide: csharp: only build on mono_arches, correct requires Zephyr Lykos

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