Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package hyprcursor for openSUSE:Factory 
checked in at 2024-12-20 23:11:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hyprcursor (Old)
 and      /work/SRC/openSUSE:Factory/.hyprcursor.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hyprcursor"

Fri Dec 20 23:11:50 2024 rev:4 rq:1232882 version:0.1.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/hyprcursor/hyprcursor.changes    2024-06-11 
18:29:10.000591326 +0200
+++ /work/SRC/openSUSE:Factory/.hyprcursor.new.1881/hyprcursor.changes  
2024-12-20 23:12:43.329671922 +0100
@@ -1,0 +2,15 @@
+Fri Dec 20 14:37:57 UTC 2024 - Michal Hrusecky <[email protected]>
+
+- Update to version 0.1.10:
+  + A standard, nice update
+  + Fixes:
+    - docs: mention timeouts to be > 0
+    - core: initialize C shape data fully
+  + Other:
+    - Add wiki to readme
+    - only alloc as much as needed when reading in cursor images
+    - Use XDG_DATA_DIRS to query themes
+    - nix: pkg: add missing dep xcur2png
+    - Correction in hotspot coordinates documentation
+
+-------------------------------------------------------------------

Old:
----
  hyprcursor-0.1.9.tar.xz

New:
----
  hyprcursor-0.1.10.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hyprcursor.spec ++++++
--- /var/tmp/diff_new_pack.5Llomb/_old  2024-12-20 23:12:43.881694686 +0100
+++ /var/tmp/diff_new_pack.5Llomb/_new  2024-12-20 23:12:43.885694851 +0100
@@ -20,7 +20,7 @@
 %define sover 0
 
 Name:           hyprcursor
-Version:        0.1.9
+Version:        0.1.10
 Release:        0
 Summary:        Library and utilities for the hyprland cursor format
 License:        BSD-3-Clause

++++++ hyprcursor-0.1.9.tar.xz -> hyprcursor-0.1.10.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/.github/workflows/ci.yaml 
new/hyprcursor-0.1.10/.github/workflows/ci.yaml
--- old/hyprcursor-0.1.9/.github/workflows/ci.yaml      2024-05-24 
20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/.github/workflows/ci.yaml     2024-09-30 
23:25:02.000000000 +0200
@@ -18,6 +18,10 @@
           pacman --noconfirm --noprogressbar -Syyu
           pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang 
cairo librsvg git libzip tomlplusplus
 
+      - name: Get hyprutils-git
+        run: |
+          git clone https://github.com/hyprwm/hyprutils && cd hyprutils && 
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -B 
build && cmake --build build --target hyprutils && cmake --install build
+
       - name: Install hyprlang
         run: |
           git clone https://github.com/hyprwm/hyprlang --recursive
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/.gitignore 
new/hyprcursor-0.1.10/.gitignore
--- old/hyprcursor-0.1.9/.gitignore     2024-05-24 20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/.gitignore    2024-09-30 23:25:02.000000000 +0200
@@ -1,2 +1,3 @@
 .vscode/
 build/
+.cache/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/CMakeLists.txt 
new/hyprcursor-0.1.10/CMakeLists.txt
--- old/hyprcursor-0.1.9/CMakeLists.txt 2024-05-24 20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/CMakeLists.txt        2024-09-30 23:25:02.000000000 
+0200
@@ -1,12 +1,14 @@
 cmake_minimum_required(VERSION 3.19)
 
-set(HYPRCURSOR_VERSION "0.1.9")
+file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
+string(STRIP ${VER_RAW} HYPRCURSOR_VERSION)
+
 add_compile_definitions(HYPRCURSOR_VERSION="${HYPRCURSOR_VERSION}")
 
-project(hyprcursor
-    VERSION ${HYPRCURSOR_VERSION}
-    DESCRIPTION "A library and toolkit for the Hyprland cursor format"
-)
+project(
+  hyprcursor
+  VERSION ${HYPRCURSOR_VERSION}
+  DESCRIPTION "A library and toolkit for the Hyprland cursor format")
 
 include(CTest)
 include(GNUInstallDirs)
