forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dangerdeep-0.3.0.ebuild
63 lines (50 loc) · 1.35 KB
/
dangerdeep-0.3.0.ebuild
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils scons-utils games
DESCRIPTION="a World War II German submarine simulation"
HOMEPAGE="http://dangerdeep.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
mirror://sourceforge/${PN}/${PN}-data-${PV}.zip"
LICENSE="GPL-2 CC-BY-NC-ND-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="cpu_flags_x86_sse debug"
RDEPEND="virtual/opengl
virtual/glu
sci-libs/fftw:3.0
media-libs/libsdl[joystick,opengl,video]
media-libs/sdl-mixer[vorbis]
media-libs/sdl-image[jpeg,png]
media-libs/sdl-net"
DEPEND="${RDEPEND}
app-arch/unzip"
src_prepare() {
epatch \
"${FILESDIR}"/${P}-build.patch \
"${FILESDIR}"/${P}-gcc43.patch \
"${FILESDIR}"/${P}-gcc47.patch \
"${FILESDIR}"/${P}-gcc44.patch \
"${FILESDIR}"/${P}-gcc6.patch
sed -i -e "/console_log.txt/ s:fopen.*:stderr;:" src/system.cpp || die
}
src_compile() {
local sse=-1
if use cpu_flags_x86_sse ; then
use amd64 && sse=3 || sse=1
fi
escons \
usex86sse=${sse} \
datadir="${GAMES_DATADIR}"/${PN} \
$(use_scons debug)
}
src_install() {
dogamesbin build/linux/${PN}
insinto "${GAMES_DATADIR}"/${PN}
doins -r ../data/*
newicon dftd_icon.png ${PN}.png
make_desktop_entry ${PN} "Danger from the Deep"
dodoc ChangeLog CREDITS README
doman doc/man/${PN}.6
prepgamesdirs
}