diff options
author | Vadim Misbakh-Soloviov <mva@gentoo.org> | 2024-09-19 08:35:13 +0700 |
---|---|---|
committer | Vadim Misbakh-Soloviov <mva@gentoo.org> | 2024-09-19 08:35:13 +0700 |
commit | 0b528a6fa810acfc36650d42ec5f84bf326bddea (patch) | |
tree | ab154f236cab5428df9085c48a79b0ba2ea70410 /games-strategy | |
parent | games-strategy/vcmi: bump (diff) | |
download | gamerlay-master.tar.gz gamerlay-master.tar.bz2 gamerlay-master.zip |
Signed-off-by: Vadim Misbakh-Soloviov <mva@gentoo.org>
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/vcmi/Manifest | 1 | ||||
-rw-r--r-- | games-strategy/vcmi/vcmi-1.5.7.ebuild | 32 | ||||
-rw-r--r-- | games-strategy/vcmi/vcmi-9999.ebuild | 127 |
3 files changed, 157 insertions, 3 deletions
diff --git a/games-strategy/vcmi/Manifest b/games-strategy/vcmi/Manifest index b93d072..f626197 100644 --- a/games-strategy/vcmi/Manifest +++ b/games-strategy/vcmi/Manifest @@ -1 +1,2 @@ DIST vcmi-1.5.7.tar.gz 9746146 BLAKE2B 829f88c1dc067d9ab2ff91a82318a1b526bc57732c8e735b636995e9d554ce90c3c0f3367f08bfb98069628d6516c441b18710c884015ee78bd0a80fc5fdc36a SHA512 40148acd6499e8f6cb37bbdaabedc1260ff76da33034c9a4c26a420da2502eff34623c0792a6c7748b7a66bc03aedcd8c3c641079040690f2fa4069034973737 +DIST vcmi-innoextract-9977089412ebafe9f79936aa65a2edf16a84ae3e.tar.gz 205354 BLAKE2B e866bd7c00df15d64f929b5c1060544f3e932537c6071633d3d89b68d51bcedb32812ea45e27961d987b8ea5490b6ef28c051f0f17724483649562bc4d8b9b99 SHA512 d78d70268afcc99badc62e1ac53f7c90add2af8818c34685e6ae505af8c4141024050fc6c861972cb51a696b62e9d368b77572b3c58ec8eddd1d04d5153a010e diff --git a/games-strategy/vcmi/vcmi-1.5.7.ebuild b/games-strategy/vcmi/vcmi-1.5.7.ebuild index 21dc51e..b8b54f3 100644 --- a/games-strategy/vcmi/vcmi-1.5.7.ebuild +++ b/games-strategy/vcmi/vcmi-1.5.7.ebuild @@ -10,11 +10,27 @@ inherit cmake lua-single DESCRIPTION="Heroes of Might and Magic III game engine rewrite" HOMEPAGE="http://forum.vcmi.eu/index.php" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vcmi/vcmi" + EGIT_SUBMODULES=( + "-*" + "innoextract" + ) +else + INNO_SHA="9977089412ebafe9f79936aa65a2edf16a84ae3e" + SRC_URI=" + https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/vcmi/innoextract/archive/${INNO_SHA}.tar.gz -> ${PN}-innoextract-${INNO_SHA}.tar.gz + " + # N.B.: see here for correct commit of innoextract: + #https://github.com/vcmi/vcmi/tree/develop/launcher + KEYWORDS="~amd64 ~x86" +fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~x86" # TODO: other arches IUSE="+editor debug erm +launcher lua +nullkiller-ai +translations" @@ -47,7 +63,8 @@ CDEPEND=" nullkiller-ai? ( dev-cpp/tbb ) sys-libs/zlib:=[minizip] " - + # app-arch/innoextract + # XXX: 👆 vcmi wants it's own patched version to build extractor as library (bruh...) BDEPEND=" >dev-libs/boost-1.70.0 virtual/pkgconfig @@ -63,6 +80,15 @@ RDEPEND=" # games-strategy/vcmi-data # " +src_unpack() { + [[ "${PV}" == *9999* ]] && git-r3_src_unpack + default + [[ "${PV}" == *9999* ]] || { + rmdir "${S}/launcher/lib/innoextract" + mv "${WORKDIR}/innoextract-${INNO_SHA}" "${S}/launcher/lib/innoextract" + } +} + src_configure() { local mycmakeargs=( -DENABLE_ERM=$(usex erm) diff --git a/games-strategy/vcmi/vcmi-9999.ebuild b/games-strategy/vcmi/vcmi-9999.ebuild new file mode 100644 index 0000000..b8b54f3 --- /dev/null +++ b/games-strategy/vcmi/vcmi-9999.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=(luajit) +# TODO: other targets (buildsystem is crazy and needs patches) + +inherit cmake lua-single + +DESCRIPTION="Heroes of Might and Magic III game engine rewrite" +HOMEPAGE="http://forum.vcmi.eu/index.php" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vcmi/vcmi" + EGIT_SUBMODULES=( + "-*" + "innoextract" + ) +else + INNO_SHA="9977089412ebafe9f79936aa65a2edf16a84ae3e" + SRC_URI=" + https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/vcmi/innoextract/archive/${INNO_SHA}.tar.gz -> ${PN}-innoextract-${INNO_SHA}.tar.gz + " + # N.B.: see here for correct commit of innoextract: + #https://github.com/vcmi/vcmi/tree/develop/launcher + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +# TODO: other arches +IUSE="+editor debug erm +launcher lua +nullkiller-ai +translations" + +REQUIRED_USE=" + erm? ( lua ) + lua? ( ${LUA_REQUIRED_USE} ) +" + +CDEPEND=" + media-libs/libsdl2:=[video] + media-libs/sdl2-image:= + media-libs/sdl2-mixer:= + media-libs/sdl2-ttf:= + media-video/ffmpeg:= + launcher? ( + dev-qt/qtgui + dev-qt/qtcore + dev-qt/qtnetwork + dev-qt/qtwidgets + translations? ( dev-qt/linguist-tools ) + ) + editor? ( + dev-qt/qtgui + dev-qt/qtcore + dev-qt/qtnetwork + dev-qt/qtwidgets + translations? ( dev-qt/linguist-tools ) + ) + dev-libs/fuzzylite:= + nullkiller-ai? ( dev-cpp/tbb ) + sys-libs/zlib:=[minizip] +" + # app-arch/innoextract + # XXX: 👆 vcmi wants it's own patched version to build extractor as library (bruh...) +BDEPEND=" + >dev-libs/boost-1.70.0 + virtual/pkgconfig +" +DEPEND=" + ${BDEPEND} + ${CDEPEND} +" +RDEPEND=" + ${CDEPEND} +" +# PDEPEND=" +# games-strategy/vcmi-data +# " + +src_unpack() { + [[ "${PV}" == *9999* ]] && git-r3_src_unpack + default + [[ "${PV}" == *9999* ]] || { + rmdir "${S}/launcher/lib/innoextract" + mv "${WORKDIR}/innoextract-${INNO_SHA}" "${S}/launcher/lib/innoextract" + } +} + +src_configure() { + local mycmakeargs=( + -DENABLE_ERM=$(usex erm) + -DENABLE_LUA=$(usex lua) + -DENABLE_LAUNCHER=$(usex launcher) + -DENABLE_EDITOR=$(usex editor) + -DENABLE_TRANSLATIONS=$(usex translations) + -DENABLE_PCH=$(usex !debug) + -DENABLE_NULLKILLER_AI=$(usex nullkiller-ai) + + -DENABLE_MONOLITHIC_INSTALL=OFF + -DFORCE_BUNDLED_FL=OFF + -DFORCE_BUNDLED_MINIZIP=OFF + -DENABLE_GITVERSION=OFF + -DBoost_NO_BOOST_CMAKE=ON + ) + # export CCACHE_SLOPPINESS="time_macros" + cmake_src_configure +} + +pkg_postinst() { + elog "For the game to work properly, please copy your" + elog 'Heroes Of Might and Magic ("The Wake Of Gods" or' + elog '"Shadow of Death" or "Complete edition")' + elog "game directory into /usr/share/${PN}." + elog "or use 'vcmibuilder' utility on your:" + elog " a) One or two CD's or CD images" + elog " b) gog.com installer" + elog " c) Directory with installed game" + elog "(although installing it in such way is 'bad practices')." + elog "For more information, please visit:" + elog "http://wiki.vcmi.eu/index.php?title=Installation_on_Linux" + elog "" + elog "Also, you may want to install VCMI Extras and Wake of Gods" + elog "mods from the launcher after you'll start the game" +} |