commit: caee6e97462241141a9aad4e3f4afcce7157c52c Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Thu May 22 22:20:50 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Thu May 22 22:22:45 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caee6e97
games-strategy/hedgewars: Fix build w/ cmake-4 Closes: https://bugs.gentoo.org/956467 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../hedgewars/files/hedgewars-1.0.2-cmake4.patch | 52 ++++++++++++++++++++++ games-strategy/hedgewars/hedgewars-1.0.2-r1.ebuild | 1 + 2 files changed, 53 insertions(+) diff --git a/games-strategy/hedgewars/files/hedgewars-1.0.2-cmake4.patch b/games-strategy/hedgewars/files/hedgewars-1.0.2-cmake4.patch new file mode 100644 index 000000000000..db80e9d81507 --- /dev/null +++ b/games-strategy/hedgewars/files/hedgewars-1.0.2-cmake4.patch @@ -0,0 +1,52 @@ +From 02ac3e0681741603f17a0cc24ba1ecc6ce2766ac Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <[email protected]> +Date: Fri, 23 May 2025 00:19:17 +0200 +Subject: [PATCH] Fix build with >=cmake-4 + +Signed-off-by: Andreas Sturmlechner <[email protected]> +--- + CMakeLists.txt | 4 ++-- + misc/libphyslayer/CMakeLists.txt | 2 -- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8fc48b9..920dbab 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,14 +2,14 @@ project(hedgewars) + + + #initialise cmake environment +-cmake_minimum_required(VERSION 2.6.4) ++cmake_minimum_required(VERSION 3.12.0) + foreach(hwpolicy CMP0003 CMP0012 CMP0017 CMP0018) + if(POLICY ${hwpolicy}) + cmake_policy(SET ${hwpolicy} NEW) + endif() + endforeach() + +-foreach(hwpolicy CMP0026 CMP0068) ++foreach(hwpolicy CMP0068) + if(POLICY ${hwpolicy}) + cmake_policy(SET ${hwpolicy} OLD) + endif() +diff --git a/misc/libphyslayer/CMakeLists.txt b/misc/libphyslayer/CMakeLists.txt +index 4736216..98eabc2 100644 +--- a/misc/libphyslayer/CMakeLists.txt ++++ b/misc/libphyslayer/CMakeLists.txt +@@ -21,12 +21,10 @@ target_link_libraries(physlayer ${SDL2_LIBRARIES} lua physfs) + install(TARGETS physlayer RUNTIME DESTINATION ${target_binary_install_dir} + LIBRARY DESTINATION ${target_library_install_dir} + ARCHIVE DESTINATION ${target_library_install_dir}) +-get_target_property(physlayer_fullpath physlayer LOCATION) + + + ## added standard variables (FORCE or cmake won't pick 'em) + set(PHYSLAYER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Physlayer include dir" FORCE) +-set(PHYSLAYER_LIBRARY ${physlayer_fullpath} CACHE STRING "Physlayer library" FORCE) + + if(BUILD_ENGINE_JS) + set_target_properties(physlayer PROPERTIES SUFFIX ".bc") +-- +2.49.0 + diff --git a/games-strategy/hedgewars/hedgewars-1.0.2-r1.ebuild b/games-strategy/hedgewars/hedgewars-1.0.2-r1.ebuild index 2383e3c038fc..4dbb1efd624f 100644 --- a/games-strategy/hedgewars/hedgewars-1.0.2-r1.ebuild +++ b/games-strategy/hedgewars/hedgewars-1.0.2-r1.ebuild @@ -76,6 +76,7 @@ PATCHES=( "${FILESDIR}/${P}-glext-prototypes.patch" "${FILESDIR}/${P}-clang-15.patch" "${FILESDIR}/${P}-ffmpeg-6.patch" + "${FILESDIR}/${P}-cmake4.patch" # bug 956467 ) src_configure() {
