commit:     f303f79663cfab94da44117879a83983b1938aca
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Tue May  1 18:19:21 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue May  1 19:35:43 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f303f796

games-simulation/cannonsmash: Stop using games.eclass

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../cannonsmash/cannonsmash-0.6.6-r1.ebuild        | 71 ++++++++++++++++++++++
 .../files/cannonsmash-0.6.6-flags.patch            |  4 +-
 .../files/cannonsmash-0.6.6-gcc41.patch            |  8 +--
 .../files/cannonsmash-0.6.6-sizeof-cast.patch      |  4 +-
 .../files/cannonsmash-0.6.6-x-inc.patch            |  4 +-
 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 00000000000..8da30598da0
--- /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 85612b929c5..c7b3b561d2d 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 0f3e511f09c..6602c2f0930 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 9237f95978e..ead10c90400 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 99c1e2f944f..e56b51e0b92 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
  

Reply via email to