@@ -20,46 +22,68 @@
 set(CMAKE_CXX_STANDARD 23)
 
 find_package(PkgConfig REQUIRED)
-pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprlang>=0.4.2 libzip cairo 
librsvg-2.0 tomlplusplus)
+pkg_check_modules(
+  deps
+  REQUIRED
+  IMPORTED_TARGET
+  hyprlang>=0.4.2
+  libzip
+  cairo
+  librsvg-2.0
+  tomlplusplus)
 
 if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
-    message(STATUS "Configuring hyprcursor in Debug")
-    add_compile_definitions(HYPRLAND_DEBUG)
+  message(STATUS "Configuring hyprcursor in Debug")
+  add_compile_definitions(HYPRLAND_DEBUG)
 else()
-    add_compile_options(-O3)
-    message(STATUS "Configuring hyprcursor in Release")
+  add_compile_options(-O3)
+  message(STATUS "Configuring hyprcursor in Release")
 endif()
 
-file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "libhyprcursor/*.cpp" 
"include/hyprcursor/hyprcursor.hpp" "include/hyprcursor/hyprcursor.h" 
"include/hyprcursor/shared.h")
+file(
+  GLOB_RECURSE
+  SRCFILES
+  CONFIGURE_DEPENDS
+  "libhyprcursor/*.cpp"
+  "include/hyprcursor/hyprcursor.hpp"
+  "include/hyprcursor/hyprcursor.h"
+  "include/hyprcursor/shared.h")
 
 add_library(hyprcursor SHARED ${SRCFILES})
-target_include_directories( hyprcursor
-    PUBLIC "./include"
-    PRIVATE "./libhyprcursor"
-)
-set_target_properties(hyprcursor PROPERTIES
-    VERSION ${hyprcursor_VERSION}
-    SOVERSION 0
-    PUBLIC_HEADER include/hyprcursor/hyprcursor.hpp 
include/hyprcursor/hyprcursor.h include/hyprcursor/shared.h
-)
+target_include_directories(
+  hyprcursor
+  PUBLIC "./include"
+  PRIVATE "./libhyprcursor")
+set_target_properties(
+  hyprcursor
+  PROPERTIES VERSION ${hyprcursor_VERSION}
+             SOVERSION 0
+             PUBLIC_HEADER include/hyprcursor/hyprcursor.hpp
+             include/hyprcursor/hyprcursor.h include/hyprcursor/shared.h)
 
 target_link_libraries(hyprcursor PkgConfig::deps)
 
-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    # for std::expected.
-    # probably evil. Arch's clang is very outdated tho...
-    target_compile_options(hyprcursor PUBLIC
-        $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++2b -D__cpp_concepts=202002L>
-        -Wno-builtin-macro-redefined)
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+  # for std::expected. probably evil. Arch's clang is very outdated tho...
+  target_compile_options(
+    hyprcursor PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++2b
+                      -D__cpp_concepts=202002L> -Wno-builtin-macro-redefined)
 endif()
 
 # hyprcursor-util
-file(GLOB_RECURSE UTILSRCFILES CONFIGURE_DEPENDS "hyprcursor-util/src/*.cpp" 
"include/hyprcursor/hyprcursor.hpp" "include/hyprcursor/hyprcursor.h" 
"include/hyprcursor/shared.h")
+file(
+  GLOB_RECURSE
+  UTILSRCFILES
+  CONFIGURE_DEPENDS
+  "hyprcursor-util/src/*.cpp"
+  "include/hyprcursor/hyprcursor.hpp"
+  "include/hyprcursor/hyprcursor.h"
+  "include/hyprcursor/shared.h")
 add_executable(hyprcursor-util ${UTILSRCFILES})
-target_include_directories(hyprcursor-util
-    PUBLIC "./include"
-    PRIVATE "./libhyprcursor" "./hyprcursor-util/src"
-)
+target_include_directories(
+  hyprcursor-util
+  PUBLIC "./include"
+  PRIVATE "./libhyprcursor" "./hyprcursor-util/src")
 target_link_libraries(hyprcursor-util PkgConfig::deps hyprcursor)
 
 # tests
