From bc4457d8e0e53a2e43c4254d08053ba9708663e1 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 20 Jun 2023 01:14:49 +0100 Subject: gentoo auto-resync : 20:06:2023 - 01:14:49 --- games-engines/fheroes2/Manifest | 4 ++ games-engines/fheroes2/fheroes2-1.0.5.ebuild | 78 ++++++++++++++++++++++ .../fheroes2/files/fheroes2-1.0.4-scripts.patch | 19 ++++++ games-engines/fheroes2/metadata.xml | 31 +++++++++ 4 files changed, 132 insertions(+) create mode 100644 games-engines/fheroes2/Manifest create mode 100644 games-engines/fheroes2/fheroes2-1.0.5.ebuild create mode 100644 games-engines/fheroes2/files/fheroes2-1.0.4-scripts.patch create mode 100644 games-engines/fheroes2/metadata.xml (limited to 'games-engines/fheroes2') diff --git a/games-engines/fheroes2/Manifest b/games-engines/fheroes2/Manifest new file mode 100644 index 000000000000..df90de05d378 --- /dev/null +++ b/games-engines/fheroes2/Manifest @@ -0,0 +1,4 @@ +AUX fheroes2-1.0.4-scripts.patch 716 BLAKE2B 0b944bf9f012e0fc6789230343e230b400b8a3446a0d07140816c9cb2262ad5b11f5a87562a70f32d71676b55d504299ba610e097cfe4b1fe52147e70c11c249 SHA512 fc5772dab278884f78741f3122554df9e5befc31ff3b07f0d4c5bf6e8764deee651d1999982a2c73c3a0bc49e517dd67bdf8b50151e9b489e08b9f4ebb13123f +DIST fheroes2-1.0.5.tar.gz 11570167 BLAKE2B 7294ae4a816ce0a42c035262cbc8d44fc53cfdaa1333934ac316607f7d086a44358fc13931e5dbce9b17ff65e58016efc57cd123747af30277bcf4c1bc195e1e SHA512 13f058319540fa9fa04955ff8a5f16a0113e791307d58c32025361c773757769306f632d2c6472ee6d0b704dc4c260a9c64954c19ba2e58ab21dc6744c3cdd3e +EBUILD fheroes2-1.0.5.ebuild 1751 BLAKE2B b1138fe1250496ae9693057c543dc996de78d764995649851bdcbcd93c30993fb98dd2baadf7bcab7ba580390a8440239af7749f9be81bb4be06614909d61beb SHA512 2211c751ba647cb90c91db7a37cb128774f59b3fff9ffb889d7caca3007f64563d200fb9415d0616c6f40508afc3a691f7eeb4eb2bbd08e2af6daa712b26380a +MISC metadata.xml 1185 BLAKE2B 28d22394a735740a0c230888558eccb00c4ca9ec0072aabfc27d271c9a5089ea011bc167678a7c3bf81cbeeaccbc8a0fb0b2b94d80fd83b42bc8f9a654da756a SHA512 8b3033b5de642317d2624486810cd189dee8746c9e10110a5f6ae023d51a9203c226f2b41ac4d0afb1e4b29f862063f0749b5170534b17732d26dd8dbaa89625 diff --git a/games-engines/fheroes2/fheroes2-1.0.5.ebuild b/games-engines/fheroes2/fheroes2-1.0.5.ebuild new file mode 100644 index 000000000000..f58beedc9f5c --- /dev/null +++ b/games-engines/fheroes2/fheroes2-1.0.5.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) +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" +IUSE="tools" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +COMMON_DEPEND=" + media-libs/libpng:= + media-libs/libsdl2[video] + media-libs/sdl2-image + media-libs/sdl2-mixer + sys-libs/zlib +" +RDEPEND=" + ${COMMON_DEPEND} + ${PYTHON_DEPS} + app-arch/libarchive + dev-lang/python + virtual/libintl +" +DEPEND="${COMMON_DEPEND}" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/fheroes2-1.0.4-scripts.patch" +) + +src_configure() { + # Not using dev-games/libsmacker because the game crashes with it + local mycmakeargs=( + -DENABLE_IMAGE=ON + -DENABLE_TOOLS=$(usex tools) + -DUSE_SYSTEM_LIBSMACKER=NO + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + emake -C files/lang +} + +src_install() { + cmake_src_install + + if use tools; then + 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" +} diff --git a/games-engines/fheroes2/files/fheroes2-1.0.4-scripts.patch b/games-engines/fheroes2/files/fheroes2-1.0.4-scripts.patch new file mode 100644 index 000000000000..c5675fdc0a6f --- /dev/null +++ b/games-engines/fheroes2/files/fheroes2-1.0.4-scripts.patch @@ -0,0 +1,19 @@ +Install the data-exporting scripts to a better place than docs + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -182,12 +182,12 @@ if(NOT MACOS_APP_BUNDLE) + install( + FILES script/demo/download_demo_version.sh + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ +- DESTINATION ${CMAKE_INSTALL_DOCDIR}/demo ++ DESTINATION ${FHEROES2_DATA} + ) + install( + FILES script/homm2/extract_homm2_resources.sh + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ +- DESTINATION ${CMAKE_INSTALL_DOCDIR}/homm2 ++ DESTINATION ${FHEROES2_DATA} + ) + install( + FILES script/packaging/common/fheroes2.appdata.xml diff --git a/games-engines/fheroes2/metadata.xml b/games-engines/fheroes2/metadata.xml new file mode 100644 index 000000000000..b43e5734bbae --- /dev/null +++ b/games-engines/fheroes2/metadata.xml @@ -0,0 +1,31 @@ + + + + + alexey+gentoo@asokolov.org + Alexey Sokolov + + + proxy-maint@gentoo.org + Proxy Maintainers + + + games@gentoo.org + Gentoo Games Project + + + Install development tools like 82m2wav and xmi2midi. + + + ihhub/fheroes2 + + + fheroes2 is a recreation of the Heroes of Might and Magic II game engine. + This open source multiplatform project, written from scratch, is + designed to reproduce the original game with significant improvements in + gameplay, graphics and logic (including support for high-resolution + graphics, improved AI, numerous fixes and user interface improvements), + breathing new life into one of the most addictive turn-based strategy + games. + + -- cgit v1.2.3