commit:     33377d7498aa7b96b988a0b406235a1a4b68024c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  5 20:37:16 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct  5 20:39:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33377d74

sys-fs/shake: Fix build w/ cmake-4

Closes: https://bugs.gentoo.org/955766
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-fs/shake/files/shake-1.0-cmake4.patch | 50 +++++++++++++++++++++++++++++++
 sys-fs/shake/shake-1.0.ebuild             |  7 +++--
 2 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/sys-fs/shake/files/shake-1.0-cmake4.patch 
b/sys-fs/shake/files/shake-1.0-cmake4.patch
new file mode 100644
index 000000000000..5ea71230f267
--- /dev/null
+++ b/sys-fs/shake/files/shake-1.0-cmake4.patch
@@ -0,0 +1,50 @@
+From 8dca2c8eec28759ca8d1d091f356e7915b8fffbe Mon Sep 17 00:00:00 2001
+From: Brice Arnould <[email protected]>
+Date: Sat, 12 Mar 2022 23:31:13 +0100
+Subject: [PATCH] Update CMake list to avoid it breaking
+
+Fixes issue Update CMakeFiles #26.
+---
+ CMakeLists.txt | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6184bc2..fb1ac1d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-#  Copyright (C) 2006-2011 Brice Arnould.
++#  Copyright (C) 2006-2022 Brice Arnould.
+ # 
+ #  This file is part of ShaKe.
+ #
+@@ -16,16 +16,12 @@
+ #
+ 
+ #### MACROS AND WORKAROUNDS ####
+-CMAKE_MINIMUM_REQUIRED (VERSION 2.4)
+-if(COMMAND cmake_policy) # Needed by CMake 2.4
+-  cmake_policy(SET CMP0005 OLD)
+-endif(COMMAND cmake_policy)
++CMAKE_MINIMUM_REQUIRED (VERSION 3.14)
+ set (CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+ 
+ MACRO (add_help2man_manpage file command)
+-  get_target_property (HELP2MAN_COMMAND ${command} LOCATION)
+   add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file}
+-    COMMAND ${HELP2MAN_LOCATION} ARGS -s8 -N -i 
${CMAKE_CURRENT_SOURCE_DIR}/doc/fdl-man_insert -I 
${CMAKE_CURRENT_SOURCE_DIR}/doc/${command}-man_insert -o 
${CMAKE_CURRENT_BINARY_DIR}/${file} ${HELP2MAN_COMMAND}
++    COMMAND ${HELP2MAN_LOCATION} ARGS -s8 -N -i 
${CMAKE_CURRENT_SOURCE_DIR}/doc/fdl-man_insert -I 
${CMAKE_CURRENT_SOURCE_DIR}/doc/${command}-man_insert -o 
${CMAKE_CURRENT_BINARY_DIR}/${file} $<TARGET_FILE:${command}>
+     DEPENDS ${command}
+     COMMENT "Building manpage for ${command}")
+ ENDMACRO ()
+@@ -57,8 +53,8 @@ add_custom_target (doc ALL
+ 
+ ## LINUX  ##
+ IF (CMAKE_SYSTEM_NAME MATCHES Linux)
+-  add_definitions ("-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64")  # For 64 
bits files
+-  add_definitions ("-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L") # For 
posix_fallocate
++  add_definitions (-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)  # For 64 
bits files
++  add_definitions (-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L) # For 
posix_fallocate
+   list (APPEND CMAKE_REQUIRED_LIBRARIES attr)
+   target_link_libraries (shake attr)
+   target_link_libraries (unattr attr)

diff --git a/sys-fs/shake/shake-1.0.ebuild b/sys-fs/shake/shake-1.0.ebuild
index bf47738b8c16..940bcd0eb223 100644
--- a/sys-fs/shake/shake-1.0.ebuild
+++ b/sys-fs/shake/shake-1.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,4 +18,7 @@ RDEPEND="sys-apps/attr"
 DEPEND="${RDEPEND}
        sys-apps/help2man"
 
-PATCHES=( "${FILESDIR}"/${PN}-0.999-uclibc.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.999-uclibc.patch
+       "${FILESDIR}"/${P}-cmake4.patch # bug 955766, git master
+)

Reply via email to