diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-strategy/heroes3 |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-strategy/heroes3')
-rw-r--r-- | games-strategy/heroes3/Manifest | 7 | ||||
-rw-r--r-- | games-strategy/heroes3/files/heroes3-wrapper.sh | 13 | ||||
-rw-r--r-- | games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild | 208 | ||||
-rw-r--r-- | games-strategy/heroes3/metadata.xml | 13 |
4 files changed, 241 insertions, 0 deletions
diff --git a/games-strategy/heroes3/Manifest b/games-strategy/heroes3/Manifest new file mode 100644 index 000000000000..0e0299688d8d --- /dev/null +++ b/games-strategy/heroes3/Manifest @@ -0,0 +1,7 @@ +AUX heroes3-wrapper.sh 195 SHA256 982b2c36a167dd99a6bddc14d13122cf73e306e2711147aa059b1dabb4ae1ae5 SHA512 ac1871676ffb0c818ddd9dcadad031d3e296982a989dcc91241b2630eb773e341058e1d4406374a21bcc0f6c8caba94398541ddbc540e7c140660838ef3ed0c8 WHIRLPOOL 990180cd2e28edf3b0118ab744964604b6743f42015cc5fe8cdface011a9a1cd83fa60a9977feac851af5fb8126de94dff94bf04f1bf0b958fbf30ad8445a901 +DIST heroes3-1.3.1a-cdrom-x86.run 3012188 SHA256 f87d78e09278e2f05cb15e2f79dfeaae2cef8fb147b83185dd4f818c0ab7759e SHA512 d0cb902386361b17009aece0d0508a0c19683c71acf3abe11a7f50ec2d4710a89cda3f5f9da326b58e9b945da5f62533dea54457e141ce71ebc3e9945dca814d WHIRLPOOL 3f58f6c6a06b2cf5b6e0b090bf4e481428854ee5263391ee85b9c7f1dcfe026a0f5b07f1f4d2c636024370e3c304a488f0fdfd6a6148ad89b40c1e7a42cc10d5 +DIST heroes3-1.3.1a-ppc.run 2643068 SHA256 b14eeb8eef705b20dbf54eb308b2232d6110f4ec568cb82d9ea9fb7f9cca3137 SHA512 3578dbed0ed9fd47f67e6abaec4b4d66628160509e68dc3bea7b5288230e344b5b8f9d380c6a35ffc9d084d0e2a54ce84df72b13bfb609fa4d7edd1456264276 WHIRLPOOL a073ddbb8f871219ea605946cc1ec16e07c888ed0ebb174c59df8e402439db61dbe2c4164e929e7e8b0becb09083078ebfb62e0ec30b88dc5007326cbf687509 +EBUILD heroes3-1.3.1a-r2.ebuild 5511 SHA256 fff1ce53659ca2366ebac0bd258e44caa179f1b52661c1cb9082e1eef4d54be8 SHA512 af0a878e7f93e8ff8cfd193496123fb5325782a59cbb77b841b9f0e03f6abe15420229d2e0e4bcb09d233979bbfe53810d52f46a2a47fa286e7d8549c3a70ccc WHIRLPOOL 6d29ecda4b8cfa89814b97bcb746181a84488f5c46f7d952123e7fdcdd0e9a1ac58d0604ac61dbe0906a77592d1ea073a42209e1528cf69cffc7de0e5c187f41 +MISC ChangeLog 2468 SHA256 e76661a35949c805455fb7025e85dfc86665a499e47c7fd286da181d571c2b0a SHA512 d8223defa86ca0e10e2fdc3983cb72ebc14f9d1b6dcfcdce2e78b59c23fd69faba233b2b8367a44c201cf78f6ef36a710dc7fdf01144273dfcc333f4ef635cf5 WHIRLPOOL 9652aad6f71753b89c1c4a38b88e8ddc123293c627ff85f4d453d0617d72bca72b9616c92e10ba274bd3c953b29185ae426090f3efa623b2b4deea3d24cdf38f +MISC ChangeLog-2015 4252 SHA256 8e998af35de559616d0861f813b65bf3400b61976536af077847906d0dae3ac4 SHA512 c9628e99918f3ab21c5a9b4ef1e62ae63ea6a7c5c1bd12a4ceb664eb193d829aa7b16b23cfecfa2f0a34d4f2bc171cb022f0f12fe69073b042d3b55f4a705ca2 WHIRLPOOL 5399720977f5e71216cd1e6e3d0915ef61e36df35e1c7a17b580d28b57a85fb5da59e7f5f031f53c0931fbace8e5da691d342a0ff81cd134ecb17f9ef14d72f7 +MISC metadata.xml 451 SHA256 c1226a80869984e289b993b0794a61075a9afaee837ddccccfc7a1567af7cacc SHA512 d4b4f5dd75aec49703e77221d3811c20f72405f45f5ac7990e46a8cf8d639f3c53c5bfae13e6615c0a0ac16ee57073c8e92de355f7e1ac934d9be6b90bce6990 WHIRLPOOL 5fb7da0d785aae163d4141d292f7fb3f1343716740cb4fe140c08cb9ee44f1fe1942d080aeb98c201a5de2a0cd95f1fe05f099f2d05d82c1352f2e6d5faa0426 diff --git a/games-strategy/heroes3/files/heroes3-wrapper.sh b/games-strategy/heroes3/files/heroes3-wrapper.sh new file mode 100644 index 000000000000..3847c539ed76 --- /dev/null +++ b/games-strategy/heroes3/files/heroes3-wrapper.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +DIR="${HOME}/.loki/heroes3" + +if [ ! -d "${DIR}" ]; then + echo "* Creating '${DIR}'" + mkdir -p ${DIR} +fi + +# fixes bug #93604 +cd ${DIR} + +exec GAMES_PREFIX_OPT/heroes3/heroes3 ${@} diff --git a/games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild b/games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild new file mode 100644 index 000000000000..2459ec99fb7b --- /dev/null +++ b/games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# [x] Base Install Required (+4 MB) +# [x] Scenarios (+7 MB) +# [x] Sounds and Graphics (+118 MB) +# [x] Music (+65 MB) +# [x] Videos (+147 MB) +# -------------------- +# Total 341 MB + +EAPI=5 +LANGS="de es pl" +LANGPACKPREFIX="${PN}-lang" +LANGPACKBASE="http://babelize.org/download/" +LANGPACKPATHPREFIX="${LANGPACKBASE}/${LANGPACKPREFIX}" +LANGPACKVERSION=1.0.4 + +inherit eutils unpacker cdrom games + +DESCRIPTION="Heroes of Might and Magic III : The Restoration of Erathia - turn-based 2-D medieval combat" +HOMEPAGE="http://www.lokigames.com/products/heroes3/" + +# Since I do not have a PPC machine to test with, I will leave the PPC stuff in +# here so someone else can stabilize loki_setupdb and loki_patch for PPC and +# then KEYWORD this appropriately. +SRC_URI="x86? ( mirror://lokigames/${PN}/${P}-cdrom-x86.run ) + amd64? ( mirror://lokigames/${PN}/${P}-cdrom-x86.run ) + ppc? ( mirror://lokigames/${PN}/${P}-ppc.run )" +# This is commented because the server is unreachable. +# linguas_es? ( ${LANGPACKPATHPREFIX}-es.tar.gz ) +# linguas_de? ( ${LANGPACKPATHPREFIX}-de.tar.gz ) +# linguas_pl? ( ${LANGPACKPATHPREFIX}-pl.tar.gz )" + +# ${LANGPACKBASE}/${PN}-localize-${LANGPACKVERSION}.run + +LICENSE="LOKI-EULA" +SLOT="0" +IUSE="nocd maps music sounds videos" +#linguas_en linguas_es linguas_pl linguas_de" +KEYWORDS="~amd64 x86" +RESTRICT="strip" + +DEPEND="=dev-util/xdelta-1* + games-util/loki_patch" +RDEPEND="!ppc? ( sys-libs/lib-compat-loki )" + +S=${WORKDIR} + +dir=${GAMES_PREFIX_OPT}/${PN} +Ddir=${D}/${dir} + +pkg_setup() { + games_pkg_setup +# strip-linguas en ${LANGS} + + use nocd && fullinstall=1 + use sounds && use videos && use maps && fullinstall=1 + + [[ ${fullinstall} -eq 1 ]] \ + && ewarn "The full installation takes about 341 MB of space!" + +# if [[ -n "${fullinstall}" ]] +# then +# langcount=0 +# for i in ${LINGUAS} +# do +# i="${i/_/-}" +# if [[ ${i} != "en" ]] +# then +# let $((++langcount)) +# if [[ $langcount = 2 ]] +# then +# eerror "Heroes3 only supports one localization at once!" +# die "Localization is only supported when Heroes3 is in a single language!" +# fi +# fi +# done +# else +# for i in ${LINGUAS} +# do +# i="${i/_/-}" +# if [[ ${i} != "en" ]] +# then +# eerror "Full installation (nocd flag or data + video + maps flags) is needed for ${i} language!" +# die "Localization is only supported when Heroes3 is fully locally installed!" +# fi +# done +# fi +} + +src_unpack() { + cdrom_get_cds hiscore.tar.gz + (use x86 || use amd64) && unpack_makeself ${P}-cdrom-x86.run + use ppc && unpack_makeself ${P}-ppc.run + +# for i in ${LINGUAS} +# do +# i="${i/_/-}" +# if [[ ${i} != "en" ]] +# then +# mkdir localize +# cd localize +## unpack_makeself ${PN}-localize-${LANGPACKVERSION}.run +# unpack ${LANGPACKPREFIX}-${i}.tar.gz +# break +# fi +# done +} + +src_install() { + exeinto "${dir}" + insinto "${dir}" + einfo "Copying files... this may take a while..." + doexe "${CDROM_ROOT}"/bin/x86/${PN} + doins "${CDROM_ROOT}"/{Heroes_III_Tutorial.pdf,README,icon.{bmp,xpm}} + + if use nocd + then + doins -r "${CDROM_ROOT}"/{data,maps,mp3} + else + if use maps + then + doins -r "${CDROM_ROOT}"/maps + fi + if use music + then + doins -r "${CDROM_ROOT}"/mp3 + fi + if use sounds + then + insinto "${dir}"/data + doins "${CDROM_ROOT}"/data/{*.lod,*.snd} + fi + if use videos + then + doins -r "${CDROM_ROOT}"/data/video + fi + fi + +# if [[ -n "${fullinstall}" ]] +# then +# for i in ${LINGUAS} +# do +# i="${i/_/-}" +# if [[ ${i} != "en" ]] +# then +# find "${S}/localize/${i}" -type f | while read xfile +# do +# local file=$(echo "${xfile}" | \ +# sed "s#^${S}/localize/${i}/##;s#\.xdelta\$##") +# ebegin "Localizing ${file}" +# xdelta patch "${xfile}" "${Ddir}/${file}" "${Ddir}/${file}.xdp" +# local retval=$? +# if [[ $retval = 0 ]] +# then +# mv -f "${Ddir}/${file}.xdp" "${Ddir}/${file}" +# else +# rm -f "${Ddir}/${file}.xdp" +# fi +# eend $retval "File $file could not be localized/patched! Original english version untouched..." +# done +# break +# fi +# done +# fi + + tar zxf "${CDROM_ROOT}"/hiscore.tar.gz -C "${Ddir}" || die + + cd "${S}" + loki_patch --verify patch.dat + loki_patch patch.dat "${Ddir}" >& /dev/null || die + + # now, since these files are coming off a cd, the times/sizes/md5sums wont + # be different ... that means portage will try to unmerge some files (!) + # we run touch on ${D} so as to make sure portage doesnt do any such thing + find "${Ddir}" -exec touch '{}' \; + + newicon "${CDROM_ROOT}"/icon.xpm heroes3.xpm + + prepgamesdirs + make_desktop_entry heroes3 "Heroes of Might and Magic III" "heroes3" + + if ! use ppc + then + einfo "Linking libs provided by 'sys-libs/lib-compat-loki' to '${dir}'." + dosym /lib/loki_ld-linux.so.2 "${dir}"/ld-linux.so.2 + dosym /usr/lib/loki_libc.so.6 "${dir}"/libc.so.6 + dosym /usr/lib/loki_libnss_files.so.2 "${dir}"/libnss_files.so.2 + fi + + elog "Changing 'hiscore.dat' to be writeable for group 'games'." + fperms g+w "${dir}/data/hiscore.dat" + + # in order to play campaign games, put this wrapper in place. + # it changes CWD to a user-writeable directory before executing heroes3. + # (fixes bug #93604) + einfo "Preparing wrapper." + cp "${FILESDIR}"/heroes3-wrapper.sh "${T}"/heroes3 || die + sed -i -e "s:GAMES_PREFIX_OPT:${GAMES_PREFIX_OPT}:" "${T}"/heroes3 || die + dogamesbin "${T}"/heroes3 +} + +pkg_postinst() { + games_pkg_postinst + elog "To play the game run:" + elog " heroes3" +} diff --git a/games-strategy/heroes3/metadata.xml b/games-strategy/heroes3/metadata.xml new file mode 100644 index 000000000000..5ae90d93661b --- /dev/null +++ b/games-strategy/heroes3/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <use> + <flag name="maps">Installs optional map data</flag> + <flag name="music">Installs optional music data</flag> + <flag name="sounds">Installs optional sound data</flag> + </use> +</pkgmetadata> |