You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.0 KiB
93 lines
2.0 KiB
6 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
8 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=6
|
||
|
inherit autotools desktop flag-o-matic gnome2-utils
|
||
8 years ago
|
|
||
|
levels_V=20141220
|
||
|
themes_V=20141220
|
||
|
|
||
|
DESCRIPTION="Breakout clone written with the SDL library"
|
||
7 years ago
|
HOMEPAGE="http://lgames.sourceforge.net/LBreakout2/"
|
||
8 years ago
|
SRC_URI=" mirror://sourceforge/lgames/${P}.tar.gz
|
||
|
mirror://sourceforge/lgames/add-ons/lbreakout2/${PN}-levelsets-${levels_V}.tar.gz
|
||
|
themes? ( mirror://sourceforge/lgames/add-ons/lbreakout2/${PN}-themes-${levels_V}.tar.gz )"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
|
||
8 years ago
|
IUSE="nls themes"
|
||
|
|
||
6 years ago
|
RDEPEND="
|
||
|
media-libs/libpng:0=
|
||
8 years ago
|
sys-libs/zlib
|
||
|
media-libs/libsdl[sound,joystick,video]
|
||
|
media-libs/sdl-net
|
||
|
media-libs/sdl-mixer
|
||
6 years ago
|
nls? ( virtual/libintl )
|
||
|
"
|
||
8 years ago
|
DEPEND="${RDEPEND}
|
||
6 years ago
|
nls? ( sys-devel/gettext )
|
||
|
"
|
||
8 years ago
|
|
||
|
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() {
|
||
6 years ago
|
default
|
||
|
eapply "${FILESDIR}"/${P}-gentoo.patch
|
||
8 years ago
|
eautoreconf
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
filter-flags -O?
|
||
6 years ago
|
econf \
|
||
8 years ago
|
--enable-sdl-net \
|
||
|
--localedir=/usr/share/locale \
|
||
|
--with-docdir="/usr/share/doc/${PF}/html" \
|
||
|
$(use_enable nls)
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
default
|
||
|
|
||
|
if use themes ; then
|
||
6 years ago
|
insinto /usr/share/lbreakout2/gfx
|
||
8 years ago
|
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
|
||
|
}
|
||
|
|
||
|
pkg_preinst() {
|
||
|
gnome2_icon_savelist
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
gnome2_icon_cache_update
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
gnome2_icon_cache_update
|
||
|
}
|