2015-02-10 15:10:04 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2012-02-06 16:39:49 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-11 00:17:55 +03:00
|
|
|
# $Id$
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2013-02-01 09:13:46 +04:00
|
|
|
EAPI=5
|
|
|
|
inherit autotools eutils flag-o-matic gnome2-utils games
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2013-02-01 09:13:46 +04:00
|
|
|
levels_V=20120815
|
|
|
|
themes_V=20111026
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
DESCRIPTION="Breakout clone written with the SDL library"
|
|
|
|
HOMEPAGE="http://lgames.sourceforge.net/index.php?project=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"
|
2015-02-21 21:52:13 +03:00
|
|
|
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
|
2012-02-06 16:39:49 +04:00
|
|
|
IUSE="nls themes"
|
|
|
|
|
2013-02-01 09:13:46 +04:00
|
|
|
RDEPEND="media-libs/libpng:0
|
2012-02-06 16:39:49 +04:00
|
|
|
sys-libs/zlib
|
2014-05-16 12:23:09 +04:00
|
|
|
media-libs/libsdl[sound,joystick,video]
|
2012-02-06 16:39:49 +04:00
|
|
|
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
|
2013-02-01 09:13:46 +04:00
|
|
|
unzip -q "$f" && rm -f "$f" || die
|
2012-02-06 16:39:49 +04:00
|
|
|
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() {
|
2013-02-01 09:13:46 +04:00
|
|
|
default
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
if use themes ; then
|
|
|
|
insinto "${GAMES_DATADIR}/lbreakout2/gfx"
|
2013-02-01 09:13:46 +04:00
|
|
|
doins -r "${WORKDIR}/themes/"*
|
2012-02-06 16:39:49 +04:00
|
|
|
fi
|
|
|
|
|
2013-02-01 09:13:46 +04:00
|
|
|
newicon client/gfx/win_icon.png ${PN}.png
|
|
|
|
newicon -s 32 client/gfx/win_icon.png ${PN}.png
|
2012-02-06 16:39:49 +04:00
|
|
|
make_desktop_entry lbreakout2 LBreakout2
|
|
|
|
|
|
|
|
prepgamesdirs
|
|
|
|
}
|
2013-02-01 09:13:46 +04:00
|
|
|
|
|
|
|
pkg_preinst() {
|
|
|
|
games_pkg_preinst
|
|
|
|
gnome2_icon_savelist
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
games_pkg_postinst
|
|
|
|
gnome2_icon_cache_update
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postrm() {
|
|
|
|
gnome2_icon_cache_update
|
|
|
|
}
|