New package: hyprutils-0.7.1

This commit is contained in:
ii8 2025-06-12 12:23:52 +01:00 committed by Duncan Overbruck
parent 776a0411c2
commit 4d25a59fd7
3 changed files with 50 additions and 0 deletions

View file

@ -4568,3 +4568,4 @@ libqlementine.so.1 qlementine-1.2.2_1
libkwin.so.6 kwin-6.3.3.1_1
libkwin-x11.so.6 kwin-x11-6.4.3_1
libdatovka.so.8 libdatovka-0.7.0_1
libhyprutils.so.6 hyprutils-0.7.1_1

View file

@ -0,0 +1,32 @@
From 57ab2a867d8b554ad89f29060c15efd11631db91 Mon Sep 17 00:00:00 2001
From: Vaxry <vaxry@vaxry.net>
Date: Fri, 13 Jun 2025 15:05:19 +0200
Subject: [PATCH] tests: fix matrix test on 32b archs
fixes #55
---
tests/math.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/math.cpp b/tests/math.cpp
index a7b8090..316a6fc 100644
--- a/tests/math.cpp
+++ b/tests/math.cpp
@@ -92,7 +92,16 @@ int main(int argc, char** argv, char** envp) {
Mat3x3 matrixBox = jeremy.projectBox(CBox{10, 10, 200, 200}, HYPRUTILS_TRANSFORM_NORMAL).translate({100, 100}).scale({1.25F, 1.5F}).transpose();
Mat3x3 expected = std::array<float, 9>{0, 0.46296296, 0, 0.3125, 0, 0, 19.84375, 36.055557, 1};
- EXPECT(matrixBox, expected);
+ // we need to do this to avoid precision errors on 32-bit archs
+ EXPECT(std::abs(expected.getMatrix().at(0) - matrixBox.getMatrix().at(0)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(1) - matrixBox.getMatrix().at(1)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(2) - matrixBox.getMatrix().at(2)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(3) - matrixBox.getMatrix().at(3)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(4) - matrixBox.getMatrix().at(4)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(5) - matrixBox.getMatrix().at(5)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(6) - matrixBox.getMatrix().at(6)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(7) - matrixBox.getMatrix().at(7)) < 0.1, true);
+ EXPECT(std::abs(expected.getMatrix().at(8) - matrixBox.getMatrix().at(8)) < 0.1, true);
}
return ret;

View file

@ -0,0 +1,17 @@
# Template file for 'hyprutils'
pkgname=hyprutils
version=0.7.1
revision=1
build_style=cmake
hostmakedepends="pkg-config"
makedepends="pixman-devel"
short_desc="Hyprland utilities library used across the ecosystem"
maintainer="ii8 <murray.calavera@protonmail.com>"
license="BSD-3-Clause"
homepage="https://github.com/hyprwm/hyprutils"
distfiles="https://github.com/hyprwm/hyprutils/archive/refs/tags/v${version}.tar.gz"
checksum=bcbf05252b392b8837eec9ba9855ff6ddab571f9795917c7139215ae4b2cf1bc
post_install() {
vlicense LICENSE
}