ChangeLog

# ChangeLog for games-strategy/heroes3
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/heroes3/ChangeLog,v 1.19 2008/03/12 19:29:16 mr_bones_ Exp $

12 Mar 2008; Michael Sterrett
heroes3-1.3.1a-r2.ebuild:
more quoting (bug #213179)

11 Mar 2008; Chris Gianelloni
-heroes3-1.3.1a-r1.ebuild, heroes3-1.3.1a-r2.ebuild:
Removed the older ebuild and marked the newer one stable as it's been in the
tree for over a year and doing some minor quoting cleanups.

29 Feb 2008; Carsten Lohrke heroes3-1.3.1a-r1.ebuild,
heroes3-1.3.1a-r2.ebuild:
Remove icon extension from desktop entry to match Icon Theme Specification.

15 Jan 2008; Samuli Suominen heroes3-1.3.1a-r2.ebuild:
change dev-util/xdelta dep. to =dev-util/xdelta-1*

12 Mar 2007; Marius Mauch heroes3-1.3.1a-r1.ebuild,
heroes3-1.3.1a-r2.ebuild:
Replacing einfo with elog

07 Mar 2007; Chris Gianelloni
heroes3-1.3.1a-r2.ebuild:
Change all instances of [ to [[.

24 Oct 2006; Chris Gianelloni
heroes3-1.3.1a-r2.ebuild:
Moved cdrom_get_cds to src_unpack since binary packages don't require the
original media to install.

*heroes3-1.3.1a-r2 (05 Oct 2006)

05 Oct 2006; Chris Gianelloni
+files/heroes3-wrapper.sh, +heroes3-1.3.1a-r2.ebuild:
Added wrapper to allow us to write out some temp files. Wrapper by Alex
Linke . Closing bug #93604.

17 Apr 2006; Chris Gianelloni
heroes3-1.3.1a-r1.ebuild:
Moved games_pkg_setup to beginning of pkg_setup and changed to use
GAMES_CHECK_LICENSE.

31 Mar 2006; Chris Gianelloni
heroes3-1.3.1a-r1.ebuild:
Changed nostrip to strip.

27 Mar 2006; Chris Gianelloni
heroes3-1.3.1a-r1.ebuild:
Moved games_pkg_postinst to beginning of pkg_postinst.

21 Oct 2005; Chris Gianelloni
heroes3-1.3.1a-r1.ebuild:
Added addition dir variable to games_make_wrapper for bug #109793.

27 Sep 2005; Chris Gianelloni
heroes3-1.3.1a-r1.ebuild:
Changed to use new lokigames mirror:// setup.

21 Sep 2005; Chris Gianelloni
heroes3-1.3.1a-r1.ebuild:
Changed check_license to explicitly list license to check.

25 Mar 2005; Chris Gianelloni
-heroes3-1.3.1a.ebuild, heroes3-1.3.1a-r1.ebuild:
Marking stable on x86 and removing older versions.

05 Mar 2005; Chris Gianelloni
heroes3-1.3.1a-r1.ebuild:
Changed if statement to use proper syntax.

25 Feb 2005; Michael Sterrett
heroes3-1.3.1a-r1.ebuild:
patch from Ron Kracht (bug #83252)

*heroes3-1.3.1a-r1 (22 Feb 2005)

22 Feb 2005; Chris Gianelloni
+heroes3-1.3.1a-r1.ebuild:
Updated to use lib-compat-loki. Ebuild by Alex Linke
and submitted to bug #71044.

*heroes3-1.3.1a (29 Sep 2004)

29 Sep 2004; Chris Gianelloni +metadata.xml,
+heroes3-1.3.1a.ebuild:
Initial import. Ebuild submitted by me. Closing bug #33206.

Manifest

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

AUX heroes3-wrapper.sh 195 RMD160 5ceb0c89041b1640fc38a0aff9833ee3d8b2726b SHA1 f1d84dcee1addb16edc05ea42bf0f3dc770007f8 SHA256 982b2c36a167dd99a6bddc14d13122cf73e306e2711147aa059b1dabb4ae1ae5
DIST heroes3-1.3.1a-cdrom-x86.run 3012188 RMD160 dafa394c5f63bb3cac5bb65e244fdeaa626b6e70 SHA1 72c23f6eab8505dc561337ce06e49b690a4a6627 SHA256 f87d78e09278e2f05cb15e2f79dfeaae2cef8fb147b83185dd4f818c0ab7759e
DIST heroes3-1.3.1a-ppc.run 2643068 RMD160 741ba7c3a9005a38895dd84e02595be75678d7da SHA1 e52fd2f487edfa5650c93f85782654f10513f016 SHA256 b14eeb8eef705b20dbf54eb308b2232d6110f4ec568cb82d9ea9fb7f9cca3137
EBUILD heroes3-1.3.1a-r2.ebuild 5763 RMD160 b6fd5b44ba1450518b9fcb3aabfa9bdb154ef6f6 SHA1 e56681b23cab792b861be12254df604bb59591b6 SHA256 110541c85dffb997bb4a8ea45e1426d971166ff609fc4d3393ad8b7db471e491
MISC ChangeLog 3292 RMD160 841b6a09b662d3c19b3597804a79f1e016645a06 SHA1 e38f9aa8654f54bce5edbe4018062dd6e4c48805 SHA256 0f662be3625e2d885d2a23cc3a4139a2688fb9a246a6257e89bec9c11edec436
MISC metadata.xml 254 RMD160 877a1dc36df2be58926bc51041093feafdefe429 SHA1 45f0334cd127c4a1b4ece41f7098ab70046e378a SHA256 2916aab684ec3908fffb515065eeb2c481cde563380b682646add582bed5f535
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkgsNr0ACgkQdz7hIScOURFdJwCfey7l1oDJOvzs802e3Uj+RgjW
NG0AnicmnsqbPpVF+uFSkFW+YXsyPDgp
=gXEf
-----END PGP SIGNATURE-----

files

heroes3-1.3.1a-r2.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild,v 1.11 2008/05/15 13:12:23 nyhm Exp $

# [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

LANGS="de es pl"
LANGPACKPREFIX="${PN}-lang"
LANGPACKBASE="http://babelize.org/download/"
LANGPACKPATHPREFIX="${LANGPACKBASE}/${LANGPACKPREFIX}"
LANGPACKVERSION=1.0.4

inherit eutils 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 )
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="~ppc x86"
RESTRICT="strip"

DEPEND="=dev-util/xdelta-1*
games-util/loki_patch"
RDEPEND="!ppc? ( sys-libs/lib-compat-loki )"

S=${WORKDIR}

GAMES_CHECK_LICENSE="yes"
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 && 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} || die "copying data"
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 "unpacking hiscore"

cd "${S}"
loki_patch --verify patch.dat
loki_patch patch.dat "${Ddir}" >& /dev/null || die "patching"

# 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 || die "dosym"
dosym /usr/lib/loki_libc.so.6 "${dir}"/libc.so.6 || die "dosym"
dosym /usr/lib/loki_libnss_files.so.2 "${dir}"/libnss_files.so.2 \
|| die "dosym failed"
fi

elog "Changing 'hiscore.dat' to be writeable for group 'games'."
fperms g+w "${dir}/data/hiscore.dat" || die "fperms failed"

# 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 "copying wrapper failed"
sed -i -e "s:GAMES_PREFIX_OPT:${GAMES_PREFIX_OPT}:" "${T}"/heroes3 ||
die "sed failed"
dogamesbin "${T}"/heroes3 || die "doexe failed"

}

pkg_postinst() {
games_pkg_postinst
elog "To play the game run:"
elog " heroes3"
}

metadata.xml




games

wolf31o2@gentoo.org
Chris Gianelloni