@@ -67,21 +91,31 @@
 
 add_executable(hyprcursor_test1 "tests/full_rendering.cpp")
 target_link_libraries(hyprcursor_test1 PRIVATE hyprcursor)
-add_test(NAME "Test libhyprcursor in C++ (full rendering)" WORKING_DIRECTORY 
${CMAKE_SOURCE_DIR}/tests COMMAND hyprcursor_test1)
+add_test(
+  NAME "Test libhyprcursor in C++ (full rendering)"
+  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
+  COMMAND hyprcursor_test1)
 add_dependencies(tests hyprcursor_test1)
 
 add_executable(hyprcursor_test2 "tests/only_metadata.cpp")
 target_link_libraries(hyprcursor_test2 PRIVATE hyprcursor)
-add_test(NAME "Test libhyprcursor in C++ (only metadata)" WORKING_DIRECTORY 
${CMAKE_SOURCE_DIR}/tests COMMAND hyprcursor_test2)
+add_test(
+  NAME "Test libhyprcursor in C++ (only metadata)"
+  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
+  COMMAND hyprcursor_test2)
 add_dependencies(tests hyprcursor_test2)
 
 add_executable(hyprcursor_test_c "tests/c_test.c")
 target_link_libraries(hyprcursor_test_c PRIVATE hyprcursor)
-add_test(NAME "Test libhyprcursor in C" WORKING_DIRECTORY 
${CMAKE_SOURCE_DIR}/tests COMMAND hyprcursor_test_c)
+add_test(
+  NAME "Test libhyprcursor in C"
+  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
+  COMMAND hyprcursor_test_c)
 add_dependencies(tests hyprcursor_test_c)
 
 # Installation
 install(TARGETS hyprcursor)
 install(TARGETS hyprcursor-util)
 install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc DESTINATION 
