mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
games-strategy/homm2-gold-gog: new package, add 1.1.2.1.33438
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org> Closes: https://github.com/gentoo/gentoo/pull/31222 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
committed by
James Le Cuirot
parent
59b10cdb24
commit
9603c7f75f
2
games-strategy/homm2-gold-gog/Manifest
Normal file
2
games-strategy/homm2-gold-gog/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST homm_2_ost_flac.zip 350318438 BLAKE2B d87dd7a97a74c28f6f6f969d7c46e9a8f8a8db8222f1d8ca9e9e0c28a5848bef257c4eaabc8148d0c0b1828103a3c4091f041111f8f94f33ce378e75df1d93e1 SHA512 41bbd3578ca7d0e19a6a0346740af3386c6349c1ed198b9315d53c8e2166d1f9add5d58e217028131d5f2227ec81ad044b4bf22b6a14b96e050d05f7af65584f
|
||||
DIST setup_heroes_of_might_and_magic_2_gold_1.01_(2.1)_(33438).exe 489016360 BLAKE2B 17d77c8d2448eec94febd4d7a3a03fbeed97d5af77f7eb2f5c48ef3999df546bdc3ab403e3f151902907e05e16d3cf8fc5a12845e76c52f39eaaa343aab7fe05 SHA512 60d3ab715dbfeb32cf4b9b033d97bf557cceefd0c1ecb2004aef3379bc209d533ca0e4f9ef14658e0c8bd6353ea14f12a58808b5cae1c922256d26b86938aa4a
|
||||
@@ -0,0 +1,73 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Data files for HoMM II Gold from gog.com"
|
||||
HOMEPAGE="https://www.gog.com/en/game/heroes_of_might_and_magic_2_gold_edition"
|
||||
SRC_URI="
|
||||
setup_heroes_of_might_and_magic_2_gold_1.01_(2.1)_(33438).exe
|
||||
flac? ( homm_2_ost_flac.zip )
|
||||
"
|
||||
|
||||
LICENSE="GOG-EULA"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="flac"
|
||||
RESTRICT="bindist fetch"
|
||||
|
||||
DEPEND="games-engines/fheroes2"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
!games-strategy/homm2-demo
|
||||
"
|
||||
BDEPEND="
|
||||
app-arch/innoextract
|
||||
flac? ( app-arch/unzip )
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_nofetch() {
|
||||
einfo "Please buy and download ${SRC_URI} from:"
|
||||
einfo " ${HOMEPAGE}"
|
||||
einfo "and move it to your distfiles directory."
|
||||
}
|
||||
|
||||
src_install() {
|
||||
mkdir -p "${ED}/usr/share/fheroes2/" || die
|
||||
"${ESYSROOT}"/usr/share/fheroes2/extract_homm2_resources.sh \
|
||||
"${DISTDIR}"/setup_heroes*.exe \
|
||||
"${ED}/usr/share/fheroes2/" || die
|
||||
chmod -R a+r "${ED}/usr/share/fheroes2/anim" || die
|
||||
|
||||
if use flac; then
|
||||
rm -r "${ED}/usr/share/fheroes2/music" || die
|
||||
cd homm_2_ost_flac || die
|
||||
# This abomination is loosely based on
|
||||
# https://github.com/ihhub/fheroes2/blob/48c4740e9349c04209a204b9627ebd174a5051e5/script/homm2/resource_extraction_toolset.ps1#L52
|
||||
for ((i=1; i<=43; i++)); do
|
||||
local ii="$(printf "%.2d" "${i}")"
|
||||
local filename="$(echo *${ii}*)"
|
||||
local extension="${filename##*.}"
|
||||
if ((i>=5 && i<=10)); then
|
||||
insinto /usr/share/fheroes2/music/sw
|
||||
newins "${filename}" "Track${ii}.${extension}"
|
||||
|
||||
local pol=$((i+39))
|
||||
local polfile=$(echo *${pol}*)
|
||||
local polext="${polfile##*.}"
|
||||
insinto /usr/share/fheroes2/music/pol
|
||||
newins "${polfile}" "Track${ii}.${polext}"
|
||||
else
|
||||
insinto /usr/share/fheroes2/music
|
||||
newins "${filename}" "Track${ii}.${extension}"
|
||||
fi
|
||||
done
|
||||
cp "${ED}"/usr/share/fheroes2/music/pol/* "${ED}"/usr/share/fheroes2/music/ || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Run the game using ${EPREFIX}/usr/bin/fheroes2"
|
||||
}
|
||||
16
games-strategy/homm2-gold-gog/metadata.xml
Normal file
16
games-strategy/homm2-gold-gog/metadata.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>alexey+gentoo@asokolov.org</email>
|
||||
<name>Alexey Sokolov</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>games@gentoo.org</email>
|
||||
<name>Gentoo Games Project</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user