From 7c2c86b62c3f1a26a7c93e42f8bd06d5b25be80c Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Wed, 31 Dec 2025 10:59:26 -0800 Subject: [PATCH] add: clay (#8783) (#8784) * add: clay * formatting --------- (cherry picked from commit 0f6ccf1a578a834b6f18d879e928921a580f86ce) Signed-off-by: Owen-sz Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/lib/clay/anda.hcl | 5 +++++ anda/lib/clay/clay.spec | 39 +++++++++++++++++++++++++++++++++++++++ anda/lib/clay/update.rhai | 1 + 3 files changed, 45 insertions(+) create mode 100644 anda/lib/clay/anda.hcl create mode 100644 anda/lib/clay/clay.spec create mode 100644 anda/lib/clay/update.rhai diff --git a/anda/lib/clay/anda.hcl b/anda/lib/clay/anda.hcl new file mode 100644 index 0000000000..47b53d5a90 --- /dev/null +++ b/anda/lib/clay/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "clay.spec" + } +} diff --git a/anda/lib/clay/clay.spec b/anda/lib/clay/clay.spec new file mode 100644 index 0000000000..1792100f7a --- /dev/null +++ b/anda/lib/clay/clay.spec @@ -0,0 +1,39 @@ +%global debug_package %{nil} + +Name: clay-devel +Version: 0.14 +Release: 1%?dist +License: Zlib +URL: https://www.nicbarker.com/clay +Source: https://github.com/nicbarker/clay/archive/refs/tags/v%version.tar.gz +Summary: High performance UI layout library in C +Packager: Owen Zimmerman + +%description +Clay (short for C Layout) is a high performance 2D UI layout library. +Major Features: + +- Microsecond layout performance +- Flex-box like layout model for complex, responsive layouts including text wrapping, scrolling containers and aspect ratio scaling +- Single ~4k LOC clay.h file with zero dependencies (including no standard library) +- Wasm support: compile with clang to a 15kb uncompressed .wasm file for use in the browser +- Static arena based memory use with no malloc / free, and low total memory overhead (e.g. ~3.5mb for 8192 layout elements). +- React-like nested declarative syntax +- Renderer agnostic: outputs a sorted list of rendering primitives that can be easily composited in any 3D engine, and even compiled to HTML (examples provided) + +%prep +%autosetup -n clay-%{version} + +%build + +%install +install -Dm644 clay.h %{buildroot}%{_includedir}/clay.h + +%files +%license LICENSE.md +%doc README.md +%{_includedir}/clay.h + +%changelog +* Wed Dec 31 2025 Owen Zimmerman +- Initial commit diff --git a/anda/lib/clay/update.rhai b/anda/lib/clay/update.rhai new file mode 100644 index 0000000000..a3bcaeae36 --- /dev/null +++ b/anda/lib/clay/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("nicbarker/clay"));