summaryrefslogtreecommitdiff
blob: f8785bc5a12a3b751b662df7b51bf5bef6bdee4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit eutils games multilib

DESCRIPTION="Postal 2: Share the Pain - Free Multiplayer Edition"
HOMEPAGE="http://icculus.org/news/news.php?id=4419"
SRC_URI="http://0day.icculus.org/postal2/Postal2STP-FreeMP-linux.tar.bz2 -> ${P}.tar.bz2"

LICENSE="postal2stp-freemp"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RESTRICT="strip"
PROPERTIES="interactive"

RDEPEND="virtual/opengl
	amd64? ( app-emulation/emul-linux-x86-sdl )
	x86? (
		media-libs/libsdl[X,opengl]
		media-libs/openal
	)"

GAMES_CHECK_LICENSE="yes"

S=${WORKDIR}/Postal2STP-FreeMP-linux

src_install() {
	has_multilib_profile && ABI=x86

	dir=${GAMES_PREFIX_OPT}/${PN}

	insinto "${dir}"
	doins -r Animations KarmaData Maps Music Sounds \
		 StaticMeshes System Textures Web || die "doins failed"
	dosym /usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so || die
	dosym /usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0 || die

	fperms +x "${dir}"/System/postal2-bin || die "fperms failed"

	games_make_wrapper ${PN} ./postal2-bin "${dir}"/System .
	newicon postal2.xpm ${PN}.xpm || die
	make_desktop_entry ${PN} "Postal 2 (Free MultiPlayer Ed.)"

	prepgamesdirs
}