commit: a22880d438a2005fec2c573cc154e5dd19d10446 Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> AuthorDate: Wed Feb 25 01:26:24 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Feb 25 12:06:53 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a22880d4
games-engines/fheroes2: add 1.1.14 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> Part-of: https://codeberg.org/gentoo/gentoo/pulls/133 Merges: https://codeberg.org/gentoo/gentoo/pulls/133 Signed-off-by: Sam James <sam <AT> gentoo.org> games-engines/fheroes2/Manifest | 1 + games-engines/fheroes2/fheroes2-1.1.14.ebuild | 82 +++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/games-engines/fheroes2/Manifest b/games-engines/fheroes2/Manifest index 9958f5e64f29..5f0382c22d4a 100644 --- a/games-engines/fheroes2/Manifest +++ b/games-engines/fheroes2/Manifest @@ -1 +1,2 @@ DIST fheroes2-1.1.13.tar.gz 12811678 BLAKE2B da1366de885054811456ecd802cb05c0cc04cfdf7410ffb1b5059051b8575c813b782ef24a3b0c9eef87cab5bf0c80a5bbafacc29ce27c13f1aafa1720d91c18 SHA512 8f2f40730d00af56dd532a66b7f673f89b48e2a601c2bc68e4e412171a47028cc718d9a50f4512b5826e700147854779fbc3fda7eff443a30f330338430b08d5 +DIST fheroes2-1.1.14.tar.gz 12838596 BLAKE2B 2665e1a6f886482a3ae628745019dcbeb14c0330b02da4f91e84a4060b1b0dc81ec5ecc325ea58ad0cc035290ec485609beb123bb6cdb55b4999940cc1c6972b SHA512 3373e471c13af9c0a201df4ed27e31d32201cce5fcf47300c9d34ec2a8e312bdd69cd3602ab0f059c1ce3ba5235c4f6980a3b4e5f750c0042bbfa70660fa2d25 diff --git a/games-engines/fheroes2/fheroes2-1.1.14.ebuild b/games-engines/fheroes2/fheroes2-1.1.14.ebuild new file mode 100644 index 000000000000..b4383e8fdf2d --- /dev/null +++ b/games-engines/fheroes2/fheroes2-1.1.14.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2026 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" +}
