Skip to content

Commit

Permalink
zip: fix build for some distros (#37) (#38)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
regit authored Apr 20, 2024
1 parent 0a53b99 commit cab4746
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 5 additions & 1 deletion hyprcursor-util/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -454,4 +458,4 @@ int main(int argc, char** argv, char** envp) {
}

return 0;
}
}

0 comments on commit cab4746

Please sign in to comment.