commit: bf4d1c26e8be00f30c2bf8819e44a59e6658f760 Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me> AuthorDate: Mon Jun 23 17:41:41 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jun 27 22:30:36 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf4d1c26
games-puzzle/sgt-puzzles: add 20250627 Closes: https://bugs.gentoo.org/770736 Closes: https://bugs.gentoo.org/841323 Signed-off-by: Alexander Tsoy <alexander <AT> 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 <AT> gentoo.org> games-puzzle/sgt-puzzles/Manifest | 1 + .../files/sgt-puzzles-20250627-fix-linking.patch | 27 +++++++++ .../sgt-puzzles/sgt-puzzles-20250627.ebuild | 64 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) diff --git a/games-puzzle/sgt-puzzles/Manifest b/games-puzzle/sgt-puzzles/Manifest index 94246fc13597..4f6e984c3a1d 100644 --- a/games-puzzle/sgt-puzzles/Manifest +++ b/games-puzzle/sgt-puzzles/Manifest @@ -1 +1,2 @@ DIST puzzles-20190415.e2135d5.tar.gz 3286744 BLAKE2B 6b19cde3f95b5375bde74923a5f8e3deb9abb7d4d737ad5f2d18aa7895b973a9ca1ed4a495cf80da8390ed7fb63f1eb973c8053d52145e5752c56e38d3ac19d7 SHA512 5f38c96cff4e745a1c1615762c0e5f3f3dd056ff7dbf0f80a5953e658ae1460503c6394fe29301f5682485d6a6121869853a270dc60327821a3059ca6d971fa1 +DIST sgt-puzzles-20250627.tar.gz 2467512 BLAKE2B 8d19d3bee5b171ed2645cf47f7bc84fd94ef7c0ea8dc47ad758c7e74131e8e34060fceb471082007f61b4a03e2e9e9c6419906357e43993e80fcd27a56b1b138 SHA512 6ffc2eda1abc0f6808b044571478cf543339785049ab8adb0d7755a65a7ea969747637c0ac9fc440a780db3145abf3c0a881b42fd2c115481db8023ac0a60423 diff --git a/games-puzzle/sgt-puzzles/files/sgt-puzzles-20250627-fix-linking.patch b/games-puzzle/sgt-puzzles/files/sgt-puzzles-20250627-fix-linking.patch new file mode 100644 index 000000000000..7e6d6acc4bb2 --- /dev/null +++ b/games-puzzle/sgt-puzzles/files/sgt-puzzles-20250627-fix-linking.patch @@ -0,0 +1,27 @@ +* 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) diff --git a/games-puzzle/sgt-puzzles/sgt-puzzles-20250627.ebuild b/games-puzzle/sgt-puzzles/sgt-puzzles-20250627.ebuild new file mode 100644 index 000000000000..6dc471e19daa --- /dev/null +++ b/games-puzzle/sgt-puzzles/sgt-puzzles-20250627.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg-utils + +DESCRIPTION="Simon Tatham's Portable Puzzle Collection" +HOMEPAGE="https://www.chiark.greenend.org.uk/~sgtatham/puzzles/" +MY_HASH=8314b03 +SRC_URI="https://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${PV}.${MY_HASH}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}"/puzzles-${PV}.${MY_HASH} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +COMMON_DEPEND="x11-libs/gtk+:3" +RDEPEND=" + ${COMMON_DEPEND} + x11-misc/xdg-utils +" +DEPEND="${COMMON_DEPEND}" +BDEPEND=" + app-text/halibut + dev-lang/perl + virtual/pkgconfig +" + +DOCS=( puzzles.txt HACKING ) + +PATCHES=( + "${FILESDIR}"/${PN}-20250627-fix-linking.patch +) + +src_configure() { + local mycmakeargs=( + -DNAME_PREFIX="${PN}_" + -DPUZZLES_GTK_VERSION=3 + ) + + cmake_src_configure +} + +src_install() { + sed -i "s/^Categories=.*/&X-${PN};/" "${BUILD_DIR}"/*.desktop || die + + cmake_src_install + + einstalldocs + + insinto /etc/xdg/menus/applications-merged + doins "${FILESDIR}/${PN}.menu" + insinto /usr/share/desktop-directories + doins "${FILESDIR}/${PN}.directory" +} + +pkg_postinst() { + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +}
