public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Zephyr Lykos <git@mochaa.ws>
To: git-commits@fedoraproject.org
Subject: [rpms/FAudio] rawhide: csharp: only build on mono_arches, correct requires
Date: Fri, 20 Nov 2026 02:12:04 GMT [thread overview]
Message-ID: <179514072419.1.14998693092462774048.rpms-FAudio-807e288d69db@fedoraproject.org> (raw)
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
reply other threads:[~2026-11-20 2:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179514072419.1.14998693092462774048.rpms-FAudio-807e288d69db@fedoraproject.org \
--to=git@mochaa.ws \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox