Skip to content

Commit

Permalink
games/warzone2100: switch from p7zip to 7-zip
Browse files Browse the repository at this point in the history
PR:		261700
Reported by:	makc
  • Loading branch information
AMDmi3 committed Feb 9, 2022
1 parent 160358b commit 32621c8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion games/warzone2100/Makefile
Expand Up @@ -12,7 +12,7 @@ COMMENT= Innovative 3D real-time strategy game
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING

BUILD_DEPENDS= 7z:archivers/p7zip \
BUILD_DEPENDS= 7zz:archivers/7-zip \
a2x:textproc/asciidoc
LIB_DEPENDS= libphysfs.so:devel/physfs \
libpng.so:graphics/png \
Expand Down
22 changes: 22 additions & 0 deletions games/warzone2100/files/patch-cmake_FindZIP.cmake
@@ -0,0 +1,22 @@
--- cmake/FindZIP.cmake.orig 2021-04-18 18:28:41 UTC
+++ cmake/FindZIP.cmake
@@ -29,8 +29,8 @@ set(_PF32BIT "ProgramFiles(x86)")
#

# Search for 7-Zip
-find_program(ZIP_EXECUTABLE NAMES 7z 7za PATHS "$ENV{ProgramFiles}/7-Zip" "$ENV{${_PF32BIT}}/7-Zip" "$ENV{ProgramW6432}/7-Zip")
-if(ZIP_EXECUTABLE MATCHES "7z|7za")
+find_program(ZIP_EXECUTABLE NAMES 7zz REQUIRED)
+if(ZIP_EXECUTABLE MATCHES "7zz")
# Test whether 7-Zip supports the "-bb0" option to disable log output
execute_process(COMMAND ${ZIP_EXECUTABLE} i -bb0
RESULT_VARIABLE 7z_bb_result
@@ -110,7 +110,7 @@ function(COMPRESS_ZIP)
message( FATAL_ERROR "Unsupported compression level \"${_parsedArguments_COMPRESSION_LEVEL}\" (must be: 0, 1, 3, 5, 7, 9)" )
endif()

- if(ZIP_EXECUTABLE MATCHES "7z|7za")
+ if(ZIP_EXECUTABLE MATCHES "7zz")
set(_zipExecutableOptions a -tzip -mtc=off)
if(DEFINED _parsedArguments_COMPRESSION_LEVEL)
# 7z command-line option for compression level (when in ZIP mode) is: "-mx=#"

0 comments on commit 32621c8

Please sign in to comment.