games-fps/freedm: Drop old 0.11.3-r1
[gentoo.git] / games-fps / legends / legends-0.4.1.43-r2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit eutils unpacker
6
7 MY_P=${PN}_linux-${PV}
8 dir=/opt/${PN}
9
10 DESCRIPTION="Fast-paced first-person-shooter online multiplayer game, similar to Tribes"
11 HOMEPAGE="http://legendsthegame.net/"
12 SRC_URI="http://legendsthegame.net/files/${MY_P}.run
13         mirror://gentoo/${PN}.png"
14
15 LICENSE="Legends LGPL-2.1+"
16 SLOT="0"
17 KEYWORDS="-* ~amd64 ~x86"
18 IUSE="+dedicated"
19 RESTRICT="strip"
20
21 QA_TEXTRELS="${dir:1}/libSDL-1.3.so.0"
22 QA_FLAGS_IGNORED="${dir:1}/libSDL-1.3.so.0 ${dir:1}/LinLegends ${dir:1}/lindedicated"
23
24 DEPEND=""
25 RDEPEND="sys-libs/glibc
26         amd64? ( sys-libs/glibc[multilib] )
27         media-fonts/font-adobe-75dpi
28         media-libs/libsdl[video,sound,opengl,abi_x86_32(-)]
29         x11-libs/libX11[abi_x86_32(-)]
30         x11-libs/libXext[abi_x86_32(-)]
31         media-libs/libogg[abi_x86_32(-)]
32         media-libs/libvorbis[abi_x86_32(-)]
33         media-libs/openal[abi_x86_32(-)]"
34
35 S=${WORKDIR}
36
37 src_unpack() {
38         unpack_makeself ${MY_P}.run
39         cd "${S}"
40
41         # keep libSDL-1.3.so because legends requires it as of 0.4.0, and
42         # 1.2.6 is highest in portage
43         # rm libSDL-*.so*
44         rm runlegends libSDL-1.2.so.0 libopenal.so libogg.so.0 libvorbis.so.0 *.DLL || die
45 }
46
47 src_install() {
48         insinto "${dir}"
49         doins -r * || die "doins * failed"
50
51         rm "${D}/${dir}/"/{lindedicated,LinLegends,*.so.0}
52         exeinto "${dir}"
53         doexe lindedicated LinLegends *.so.0 || die "doexe failed"
54
55         make_wrapper ${PN} "./LinLegends" "${dir}" "${dir}"
56         if use dedicated ; then
57                 make_wrapper ${PN}-ded "./lindedicated" "${dir}" "${dir}"
58         fi
59
60         doicon "${DISTDIR}"/${PN}.png || die "doicon failed"
61         make_desktop_entry legends "Legends"
62 }
63
64 pkg_postinst() {
65         ewarn "Version ${PV} of ${PN} may give problems if there are"
66         ewarn "config-files from earlier versions.  Removing the ~/.legends dir"
67         ewarn "and restarting will solve this."
68         echo
69 }