gentoo/games-puzzle/sgt-puzzles/files/sgt-puzzles-20250627-fix-linking.patch
Alexander Tsoy bf4d1c26e8
games-puzzle/sgt-puzzles: add 20250627
Closes: https://bugs.gentoo.org/770736
Closes: https://bugs.gentoo.org/841323
Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Part-of: https://github.com/gentoo/gentoo/pull/42711
Closes: https://github.com/gentoo/gentoo/pull/42711
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-27 23:30:36 +01:00

28 lines
1.2 KiB
Diff

* Make common lib static. It is built as a shared library by default but doesn't
get installed which results in a broken executables.
* Fix linking issues due to relocations in core_obj.
* cli programs fails to link. Disable them for now.
--- a/CMakeLists.txt 2025-06-23 18:39:56.200000000 +0300
+++ b/CMakeLists.txt 2025-06-23 18:42:08.060000000 +0300
@@ -12,7 +12,8 @@ add_library(core_obj OBJECT
version.c
${platform_common_sources})
add_library(core $<TARGET_OBJECTS:core_obj>)
-add_library(common $<TARGET_OBJECTS:core_obj> hat.c spectre.c)
+add_library(common STATIC $<TARGET_OBJECTS:core_obj> hat.c spectre.c)
+set_property(TARGET core_obj PROPERTY POSITION_INDEPENDENT_CODE ON)
cliprogram(polygon-test draw-poly.c
SDL2_LIB COMPILE_DEFINITIONS STANDALONE_POLYGON)
--- a/cmake/setup.cmake 2025-06-23 18:27:11.510000000 +0300
+++ b/cmake/setup.cmake 2025-06-23 18:33:07.400000000 +0300
@@ -3,7 +3,7 @@ set(PUZZLES_ENABLE_UNFINISHED ""
to build as if official (separated by ';')")
set(build_individual_puzzles TRUE)
-set(build_cli_programs TRUE)
+set(build_cli_programs FALSE)
set(build_gui_programs TRUE)
set(build_icons FALSE)
set(need_c_icons FALSE)