Skip to content

Commit

Permalink
games-simulation/cannonsmash: Stop using games.eclass
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.31, Repoman-2.3.9
  • Loading branch information
pacho2 committed May 1, 2018
1 parent 7f2298e commit f303f79
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 10 deletions.
71 changes: 71 additions & 0 deletions games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild
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
}
Original file line number Diff line number Diff line change
@@ -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 @@


Expand Down
Original file line number Diff line number Diff line change
@@ -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];
Expand All @@ -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__ */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Patch by Jason Bucata.
http://bugs.gentoo.org/84187

--- configure
+++ configure
--- a/configure
+++ b/configure
@@ -5515,7 +5515,11 @@
fi

Expand Down

0 comments on commit f303f79

Please sign in to comment.