Skip to content
Snippets Groups Projects
Commit fb9dfb10 authored by Zach DeCook's avatar Zach DeCook :keyboard: Committed by Kevin Daudt
Browse files

community/hyprcursor: upgrade to 0.1.10 and move from testing

parent 26f80dcc
No related branches found
No related tags found
1 merge request!73256community/hyprland: upgrade to 0.44.1 and move from testing
# Contributor: Zach DeCook <zachdecook@librem.one>
# Maintainer: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprcursor
pkgver=0.1.9
pkgver=0.1.10
pkgrel=0
pkgdesc="The hyprland cursor format, library and utilities."
url="https://github.com/hyprwm/Hyprcursor"
arch="all"
license="BSD-3-Clause"
source="https://github.com/hyprwm/Hyprcursor/archive/v$pkgver/Hyprcursor-v$pkgver.tar.gz"
options="!check" # tests are broken
source="
https://github.com/hyprwm/Hyprcursor/archive/v$pkgver/Hyprcursor-v$pkgver.tar.gz
fix-tests-for-symlink.patch
"
makedepends="
cairo-dev
cmake
......@@ -17,7 +19,7 @@ makedepends="
libzip-dev
tomlplusplus-dev
"
checkdepends="adwaita-icon-theme"
checkdepends="adwaita-icon-theme xcur2png"
subpackages="$pkgname-dev $pkgname-doc $pkgname-util"
build() {
......@@ -32,7 +34,9 @@ check() {
cd build
# Create a hyprcursor, so that the tests will work
./hyprcursor-util -x /usr/share/icons/Adwaita/ -o ./
sed -i "s/name = .*/name = Adwaita/g" extracted_Adwaita/manifest.hl
# Put this in one of the paths it will search
mkdir -p ~/.local/share/icons/
./hyprcursor-util -c ./extracted_Adwaita -o ~/.local/share/icons/
# run the tests
LD_LIBRARY_PATH=./ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
......@@ -53,5 +57,6 @@ util() {
sha512sums="
39205b0ae4094cf07b19844894e4c7b4dfd2f44e8014e0db77759d880f02c21a2568705fdfae9efb11f05b97a54a9f0c2ffb57045c10a022a1b3ed2a0d2ccca8 Hyprcursor-v0.1.9.tar.gz
7ce320f50af19e73e77dabef4840d6e8e6f56b2e505ff888dc0a14413110a30c8a3bfdc9bfc0d5458c9b387dabd9b4cbe35297209feffcfc622098af49044bb4 Hyprcursor-v0.1.10.tar.gz
c605ebdf867c639a9a55926cf78c82be77b5247c3abc6171259e7bc948dd063a5d60ca77832df6d31487b7f4dc041932fef535ccfe62d7b6e57d5431b1124427 fix-tests-for-symlink.patch
"
commit d60e1e01e6e6633ef1c87148b9137cc1dd39263d
Author: Vaxry <vaxry@vaxry.net>
Date: Tue Oct 1 23:26:44 2024 +0100
tests: fixup C test override checking
diff --git a/tests/c_test.c b/tests/c_test.c
index 7561fd0..9b975b9 100644
--- a/tests/c_test.c
+++ b/tests/c_test.c
@@ -27,11 +27,22 @@ int main(int argc, char** argv) {
}
hyprcursor_cursor_raw_shape_data* shapeData = hyprcursor_get_raw_shape_data(mgr, "left_ptr");
- if (!shapeData || shapeData->len <= 0) {
+ if (!shapeData) {
printf("failed querying left_ptr\n");
return 1;
}
+ if (shapeData->overridenBy) {
+ hyprcursor_cursor_raw_shape_data* ov = hyprcursor_get_raw_shape_data(mgr, shapeData->overridenBy);
+ hyprcursor_raw_shape_data_free(shapeData);
+ shapeData = ov;
+ }
+
+ if (!shapeData || shapeData->len <= 0) {
+ printf("left_ptr has no images\n");
+ return 1;
+ }
+
printf("left_ptr images: %d\n", shapeData->len);
for (size_t i = 0; i < shapeData->len; ++i) {
commit 5729b9733dd73b0dc1896179e51b6b0c2d92f44c
Author: Vaxry <vaxry@vaxry.net>
Date: Tue Oct 1 23:26:36 2024 +0100
core: fixup overridenBy reporting
diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp
index f7fb82c..544a506 100644
--- a/libhyprcursor/hyprcursor.cpp
+++ b/libhyprcursor/hyprcursor.cpp
@@ -399,11 +399,14 @@ SCursorRawShapeDataC* CHyprcursorManager::getRawShapeDataC(const char* shape_) {
for (auto& shape : impl->theme.shapes) {
// if it's overridden just return the override
- if (const auto IT = std::find(shape->overrides.begin(), shape->overrides.end(), SHAPE); IT != shape->overrides.end()) {
- data->overridenBy = strdup(IT->c_str());
+ if (const auto IT = std::find_if(shape->overrides.begin(), shape->overrides.end(), [&](const auto& e) { return e == SHAPE && SHAPE != shape->directory; });
+ IT != shape->overrides.end()) {
+ data->overridenBy = strdup(shape->directory.c_str());
return data;
}
+ }
+ for (auto& shape : impl->theme.shapes) {
if (shape->directory != SHAPE)
continue;
commit 34efe230c2ac402faf4a15ca1d048a435e359358
Author: Jan Beich <jbeich@FreeBSD.org>
Date: Tue Oct 1 09:08:26 2024 +0000
core: add missing header for libc++ after 5a95d8512b3e (#66)
libhyprcursor/hyprcursor.cpp:23:27: error: implicit instantiation of undefined template 'std::basic_stringstream<char>'
23 | std::stringstream envXdgStream(envXdgData);
| ^
/usr/include/c++/v1/__fwd/sstream.h:29:28: note: template is declared here
29 | class _LIBCPP_TEMPLATE_VIS basic_stringstream;
| ^
diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp
index 3a83a26..f7fb82c 100644
--- a/libhyprcursor/hyprcursor.cpp
+++ b/libhyprcursor/hyprcursor.cpp
@@ -2,6 +2,7 @@
#include "internalSharedTypes.hpp"
#include "internalDefines.hpp"
#include <array>
+#include <sstream>
#include <cstdio>
#include <filesystem>
#include <zip.h>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment