diff options
author | Pacho Ramos <pacho@gentoo.org> | 2018-05-01 20:19:21 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2018-05-01 21:35:43 +0200 |
commit | f303f79663cfab94da44117879a83983b1938aca (patch) | |
tree | 422e93aea9c9686af47336fb449520a9fdc47104 /games-simulation | |
parent | games-server/crossfire-server: Fix patches (diff) | |
download | gentoo-f303f79663cfab94da44117879a83983b1938aca.tar.gz gentoo-f303f79663cfab94da44117879a83983b1938aca.tar.bz2 gentoo-f303f79663cfab94da44117879a83983b1938aca.zip |
games-simulation/cannonsmash: Stop using games.eclass
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'games-simulation')
5 files changed, 81 insertions, 10 deletions
diff --git a/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild b/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild new file mode 100644 index 000000000000..8da30598da0c --- /dev/null +++ b/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild @@ -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 +} diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch index 85612b929c59..c7b3b561d2d1 100644 --- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch +++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch @@ -1,5 +1,5 @@ ---- configure.old 2010-10-18 15:05:02.000000000 +0200 -+++ configure 2010-10-18 15:05:31.000000000 +0200 +--- a/configure.old 2010-10-18 15:05:02.000000000 +0200 ++++ b/configure 2010-10-18 15:05:31.000000000 +0200 @@ -5516,12 +5516,12 @@ diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch index 0f3e511f09cc..6602c2f09304 100644 --- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch +++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch @@ -1,5 +1,5 @@ ---- BallView.h.old 2006-04-11 00:10:37.000000000 +0200 -+++ BallView.h 2006-04-11 00:10:53.000000000 +0200 +--- a/BallView.h.old 2006-04-11 00:10:37.000000000 +0200 ++++ b/BallView.h 2006-04-11 00:10:53.000000000 +0200 @@ -32,7 +32,7 @@ static GLuint m_number[10]; @@ -9,8 +9,8 @@ GLUquadricObj *m_quad; void DrawBall(); ---- matrix.old 2006-04-11 00:13:18.000000000 +0200 -+++ matrix 2006-04-11 00:19:34.000000000 +0200 +--- a/matrix.old 2006-04-11 00:13:18.000000000 +0200 ++++ b/matrix 2006-04-11 00:19:34.000000000 +0200 @@ -42,7 +42,7 @@ /* __BEGIN__BEGIN__ */ diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch index 9237f95978ef..ead10c90400b 100644 --- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch +++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch @@ -2,8 +2,8 @@ Don't typecast otherwise C++ will fail to match on some arches. http://bugs.gentoo.org/84187 ---- loadparts.cpp -+++ loadparts.cpp +--- a/loadparts.cpp ++++ b/loadparts.cpp @@ -247,3 +247,3 @@ // concat next line(s) - int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1); diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch index 99c1e2f944fa..e56b51e0b92a 100644 --- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch +++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch @@ -1,8 +1,8 @@ Patch by Jason Bucata. http://bugs.gentoo.org/84187 ---- configure -+++ configure +--- a/configure ++++ b/configure @@ -5515,7 +5515,11 @@ fi |