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.
72 lines
1.4 KiB
72 lines
1.4 KiB
7 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
7 years ago
|
EAPI=6
|
||
|
inherit desktop
|
||
13 years ago
|
|
||
|
MY_OGG=danslatristesse2-48.ogg
|
||
|
DESCRIPTION="3D tabletennis game"
|
||
|
HOMEPAGE="http://cannonsmash.sourceforge.net/"
|
||
|
SRC_URI="mirror://sourceforge/${PN}/csmash-${PV}.tar.gz
|
||
|
vorbis? ( http://nan.p.utmc.or.jp/${MY_OGG} )"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
13 years ago
|
IUSE="vorbis nls"
|
||
|
|
||
7 years ago
|
RDEPEND="
|
||
|
virtual/opengl
|
||
13 years ago
|
virtual/glu
|
||
11 years ago
|
media-libs/libsdl[sound,video]
|
||
13 years ago
|
media-libs/sdl-mixer[vorbis?]
|
||
|
media-libs/sdl-image[jpeg,png]
|
||
|
x11-libs/gtk+:2
|
||
7 years ago
|
nls? ( virtual/libintl )
|
||
|
"
|
||
13 years ago
|
DEPEND="${RDEPEND}
|
||
13 years ago
|
virtual/pkgconfig
|
||
7 years ago
|
nls? ( sys-devel/gettext )
|
||
|
"
|
||
13 years ago
|
|
||
7 years ago
|
S="${WORKDIR}/csmash-${PV}"
|
||
13 years ago
|
|
||
|
src_unpack() {
|
||
|
unpack csmash-${PV}.tar.gz
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
7 years ago
|
default
|
||
|
eapply \
|
||
13 years ago
|
"${FILESDIR}"/${P}-x-inc.patch \
|
||
|
"${FILESDIR}"/${P}-sizeof-cast.patch \
|
||
|
"${FILESDIR}"/${P}-gcc41.patch \
|
||
12 years ago
|
"${FILESDIR}"/${P}-flags.patch
|
||
13 years ago
|
if use vorbis ; then
|
||
|
sed -i \
|
||
7 years ago
|
-e "s:${MY_OGG}:/usr/share/csmash/games/${MY_OGG}:" ttinc.h \
|
||
13 years ago
|
|| die "sed failed"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
7 years ago
|
econf \
|
||
13 years ago
|
$(use_enable nls) \
|
||
7 years ago
|
--datadir="/usr/share"
|
||
13 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake \
|
||
10 years ago
|
localedir="/usr/share"
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
10 years ago
|
default
|
||
13 years ago
|
if use vorbis ; then
|
||
7 years ago
|
insinto /usr/share/games/csmash
|
||
10 years ago
|
doins "${DISTDIR}"/${MY_OGG}
|
||
13 years ago
|
fi
|
||
|
newicon win32/orange.ico ${PN}.ico
|
||
|
make_desktop_entry csmash "Cannon Smash" /usr/share/pixmaps/${PN}.ico
|
||
|
}
|