Use https by default
[gentoo.git] / games-action / cs2d / cs2d-0127.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit eutils games
8
9 DESCRIPTION="Counter-Strike 2D is freeware clone of Counter-Strike with some added features in gameplay"
10 HOMEPAGE="http://www.cs2d.com/"
11 SRC_URI="https://dev.gentoo.org/~maksbotan/cs2d/cs2d_${PV}_linux.zip
12         https://dev.gentoo.org/~maksbotan/cs2d/cs2d_${PV}_win.zip
13         https://dev.gentoo.org/~maksbotan/cs2d/cs2d.png"
14 LICENSE="freedist"
15
16 SLOT="0"
17 KEYWORDS="-* ~amd64 ~x86"
18 IUSE=""
19
20 DEPEND="app-arch/unzip"
21 RDEPEND="
22         x86? (
23                 media-libs/openal
24                 media-libs/freetype:2
25                 x11-libs/libX11
26                 x11-libs/libXxf86vm
27                 virtual/opengl
28         )
29         amd64? (
30                 >=media-libs/openal-1.15.1[abi_x86_32(-)]
31                 >=virtual/opengl-7.0-r1[abi_x86_32(-)]
32                 >=media-libs/freetype-2.5.0.1:2[abi_x86_32(-)]
33                 >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
34                 >=x11-libs/libXxf86vm-1.1.3[abi_x86_32(-)]
35         )"
36
37 QA_PREBUILT="opt/cs2d/CounterStrike2D"
38
39 S=${WORKDIR}
40
41 src_prepare() {
42         # removing windows files
43         rm -f *.exe *.bat || die
44
45         # OpenAL is default sound driver
46         sed -i \
47                 -e 's:^sounddriver.*$:sounddriver OpenAL Default:' \
48                 sys/config.cfg || die
49 }
50
51 src_install() {
52         insinto "${GAMES_PREFIX_OPT}"/${PN}
53         doins -r .
54         # avoid file collision with untracked file
55         rm -f "${ED%/}/${GAMES_PREFIX_OPT}"/${PN}/sys/core/started.cfg
56
57         make_desktop_entry CounterStrike2D "Counter Strike 2D"
58         make_desktop_entry "CounterStrike2D -fullscreen -24bit" "Counter Strike 2D - FULLSCREEN"
59         games_make_wrapper CounterStrike2D ./CounterStrike2D \
60                 "${GAMES_PREFIX_OPT}"/${PN} "${GAMES_PREFIX_OPT}"/${PN}
61
62         doicon "${DISTDIR}"/${PN}.png
63
64         prepgamesdirs
65
66         # fixing permissions
67         fperms -R g+w "${GAMES_PREFIX_OPT}"/${PN}/maps
68         fperms -R g+w "${GAMES_PREFIX_OPT}"/${PN}/screens
69         fperms -R g+w "${GAMES_PREFIX_OPT}"/${PN}/sys
70         fperms ug+x "${GAMES_PREFIX_OPT}"/${PN}/CounterStrike2D
71 }