diff options
Diffstat (limited to 'games-strategy/homm2-gold-gog')
-rw-r--r-- | games-strategy/homm2-gold-gog/Manifest | 4 | ||||
-rw-r--r-- | games-strategy/homm2-gold-gog/homm2-gold-gog-1.1.2.1.33438.ebuild | 73 | ||||
-rw-r--r-- | games-strategy/homm2-gold-gog/metadata.xml | 16 |
3 files changed, 93 insertions, 0 deletions
diff --git a/games-strategy/homm2-gold-gog/Manifest b/games-strategy/homm2-gold-gog/Manifest new file mode 100644 index 000000000000..6daf2858a331 --- /dev/null +++ b/games-strategy/homm2-gold-gog/Manifest @@ -0,0 +1,4 @@ +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 +EBUILD homm2-gold-gog-1.1.2.1.33438.ebuild 1977 BLAKE2B 5c452de92a83499b820d703b520de29b5a4cc4e68ada18b4f7d68877d0e70e1851e7e0e9500019452cb18b83b0c1e395cd50eacd21b6636cb235aa01664d822f SHA512 2aa897efaea24b1e2fac26605f52b6bf0bd2ca8cb9daa2f423d19990481c999125eeb143e6c66185d6b3b2124490e821577edb300022805eca17507119fa1bba +MISC metadata.xml 518 BLAKE2B fba57dea48cf34834a98d45b6562b2a736357e0cde55c389a6d77c843eacfd11afea73f0e11d34997f4f8c7476f8c4c1bf3b73b287462e104eb9bd98ae152573 SHA512 5c75aea0977d0f4f2c1bea36a17ed12531d6537f6b4d597928eed3ac244a02ad17bbe07f45dbc43a737b32bcdfbf91cfa035fcff1e5231cb987802a11aed9bae diff --git a/games-strategy/homm2-gold-gog/homm2-gold-gog-1.1.2.1.33438.ebuild b/games-strategy/homm2-gold-gog/homm2-gold-gog-1.1.2.1.33438.ebuild new file mode 100644 index 000000000000..d4d93866acd7 --- /dev/null +++ b/games-strategy/homm2-gold-gog/homm2-gold-gog-1.1.2.1.33438.ebuild @@ -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" +} diff --git a/games-strategy/homm2-gold-gog/metadata.xml b/games-strategy/homm2-gold-gog/metadata.xml new file mode 100644 index 000000000000..b527e33f3679 --- /dev/null +++ b/games-strategy/homm2-gold-gog/metadata.xml @@ -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> |