summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-simulation/cannonsmash')
-rw-r--r--games-simulation/cannonsmash/Manifest2
-rw-r--r--games-simulation/cannonsmash/cannonsmash-0.6.6.ebuild69
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch21
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch22
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch11
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch18
-rw-r--r--games-simulation/cannonsmash/metadata.xml8
7 files changed, 151 insertions, 0 deletions
diff --git a/games-simulation/cannonsmash/Manifest b/games-simulation/cannonsmash/Manifest
new file mode 100644
index 000000000000..1ad783838317
--- /dev/null
+++ b/games-simulation/cannonsmash/Manifest
@@ -0,0 +1,2 @@
+DIST csmash-0.6.6.tar.gz 1989943 SHA256 1be0b27dac46ba891b955bf8f122151baea6ee05b3c29616a09423250cfd9d3d SHA512 e8406eb17adf6c6cc4454b7d0a432ad1b071e1f72d9867fd46e458ade2d1dc1e927a7f2a336c80988b97051b9d188c3027dd8207f89f7e1fa60e1d0a6a5e8916 WHIRLPOOL 0b0af9343bdf47fdca52b3f91b7cd137c5731c41ee00b077e86efcfc13057cdc66bfc5601124bc983813ad9cfc3fbe3e0da101cc62de6b2cb3a0428cb8a535ba
+DIST danslatristesse2-48.ogg 1070787 SHA256 aab5b276bc55ecad65c4b2e17f11daa6d173fc077e982e42997f10695f070bfe SHA512 5cbc457d511bdc736f3b359a8ddd3a514bd0d14418f2dbd68409394baadfcd9fd7630b228e4e9654b14b513e158e9a46b67bc58c5c04bfe382ee6e624dd16834 WHIRLPOOL dc87627a79900c9747ae620d3339a809cc72d7fc3b8a9fa05ab6b2423c02531600a4761c966b29bda5f531de96a68f58978d269f96c9603aae82ed87a0f52924
diff --git a/games-simulation/cannonsmash/cannonsmash-0.6.6.ebuild b/games-simulation/cannonsmash/cannonsmash-0.6.6.ebuild
new file mode 100644
index 000000000000..f13546c7a2e3
--- /dev/null
+++ b/games-simulation/cannonsmash/cannonsmash-0.6.6.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+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 ppc 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() {
+ epatch \
+ "${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}:${GAMES_DATADIR}/csmash/${MY_OGG}:" ttinc.h \
+ || die "sed failed"
+ fi
+}
+
+src_configure() {
+ egamesconf \
+ $(use_enable nls) \
+ --datadir="${GAMES_DATADIR_BASE}"
+}
+
+src_compile() {
+ emake \
+ localedir="/usr/share"
+}
+
+src_install() {
+ default
+ if use vorbis ; then
+ insinto "${GAMES_DATADIR}"/csmash
+ doins "${DISTDIR}"/${MY_OGG}
+ fi
+ newicon win32/orange.ico ${PN}.ico
+ make_desktop_entry csmash "Cannon Smash" /usr/share/pixmaps/${PN}.ico
+ prepgamesdirs
+}
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch
new file mode 100644
index 000000000000..85612b929c59
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch
@@ -0,0 +1,21 @@
+--- configure.old 2010-10-18 15:05:02.000000000 +0200
++++ configure 2010-10-18 15:05:31.000000000 +0200
+@@ -5516,12 +5516,12 @@
+
+
+ if test "x$x_includes" != "x"; then
+- CFLAGS="-I $x_includes"
+-else
+- CFLAGS=""
+-fi
+-LDFLAGS="-L/usr/local/lib -L$x_libraries -L$libdir"
+-CXXFLAGS="$CFLAGS -Wall"
++ CFLAGS="${CFLAGS} -I $x_includes"
++else
++ CFLAGS="${CFLAGS}"
++fi
++LDFLAGS="${LDFLAGS} -L/usr/local/lib -L$x_libraries -L$libdir"
++CXXFLAGS="${CXXFLAGS} -Wall"
+
+
+ echo "$as_me:$LINENO: checking for main in -lXmu" >&5
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch
new file mode 100644
index 000000000000..0f3e511f09cc
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch
@@ -0,0 +1,22 @@
+--- BallView.h.old 2006-04-11 00:10:37.000000000 +0200
++++ BallView.h 2006-04-11 00:10:53.000000000 +0200
+@@ -32,7 +32,7 @@
+
+ static GLuint m_number[10];
+ private:
+- void BallView::DrawTargetCircle();
++ void DrawTargetCircle();
+ GLUquadricObj *m_quad;
+
+ void DrawBall();
+--- matrix.old 2006-04-11 00:13:18.000000000 +0200
++++ matrix 2006-04-11 00:19:34.000000000 +0200
+@@ -42,7 +42,7 @@
+
+ /* __BEGIN__BEGIN__ */
+ //__NAMESPACE_BEGIN(ese);
+-#if (!defined __GNUG__) || (__GNUC__ == 3)
++#if (!defined __GNUG__) || (__GNUC__ >= 3)
+ template<typename T>
+ void swap(T& a, T& b)
+ {
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
new file mode 100644
index 000000000000..9237f95978ef
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch
@@ -0,0 +1,11 @@
+Don't typecast otherwise C++ will fail to match on some arches.
+
+http://bugs.gentoo.org/84187
+
+--- loadparts.cpp
++++ loadparts.cpp
+@@ -247,3 +247,3 @@
+ // concat next line(s)
+- int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1);
++ int bufsize = clamp((size_t)0, sizeof(line)-l, sizeof(line)-1);
+ fgets(&line[l-2], bufsize, fp);
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
new file mode 100644
index 000000000000..99c1e2f944fa
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch
@@ -0,0 +1,18 @@
+Patch by Jason Bucata.
+http://bugs.gentoo.org/84187
+
+--- configure
++++ configure
+@@ -5515,7 +5515,11 @@
+ fi
+
+
+-CFLAGS="-I $x_includes"
++if test "x$x_includes" != "x"; then
++ CFLAGS="-I $x_includes"
++else
++ CFLAGS=""
++fi
+ LDFLAGS="-L/usr/local/lib -L$x_libraries -L$libdir"
+ CXXFLAGS="$CFLAGS -Wall"
+
diff --git a/games-simulation/cannonsmash/metadata.xml b/games-simulation/cannonsmash/metadata.xml
new file mode 100644
index 000000000000..bb95f92d8ecc
--- /dev/null
+++ b/games-simulation/cannonsmash/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">cannonsmash</remote-id>
+ </upstream>
+</pkgmetadata>