From b50acd6fdcbca68c158b66646ae458ca12b98946 Mon Sep 17 00:00:00 2001 From: zenobit Date: Sat, 16 Mar 2024 23:32:56 +0100 Subject: [PATCH] hyprcursors: test patching --- ...cmake_correct_includedir_permissions.patch | 24 +++++++++++++++++++ .../lib_avoid_arithmetic_on_void.patch | 23 ++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 srcpkgs/hyprcursor/patches/cmake_correct_includedir_permissions.patch create mode 100644 srcpkgs/hyprcursor/patches/lib_avoid_arithmetic_on_void.patch diff --git a/srcpkgs/hyprcursor/patches/cmake_correct_includedir_permissions.patch b/srcpkgs/hyprcursor/patches/cmake_correct_includedir_permissions.patch new file mode 100644 index 00000000000000..6cf652e4321198 --- /dev/null +++ b/srcpkgs/hyprcursor/patches/cmake_correct_includedir_permissions.patch @@ -0,0 +1,24 @@ +From 59acebef20051167c5c458d82150c54925319db8 Mon Sep 17 00:00:00 2001 +From: solopasha +Date: Sat, 16 Mar 2024 20:03:39 +0300 +Subject: [PATCH] cmake: correct includedir permissions (#7) + +no need to set 777 +--- + CMakeLists.txt | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be38f90..a229cdf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,8 +70,5 @@ add_test(NAME "Test libhyprcursor in C" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/te + add_dependencies(tests hyprcursor_test_c) + + # Installation +-install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} DIRECTORY_PERMISSIONS +- OWNER_WRITE OWNER_READ OWNER_EXECUTE +- GROUP_WRITE GROUP_READ GROUP_EXECUTE +- WORLD_WRITE WORLD_READ WORLD_EXECUTE) ++install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/srcpkgs/hyprcursor/patches/lib_avoid_arithmetic_on_void.patch b/srcpkgs/hyprcursor/patches/lib_avoid_arithmetic_on_void.patch new file mode 100644 index 00000000000000..4dbd043642ff27 --- /dev/null +++ b/srcpkgs/hyprcursor/patches/lib_avoid_arithmetic_on_void.patch @@ -0,0 +1,23 @@ +From 60f9c53cf2e482c4ee9d2ce2f9c6f26af2f76a91 Mon Sep 17 00:00:00 2001 +From: Vaxry +Date: Sat, 16 Mar 2024 16:39:14 +0000 +Subject: [PATCH] lib: avoid arithmetic on void* + +fixes #8 +--- + libhyprcursor/hyprcursor.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp +index 6e5bb0c..5de9daf 100644 +--- a/libhyprcursor/hyprcursor.cpp ++++ b/libhyprcursor/hyprcursor.cpp +@@ -508,7 +508,7 @@ static cairo_status_t readPNG(void* data, unsigned char* output, unsigned int le + + size_t toRead = len > DATA->dataLen - DATA->readNeedle ? DATA->dataLen - DATA->readNeedle : len; + +- std::memcpy(output, DATA->data + DATA->readNeedle, toRead); ++ std::memcpy(output, (uint8_t*)DATA->data + DATA->readNeedle, toRead); + DATA->readNeedle += toRead; + + if (DATA->readNeedle >= DATA->dataLen) {