forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-simulation/cannonsmash: Stop using games.eclass
Package-Manager: Portage-2.3.31, Repoman-2.3.9
- Loading branch information
Showing
5 changed files
with
81 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
inherit desktop | ||
|
||
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" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="vorbis nls" | ||
|
||
RDEPEND=" | ||
virtual/opengl | ||
virtual/glu | ||
media-libs/libsdl[sound,video] | ||
media-libs/sdl-mixer[vorbis?] | ||
media-libs/sdl-image[jpeg,png] | ||
x11-libs/gtk+:2 | ||
nls? ( virtual/libintl ) | ||
" | ||
DEPEND="${RDEPEND} | ||
virtual/pkgconfig | ||
nls? ( sys-devel/gettext ) | ||
" | ||
|
||
S="${WORKDIR}/csmash-${PV}" | ||
|
||
src_unpack() { | ||
unpack csmash-${PV}.tar.gz | ||
} | ||
|
||
src_prepare() { | ||
default | ||
eapply \ | ||
"${FILESDIR}"/${P}-x-inc.patch \ | ||
"${FILESDIR}"/${P}-sizeof-cast.patch \ | ||
"${FILESDIR}"/${P}-gcc41.patch \ | ||
"${FILESDIR}"/${P}-flags.patch | ||
if use vorbis ; then | ||
sed -i \ | ||
-e "s:${MY_OGG}:/usr/share/csmash/games/${MY_OGG}:" ttinc.h \ | ||
|| die "sed failed" | ||
fi | ||
} | ||
|
||
src_configure() { | ||
econf \ | ||
$(use_enable nls) \ | ||
--datadir="/usr/share" | ||
} | ||
|
||
src_compile() { | ||
emake \ | ||
localedir="/usr/share" | ||
} | ||
|
||
src_install() { | ||
default | ||
if use vorbis ; then | ||
insinto /usr/share/games/csmash | ||
doins "${DISTDIR}"/${MY_OGG} | ||
fi | ||
newicon win32/orange.ico ${PN}.ico | ||
make_desktop_entry csmash "Cannon Smash" /usr/share/pixmaps/${PN}.ico | ||
} |
4 changes: 2 additions & 2 deletions
4
games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters