From 37399a775779cf09842cc00aab556aef9a94d9fe Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 2 Jan 2026 20:36:12 -0800 Subject: [PATCH] add: uxn (debug) (#8809) (#8879) * prog add: uxn virtual machine stable * fix doc: summary * doc: update comment about sr.ht versioning * fix: enable debug, remove uneeded dependancies * fix: disable debug package to avoid unoptimized debug * feat: enable debug, remove build script * minor fix: switch c compiler to fedora macro * prog: add build ld flags --------- (cherry picked from commit 2ef06353e9d919479ef1c6849304d0c785987e47) Co-authored-by: arbor Co-authored-by: metcya <134973769+metcya@users.noreply.github.com> --- anda/misc/uxn/stable/anda.hcl | 5 ++++ anda/misc/uxn/stable/uxn.spec | 48 +++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 anda/misc/uxn/stable/anda.hcl create mode 100644 anda/misc/uxn/stable/uxn.spec diff --git a/anda/misc/uxn/stable/anda.hcl b/anda/misc/uxn/stable/anda.hcl new file mode 100644 index 0000000000..329e61e67c --- /dev/null +++ b/anda/misc/uxn/stable/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "uxn.spec" + } +} diff --git a/anda/misc/uxn/stable/uxn.spec b/anda/misc/uxn/stable/uxn.spec new file mode 100644 index 0000000000..f6e4df5e8f --- /dev/null +++ b/anda/misc/uxn/stable/uxn.spec @@ -0,0 +1,48 @@ +# uxn stable has no update script because this version +# is permanently frozen. A nightly will be added once the +# sourcehut versioning script is done. + +Name: uxn +Version: 1.0 +Release: 1%?dist +Summary: An emulator for the Varvara virtual machine +URL: https://100r.ca/site/%{name}.html +Source0: https://git.sr.ht/~rabbits/%{name}/archive/%{version}.tar.gz +License: MIT +BuildRequires: SDL2-devel gcc + +Packager: arbormoss + +%description +%summary. + +%prep +%autosetup -n %name-%version + +%build +# credit: based on the build script for uxn +# https://git.sr.ht/~rabbits/uxn/tree/1.0/item/build.sh + +mkdir -p bin +UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)" +CFLAGS="%{build_cflags}" + +%{__cc} ${CFLAGS} src/%{name}asm.c %{build_ldflags} -o bin/%{name}asm +%{__cc} ${CFLAGS} src/%{name}.c src/devices/system.c src/devices/console.c src/devices/file.c src/devices/datetime.c src/devices/mouse.c src/devices/controller.c src/devices/screen.c src/devices/audio.c src/%{name}emu.c ${UXNEMU_LDFLAGS} ${FILE_LDFLAGS} %{build_ldflags} -o bin/%{name}emu +%{__cc} ${CFLAGS} src/%{name}.c src/devices/system.c src/devices/console.c src/devices/file.c src/devices/datetime.c src/%{name}cli.c ${FILE_LDFLAGS} %{build_ldflags} -o bin/%{name}cli + +%install +install -Dm755 bin/%{name}asm %{buildroot}%{_bindir}/%{name}asm +install -Dm755 bin/%{name}cli %{buildroot}%{_bindir}/%{name}cli +install -Dm755 bin/%{name}emu %{buildroot}%{_bindir}/%{name}emu + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{name}asm +%{_bindir}/%{name}cli +%{_bindir}/%{name}emu + +%changelog +* Sun Dec 21 2025 arbormoss +- Intial Commit