forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lbreakout2-2.6.4.ebuild
92 lines (74 loc) · 1.98 KB
/
lbreakout2-2.6.4.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit autotools eutils flag-o-matic gnome2-utils games
levels_V=20120815
themes_V=20111026
DESCRIPTION="Breakout clone written with the SDL library"
HOMEPAGE="http://lgames.sourceforge.net/LBreakout2/"
SRC_URI=" mirror://sourceforge/lgames/${P}.tar.gz
mirror://sourceforge/lgames/${PN}-levelsets-${levels_V}.tar.gz
themes? ( mirror://sourceforge/lgames/${PN}-themes-${themes_V}.tar.gz )"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86 ~x86-fbsd"
IUSE="nls themes"
RDEPEND="media-libs/libpng:0
sys-libs/zlib
media-libs/libsdl[sound,joystick,video]
media-libs/sdl-net
media-libs/sdl-mixer
nls? ( virtual/libintl )"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )"
src_unpack() {
unpack ${P}.tar.gz
cd "${S}/client/levels"
unpack ${PN}-levelsets-${levels_V}.tar.gz
if use themes ; then
mkdir "${WORKDIR}/themes"
cd "${WORKDIR}/themes"
unpack ${PN}-themes-${themes_V}.tar.gz
# Delete a few duplicate themes (already shipped with lbreakout2
# tarball). Some of them have different case than built-in themes, so it
# is harder to just compare if the filename is the same.
rm -f absoluteB.zip oz.zip moiree.zip
for f in *.zip; do
unzip -q "$f" && rm -f "$f" || die
done
fi
}
src_prepare() {
epatch "${FILESDIR}"/${P}-gentoo.patch
eautoreconf
}
src_configure() {
filter-flags -O?
egamesconf \
--enable-sdl-net \
--localedir=/usr/share/locale \
--with-docdir="/usr/share/doc/${PF}/html" \
$(use_enable nls)
}
src_install() {
default
if use themes ; then
insinto "${GAMES_DATADIR}/lbreakout2/gfx"
doins -r "${WORKDIR}/themes/"*
fi
newicon client/gfx/win_icon.png ${PN}.png
newicon -s 32 client/gfx/win_icon.png ${PN}.png
make_desktop_entry lbreakout2 LBreakout2
prepgamesdirs
}
pkg_preinst() {
games_pkg_preinst
gnome2_icon_savelist
}
pkg_postinst() {
games_pkg_postinst
gnome2_icon_cache_update
}
pkg_postrm() {
gnome2_icon_cache_update
}