From cab4746180f210a3c1dd3d53e45c510e309e90e1 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sat, 20 Apr 2024 13:23:33 +0200 Subject: [PATCH] zip: fix build for some distros (#37) (#38) libzip 1.10.1 is not available on some distributions. This patch introduces a workaround to fix the build instead of jumping to 1.10.1 release. --- CMakeLists.txt | 2 +- hyprcursor-util/src/main.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd750c5..6a3b7bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ configure_file(hyprcursor.pc.in hyprcursor.pc @ONLY) set(CMAKE_CXX_STANDARD 23) find_package(PkgConfig REQUIRED) -pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprlang>=0.4.2 libzip>=1.10.1 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") diff --git a/hyprcursor-util/src/main.cpp b/hyprcursor-util/src/main.cpp index cc8b309..b6235cb 100644 --- a/hyprcursor-util/src/main.cpp +++ b/hyprcursor-util/src/main.cpp @@ -11,6 +11,10 @@ #include "manifest.hpp" #include "meta.hpp" +#ifndef ZIP_LENGTH_TO_END +#define ZIP_LENGTH_TO_END -1 +#endif + enum eOperation { OPERATION_CREATE = 0, OPERATION_EXTRACT = 1, @@ -454,4 +458,4 @@ int main(int argc, char** argv, char** envp) { } return 0; -} \ No newline at end of file +}