commit:     93af90785ef9e34179d9a401804bfcddf9bdda2f
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sun Nov  9 19:49:16 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Nov 18 23:22:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93af9078

games-engines/fheroes2: add 1.1.12

Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Part-of: https://github.com/gentoo/gentoo/pull/44557
Closes: https://github.com/gentoo/gentoo/pull/44557
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-engines/fheroes2/Manifest               |  1 +
 games-engines/fheroes2/fheroes2-1.1.12.ebuild | 82 +++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/games-engines/fheroes2/Manifest b/games-engines/fheroes2/Manifest
index c9ee12300729..6992c05413ee 100644
--- a/games-engines/fheroes2/Manifest
+++ b/games-engines/fheroes2/Manifest
@@ -1 +1,2 @@
 DIST fheroes2-1.1.11.tar.gz 12502123 BLAKE2B 
574806436caa284cf06e0461f310573fd68af9d90593038ce858d2fc9e91464d95138797c32f948d1affad58e9dbb1ad226915357530e1b61c7b361044888e64
 SHA512 
f1ba34f1105006f8ab0dbeebc868f12a55385bae04ac2cf4c08a24b831382342fa5f7cd34a31de0b26aeba1973690bf09c8eac88717034130c2612a47f36bf50
+DIST fheroes2-1.1.12.tar.gz 12703357 BLAKE2B 
125e119ac4a9bdaeb68b3bd11d75c86904f378c391332f3876cab7b0737984a2c551f6be2bb142717f32985f3aef773d95cd5a692dec640dec2efe098e3a99dc
 SHA512 
936ad08f0e45b737e2094f0cecf2ad0a747e8e289eb1cf56add5fc9fda1e11836dfb02dfa5971390421d2a824798ee0c6313e90dff916b94be94196b3d46b345

diff --git a/games-engines/fheroes2/fheroes2-1.1.12.ebuild 
b/games-engines/fheroes2/fheroes2-1.1.12.ebuild
new file mode 100644
index 000000000000..4c3a8466a317
--- /dev/null
+++ b/games-engines/fheroes2/fheroes2-1.1.12.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit cmake python-single-r1 xdg
+
+DESCRIPTION="Recreation of HoMM2 game engine"
+HOMEPAGE="https://ihhub.github.io/fheroes2/";
+SRC_URI="https://github.com/ihhub/fheroes2/archive/refs/tags/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="tools"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+       media-libs/libpng:=
+       media-libs/libsdl2[video]
+       media-libs/sdl2-image
+       media-libs/sdl2-mixer
+       virtual/zlib:=
+"
+RDEPEND="
+       ${DEPEND}
+       ${PYTHON_DEPS}
+       app-arch/libarchive
+       virtual/libintl
+"
+BDEPEND="
+       sys-devel/gettext
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}/fheroes2-1.0.4-scripts.patch"
+)
+
+src_prepare() {
+       sed -i -e "s/python3/${EPYTHON}/" 
script/homm2/extract_homm2_resources.sh || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       # Not using dev-games/libsmacker because the game crashes with it
+       local mycmakeargs=(
+               -DENABLE_IMAGE=ON
+               -DENABLE_TOOLS=$(usex tools)
+       )
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+       emake -C files/lang
+}
+
+src_install() {
+       cmake_src_install
+
+       if use tools; then
+               local file
+               for file in 82m2wav bin2txt extractor h2dmgr icn2img pal2img 
til2img xmi2midi; do
+                       newbin "${BUILD_DIR}/${file}" "fheroes2-${file}"
+               done
+       fi
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       elog "You need original HoMM2 data files to play fheroes2."
+       elog "If you have an installer (.exe) from GOG, install:"
+       elog "  games-strategy/homm2-gold-gog"
+       elog "If you have the original game installed somewhere already, run:"
+       elog "  ${EPREFIX}/usr/share/fheroes2/extract_homm2_resources.sh"
+       elog "Also you can automatically get a demo version for free by 
installing:"
+       elog "  games-strategy/homm2-demo"
+}

Reply via email to