git: 32621c81fd6f - main - games/warzone2100: switch from p7zip to 7-zip

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Wed, 09 Feb 2022 21:49:15 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=32621c81fd6fa7edff608945679b5c91faa00b26

commit 32621c81fd6fa7edff608945679b5c91faa00b26
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-02-09 19:06:17 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-02-09 21:45:56 +0000

    games/warzone2100: switch from p7zip to 7-zip
    
    PR:             261700
    Reported by:    makc
---
 games/warzone2100/Makefile                        |  2 +-
 games/warzone2100/files/patch-cmake_FindZIP.cmake | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/games/warzone2100/Makefile b/games/warzone2100/Makefile
index c3b1e1026a28..2b189d8791b9 100644
--- a/games/warzone2100/Makefile
+++ b/games/warzone2100/Makefile
@@ -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 \
diff --git a/games/warzone2100/files/patch-cmake_FindZIP.cmake b/games/warzone2100/files/patch-cmake_FindZIP.cmake
new file mode 100644
index 000000000000..62eb09120fae
--- /dev/null
+++ b/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=#"