games-simulation/cannonsmash: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 18:19:21 +0000 (20:19 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 19:35:43 +0000 (21:35 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild [new file with mode: 0644]
games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch
games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch
games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch
games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch

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 (file)
index 0000000..8da3059
--- /dev/null
@@ -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
+}
index 85612b929c59553cf682353a984fe8fcb79fec40..c7b3b561d2d1433d29ee8ad7b4be1bac0294949f 100644 (file)
@@ -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 @@
  
  
index 0f3e511f09cc2c512cf78210a390953013ea5d24..6602c2f0930450e9e2d1cfb42817a6bfc0246fa2 100644 (file)
@@ -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__ */
index 9237f95978ef02331e5269790c5659c638187c14..ead10c90400b82eca46d70620715b860dad4c507 100644 (file)
@@ -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);
index 99c1e2f944fa6e73d55d3090aa3f9707e89db3c5..e56b51e0b92a4b506d89ac1a8d06e460304beb24 100644 (file)
@@ -1,8 +1,8 @@
 Patch by Jason Bucata.
 http://bugs.gentoo.org/84187
 
---- configure
-+++ configure
+--- a/configure
++++ b/configure
 @@ -5515,7 +5515,11 @@
  fi