summaryrefslogtreecommitdiff
path: root/games-strategy/warzone2100/files/warzone2100-4.1.3-no-compress-manpages.patch
blob: b90ad05bc754616bfd2240eadf20f51a4321ec5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
https://bugs.gentoo.org/808120

From e65b71cec99b2c3a4d0ed6aa448e7a2dc28fabac Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Tue, 17 Aug 2021 22:22:40 +0100
Subject: [PATCH] Don't compress manpages

---
 doc/CMakeLists.txt | 34 ++++++----------------------------
 1 file changed, 6 insertions(+), 28 deletions(-)

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 3d27a1a..f3c702b 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -236,35 +236,13 @@ install(FILES ${wz2100_doc_FILES} DESTINATION "${CMAKE_INSTALL_DOCDIR}${WZ_OUTPU
 if(UNIX)
 	# Man-page gzip and installation
 
-	find_program(GZIP_BIN NAMES gzip PATHS /bin /usr/bin /usr/local/bin)
-	if (GZIP_BIN)
-		set(_warzone2100_6_uncompressed_orig "${CMAKE_CURRENT_BINARY_DIR}/warzone2100.6")
-		set(_warzone2100_6_uncompressed "${CMAKE_CURRENT_BINARY_DIR}/warzone2100${WZ_OUTPUT_NAME_SUFFIX}.6")
-		set(_warzone2100_6_compressed "${_warzone2100_6_uncompressed}.gz")
-
-		add_custom_target(wz2100_manpages ALL)
-		set_property(TARGET wz2100_manpages PROPERTY FOLDER "doc")
-		add_dependencies(wz2100_manpages wz2100_doc)
-
-		if (NOT "${_warzone2100_6_uncompressed_orig}" STREQUAL "${_warzone2100_6_uncompressed}")
-			add_custom_command(
-				TARGET wz2100_manpages
-				COMMAND ${CMAKE_COMMAND} -E copy "${_warzone2100_6_uncompressed_orig}" "${_warzone2100_6_uncompressed}"
-				COMMAND ${GZIP_BIN} -n -c ${_warzone2100_6_uncompressed} > ${_warzone2100_6_compressed}
-				VERBATIM
-			)
-		else()
-			add_custom_command(
-				TARGET wz2100_manpages
-				COMMAND ${GZIP_BIN} -n -c ${_warzone2100_6_uncompressed} > ${_warzone2100_6_compressed}
-				VERBATIM
-			)
-		endif()
+	set(_warzone2100_6 "${CMAKE_CURRENT_BINARY_DIR}/warzone2100${WZ_OUTPUT_NAME_SUFFIX}.6")
 
-		install(FILES "${_warzone2100_6_compressed}" DESTINATION "${CMAKE_INSTALL_MANDIR}/man6" COMPONENT Manpages)
-	else()
-		message( WARNING "Unable to find gzip tool; skipping Unix man page generation" )
-	endif()
+	add_custom_target(wz2100_manpages ALL)
+	set_property(TARGET wz2100_manpages PROPERTY FOLDER "doc")
+	add_dependencies(wz2100_manpages wz2100_doc)
+
+	install(FILES "${_warzone2100_6}" DESTINATION "${CMAKE_INSTALL_MANDIR}/man6" COMPONENT Manpages)
 endif()
 
 set(wz2100_doc_IMAGES_FILES ${wz2100_doc_IMAGES_FILES} PARENT_SCOPE)
-- 
2.33.0