${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc
+        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/README.md 
new/hyprcursor-0.1.10/README.md
--- old/hyprcursor-0.1.9/README.md      2024-05-24 20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/README.md     2024-09-30 23:25:02.000000000 +0200
@@ -16,6 +16,11 @@
  - Support for SVG cursors
  - Way more space-efficient. As an example, Bibata-XCursor is 44.1MB, while 
it's 6.6MB in hyprcursor.
 
+## Documentation
+See the [wiki here](https://wiki.hyprland.org/Hypr-Ecosystem/hyprcursor/)
+check out [docs/](./docs)
+and [standards](https://standards.hyprland.org/hyprcursor)
+
 ## Tools
 
 ### hyprcursor-util
@@ -32,10 +37,6 @@
 
 For both C and C++, see `tests/`.
 
-## Docs
-
-See `docs/`.
-
 ## TODO
 
 Library:
@@ -53,6 +54,7 @@
  - cairo
  - libzip
  - librsvg
+ - tomlplusplus
 
 ### Build
 ```sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/VERSION 
new/hyprcursor-0.1.10/VERSION
--- old/hyprcursor-0.1.9/VERSION        1970-01-01 01:00:00.000000000 +0100
+++ new/hyprcursor-0.1.10/VERSION       2024-09-30 23:25:02.000000000 +0200
@@ -0,0 +1 @@
+0.1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/docs/MAKING_THEMES.md 
new/hyprcursor-0.1.10/docs/MAKING_THEMES.md
--- old/hyprcursor-0.1.9/docs/MAKING_THEMES.md  2024-05-24 20:46:51.000000000 
+0200
+++ new/hyprcursor-0.1.10/docs/MAKING_THEMES.md 2024-09-30 23:25:02.000000000 
+0200
@@ -49,7 +49,7 @@
 resize_algorithm = bilinear
 
 # "hotspot" is where in your cursor the actual "click point" should be.
-# this is in absolute coordinates. x+ is east, y+ is north.
+# this is in absolute coordinates. x+ is east, y+ is south.
 # the pixel coordinates of the hotspot at size are rounded to the nearest:
 # (round(size * hotspot_x), round(size * hotspot_y))
 hotspot_x = 0.0 # this goes 0 - 1
@@ -71,6 +71,7 @@
 # define_size = 64, anim2.png, 500
 # define_size = 64, anim3.png, 500
 # define_size = 64, anim4.png, 500
+# Make sure the timeout is > 0, as otherwise the consumer might ignore your 
timeouts for being invalid.
 ```
 
 Supported cursor image types are png and svg.
@@ -101,4 +102,4 @@
 define_size = '24,image1.png,200;24,image2.png,200;32,image3.png,200'
 ```
 
-You can put spaces around the semicolons if you prefer to.
\ No newline at end of file
+You can put spaces around the semicolons if you prefer to.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/flake.lock 
new/hyprcursor-0.1.10/flake.lock
--- old/hyprcursor-0.1.9/flake.lock     2024-05-24 20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/flake.lock    2024-09-30 23:25:02.000000000 +0200
@@ -2,6 +2,7 @@
   "nodes": {
     "hyprlang": {
       "inputs": {
+        "hyprutils": "hyprutils",
         "nixpkgs": [
           "nixpkgs"
         ],
@@ -10,11 +11,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1713121246,
-        "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=",
+        "lastModified": 1721324361,
+        "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
         "owner": "hyprwm",
         "repo": "hyprlang",
-        "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706",
+        "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
         "type": "github"
       },
       "original": {
@@ -23,13 +24,38 @@
         "type": "github"
       }
     },
+    "hyprutils": {
+      "inputs": {
+        "nixpkgs": [
+          "hyprlang",
+          "nixpkgs"
+        ],
+        "systems": [
+          "hyprlang",
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1721324102,
+        "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=",
+        "owner": "hyprwm",
+        "repo": "hyprutils",
+        "rev": "962582a090bc233c4de9d9897f46794280288989",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hyprwm",
+        "repo": "hyprutils",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1712963716,
-        "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
+        "lastModified": 1721138476,
+        "narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
+        "rev": "ad0b5eed1b6031efaed382844806550c3dcb4206",
         "type": "github"
       },
       "original": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/libhyprcursor/VarList.cpp 
new/hyprcursor-0.1.10/libhyprcursor/VarList.cpp
--- old/hyprcursor-0.1.9/libhyprcursor/VarList.cpp      2024-05-24 
20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/libhyprcursor/VarList.cpp     2024-09-30 
23:25:02.000000000 +0200
@@ -28,8 +28,7 @@
     std::string args{in};
     size_t      idx = 0;
     size_t      pos = 0;
-    std::ranges::replace_if(
-        args, [&](const char& c) { return delim == 's' ? std::isspace(c) : c 
== delim; }, 0);
+    std::ranges::replace_if(args, [&](const char& c) { return delim == 's' ? 
std::isspace(c) : c == delim; }, 0);
 
     for (const auto& s : args | std::views::split(0)) {
         if (removeEmpty && s.empty())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/libhyprcursor/hyprcursor.cpp 
new/hyprcursor-0.1.10/libhyprcursor/hyprcursor.cpp
--- old/hyprcursor-0.1.9/libhyprcursor/hyprcursor.cpp   2024-05-24 
20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/libhyprcursor/hyprcursor.cpp  2024-09-30 
23:25:02.000000000 +0200
@@ -2,6 +2,7 @@
 #include "internalSharedTypes.hpp"
 #include "internalDefines.hpp"
 #include <array>
+#include <cstdio>
 #include <filesystem>
 #include <zip.h>
 #include <cstring>
@@ -15,11 +16,25 @@
 
 using namespace Hyprcursor;
 
-// directories for lookup
-constexpr const std::array<const char*, 1> systemThemeDirs = 
{"/usr/share/icons"};
+static std::vector<std::string> getSystemThemeDirs() {
+    const auto               envXdgData = std::getenv("XDG_DATA_DIRS");
+    std::vector<std::string> result;
+    if (envXdgData) {
+        std::stringstream envXdgStream(envXdgData);
+        std::string       tmpStr;
+        while (getline(envXdgStream, tmpStr, ':'))
+            result.push_back((tmpStr + "/icons"));
+    } else
+        result = {"/usr/share/icons"};
+
+    return result;
+}
+
+const std::vector<std::string>             systemThemeDirs = 
getSystemThemeDirs();
 constexpr const std::array<const char*, 2> userThemeDirs   = 
{"/.local/share/icons", "/.icons"};
 
 //
+
 static std::string themeNameFromEnv(PHYPRCURSORLOGFUNC logfn) {
     const auto ENV = getenv("HYPRCURSOR_THEME");
     if (!ENV) {
@@ -373,6 +388,13 @@
 
     SCursorRawShapeDataC*            data = new SCursorRawShapeDataC;
     std::vector<SLoadedCursorImage*> resultingImages;
+    data->overridenBy = nullptr;
+    data->images      = nullptr;
+    data->len         = 0;
+    data->hotspotX    = 0;
+    data->hotspotY    = 0;
+    data->resizeAlgo  = eHyprcursorResizeAlgo::HC_RESIZE_NONE;
+    data->type        = eHyprcursorDataType::HC_DATA_PNG;
 
     for (auto& shape : impl->theme.shapes) {
         // if it's overridden just return the override
@@ -634,18 +656,22 @@
         int         errp = 0;
         zip_t*      zip  = zip_open(cursor.path().string().c_str(), 
ZIP_RDONLY, &errp);
 
-        zip_file_t* meta_file = zip_fopen(zip, "meta.hl", ZIP_FL_UNCHANGED);
-        bool        metaIsHL  = true;
-        if (!meta_file) {
-            meta_file = zip_fopen(zip, "meta.toml", ZIP_FL_UNCHANGED);
-            metaIsHL  = false;
-            if (!meta_file)
-                return "cursor" + cursor.path().string() + "failed to load 
meta";
+        zip_int64_t index    = zip_name_locate(zip, "meta.hl", 
ZIP_FL_ENC_GUESS);
+        bool        metaIsHL = true;
+
+        if (index == -1) {
+            index    = zip_name_locate(zip, "meta.toml", ZIP_FL_ENC_GUESS);
+            metaIsHL = false;
         }
 
-        char* buffer = new char[1024 * 1024]; /* 1MB should be more than 
enough */
+        if (index == -1)
+            return "cursor" + cursor.path().string() + "failed to load meta";
+
+        zip_file_t* meta_file = zip_fopen_index(zip, index, ZIP_FL_UNCHANGED);
+
+        char*       buffer = new char[1024 * 1024]; /* 1MB should be more than 
enough */
 
-        int   readBytes = zip_fread(meta_file, buffer, 1024 * 1024 - 1);
+        int         readBytes = zip_fread(meta_file, buffer, 1024 * 1024 - 1);
 
         zip_fclose(meta_file);
 
@@ -670,6 +696,9 @@
 
         SHAPE->overrides = meta.parsedData.overrides;
 
+        zip_stat_t sb;
+        zip_stat_init(&sb);
+
         for (auto& i : SHAPE->images) {
             if (SHAPE->shapeType == SHAPE_INVALID) {
                 if (i.filename.ends_with(".svg"))
@@ -694,14 +723,23 @@
             IMAGE->delay = i.delay;
             IMAGE->isSVG = SHAPE->shapeType == SHAPE_SVG;
 
-            // read from zip
-            zip_file_t* image_file = zip_fopen(zip, i.filename.c_str(), 
ZIP_FL_UNCHANGED);
-            if (!image_file)
+            index = zip_name_locate(zip, i.filename.c_str(), ZIP_FL_ENC_GUESS);
+            if (index == -1)
                 return "cursor" + cursor.path().string() + "failed to load 
image_file";
 
-            IMAGE->data = new char[1024 * 1024]; /* 1MB should be more than 
enough, again. This probably should be in the spec. */
+            // read from zip
+            zip_file_t* image_file = zip_fopen_index(zip, index, 
ZIP_FL_UNCHANGED);
+            zip_stat_index(zip, index, ZIP_FL_UNCHANGED, &sb);
+
+            if (sb.valid & ZIP_STAT_SIZE) {
+                IMAGE->data    = new char[sb.size + 1];
+                IMAGE->dataLen = sb.size + 1;
+            } else {
+                IMAGE->data    = new char[1024 * 1024]; /* 1MB should be more 
than enough, again. This probably should be in the spec. */
+                IMAGE->dataLen = 1024 * 1024;
+            }
 
-            IMAGE->dataLen = zip_fread(image_file, IMAGE->data, 1024 * 1024 - 
1);
+            IMAGE->dataLen = zip_fread(image_file, IMAGE->data, IMAGE->dataLen 
- 1);
 
             zip_fclose(image_file);
 
@@ -712,7 +750,7 @@
                 IMAGE->cairoSurface = 
cairo_image_surface_create_from_png_stream(::readPNG, IMAGE);
 
                 if (const auto STATUS = 
cairo_surface_status(IMAGE->cairoSurface); STATUS != CAIRO_STATUS_SUCCESS) {
-                    delete[](char*) IMAGE->data;
+                    delete[] (char*)IMAGE->data;
                     IMAGE->data = nullptr;
                     return "Failed reading cairoSurface, status " + 
std::to_string((int)STATUS);
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/nix/default.nix 
new/hyprcursor-0.1.10/nix/default.nix
--- old/hyprcursor-0.1.9/nix/default.nix        2024-05-24 20:46:51.000000000 
+0200
+++ new/hyprcursor-0.1.10/nix/default.nix       2024-09-30 23:25:02.000000000 
+0200
@@ -7,6 +7,7 @@
   hyprlang,
   librsvg,
   libzip,
+  xcur2png,
   tomlplusplus,
   version ? "git",
 }:
@@ -15,11 +16,6 @@
   inherit version;
   src = ../.;
 
-  patches = [
-    # adds /run/current-system/sw/share/icons to the icon lookup directories
-    ./dirs.patch
-  ];
-
   nativeBuildInputs = [
     cmake
     pkg-config
@@ -30,6 +26,7 @@
     hyprlang
     librsvg
     libzip
+    xcur2png
     tomlplusplus
   ];
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/nix/dirs.patch 
new/hyprcursor-0.1.10/nix/dirs.patch
--- old/hyprcursor-0.1.9/nix/dirs.patch 2024-05-24 20:46:51.000000000 +0200
+++ new/hyprcursor-0.1.10/nix/dirs.patch        1970-01-01 01:00:00.000000000 
+0100
@@ -1,13 +0,0 @@
-diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp
-index 304ab9f..1f7e95d 100644
---- a/libhyprcursor/hyprcursor.cpp
-+++ b/libhyprcursor/hyprcursor.cpp
-@@ -14,7 +14,7 @@
- using namespace Hyprcursor;
- 
- // directories for lookup
--constexpr const std::array<const char*, 1> systemThemeDirs = 
{"/usr/share/icons"};
-+constexpr const std::array<const char*, 2> systemThemeDirs = 
{"/usr/share/icons", "/run/current-system/sw/share/icons"};
- constexpr const std::array<const char*, 2> userThemeDirs   = 
{"/.local/share/icons", "/.icons"};
- 
- //
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hyprcursor-0.1.9/nix/overlays.nix 
new/hyprcursor-0.1.10/nix/overlays.nix
--- old/hyprcursor-0.1.9/nix/overlays.nix       2024-05-24 20:46:51.000000000 
+0200
+++ new/hyprcursor-0.1.10/nix/overlays.nix      2024-09-30 23:25:02.000000000 
+0200
@@ -7,6 +7,7 @@
     (builtins.substring 4 2 longDate)
     (builtins.substring 6 2 longDate)
   ]);
+  version = lib.removeSuffix "\n" (builtins.readFile ../VERSION);
 in {
   default = inputs.self.overlays.hyprcursor;
 
@@ -15,7 +16,7 @@
     (final: prev: {
       hyprcursor = prev.callPackage ./default.nix {
         stdenv = prev.gcc13Stdenv;
-        version = "0.pre" + "+date=" + (mkDate (inputs.self.lastModifiedDate 
or "19700101")) + "_" + (inputs.self.shortRev or "dirty");
+        version = version + "+date=" + (mkDate (inputs.self.lastModifiedDate 
or "19700101")) + "_" + (inputs.self.shortRev or "dirty");
         inherit (final) hyprlang;
       };
     })

Reply via email to