1 |
commit: f303f79663cfab94da44117879a83983b1938aca |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 1 18:19:21 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 1 19:35:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f303f796 |
7 |
|
8 |
games-simulation/cannonsmash: Stop using games.eclass |
9 |
|
10 |
Package-Manager: Portage-2.3.31, Repoman-2.3.9 |
11 |
|
12 |
.../cannonsmash/cannonsmash-0.6.6-r1.ebuild | 71 ++++++++++++++++++++++ |
13 |
.../files/cannonsmash-0.6.6-flags.patch | 4 +- |
14 |
.../files/cannonsmash-0.6.6-gcc41.patch | 8 +-- |
15 |
.../files/cannonsmash-0.6.6-sizeof-cast.patch | 4 +- |
16 |
.../files/cannonsmash-0.6.6-x-inc.patch | 4 +- |
17 |
5 files changed, 81 insertions(+), 10 deletions(-) |
18 |
|
19 |
diff --git a/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild b/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..8da30598da0 |
22 |
--- /dev/null |
23 |
+++ b/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild |
24 |
@@ -0,0 +1,71 @@ |
25 |
+# Copyright 1999-2018 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=6 |
29 |
+inherit desktop |
30 |
+ |
31 |
+MY_OGG=danslatristesse2-48.ogg |
32 |
+DESCRIPTION="3D tabletennis game" |
33 |
+HOMEPAGE="http://cannonsmash.sourceforge.net/" |
34 |
+SRC_URI="mirror://sourceforge/${PN}/csmash-${PV}.tar.gz |
35 |
+ vorbis? ( http://nan.p.utmc.or.jp/${MY_OGG} )" |
36 |
+ |
37 |
+LICENSE="GPL-2" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~amd64 ~x86" |
40 |
+IUSE="vorbis nls" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ virtual/opengl |
44 |
+ virtual/glu |
45 |
+ media-libs/libsdl[sound,video] |
46 |
+ media-libs/sdl-mixer[vorbis?] |
47 |
+ media-libs/sdl-image[jpeg,png] |
48 |
+ x11-libs/gtk+:2 |
49 |
+ nls? ( virtual/libintl ) |
50 |
+" |
51 |
+DEPEND="${RDEPEND} |
52 |
+ virtual/pkgconfig |
53 |
+ nls? ( sys-devel/gettext ) |
54 |
+" |
55 |
+ |
56 |
+S="${WORKDIR}/csmash-${PV}" |
57 |
+ |
58 |
+src_unpack() { |
59 |
+ unpack csmash-${PV}.tar.gz |
60 |
+} |
61 |
+ |
62 |
+src_prepare() { |
63 |
+ default |
64 |
+ eapply \ |
65 |
+ "${FILESDIR}"/${P}-x-inc.patch \ |
66 |
+ "${FILESDIR}"/${P}-sizeof-cast.patch \ |
67 |
+ "${FILESDIR}"/${P}-gcc41.patch \ |
68 |
+ "${FILESDIR}"/${P}-flags.patch |
69 |
+ if use vorbis ; then |
70 |
+ sed -i \ |
71 |
+ -e "s:${MY_OGG}:/usr/share/csmash/games/${MY_OGG}:" ttinc.h \ |
72 |
+ || die "sed failed" |
73 |
+ fi |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ econf \ |
78 |
+ $(use_enable nls) \ |
79 |
+ --datadir="/usr/share" |
80 |
+} |
81 |
+ |
82 |
+src_compile() { |
83 |
+ emake \ |
84 |
+ localedir="/usr/share" |
85 |
+} |
86 |
+ |
87 |
+src_install() { |
88 |
+ default |
89 |
+ if use vorbis ; then |
90 |
+ insinto /usr/share/games/csmash |
91 |
+ doins "${DISTDIR}"/${MY_OGG} |
92 |
+ fi |
93 |
+ newicon win32/orange.ico ${PN}.ico |
94 |
+ make_desktop_entry csmash "Cannon Smash" /usr/share/pixmaps/${PN}.ico |
95 |
+} |
96 |
|
97 |
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch |
98 |
index 85612b929c5..c7b3b561d2d 100644 |
99 |
--- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch |
100 |
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch |
101 |
@@ -1,5 +1,5 @@ |
102 |
---- configure.old 2010-10-18 15:05:02.000000000 +0200 |
103 |
-+++ configure 2010-10-18 15:05:31.000000000 +0200 |
104 |
+--- a/configure.old 2010-10-18 15:05:02.000000000 +0200 |
105 |
++++ b/configure 2010-10-18 15:05:31.000000000 +0200 |
106 |
@@ -5516,12 +5516,12 @@ |
107 |
|
108 |
|
109 |
|
110 |
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch |
111 |
index 0f3e511f09c..6602c2f0930 100644 |
112 |
--- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch |
113 |
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch |
114 |
@@ -1,5 +1,5 @@ |
115 |
---- BallView.h.old 2006-04-11 00:10:37.000000000 +0200 |
116 |
-+++ BallView.h 2006-04-11 00:10:53.000000000 +0200 |
117 |
+--- a/BallView.h.old 2006-04-11 00:10:37.000000000 +0200 |
118 |
++++ b/BallView.h 2006-04-11 00:10:53.000000000 +0200 |
119 |
@@ -32,7 +32,7 @@ |
120 |
|
121 |
static GLuint m_number[10]; |
122 |
@@ -9,8 +9,8 @@ |
123 |
GLUquadricObj *m_quad; |
124 |
|
125 |
void DrawBall(); |
126 |
---- matrix.old 2006-04-11 00:13:18.000000000 +0200 |
127 |
-+++ matrix 2006-04-11 00:19:34.000000000 +0200 |
128 |
+--- a/matrix.old 2006-04-11 00:13:18.000000000 +0200 |
129 |
++++ b/matrix 2006-04-11 00:19:34.000000000 +0200 |
130 |
@@ -42,7 +42,7 @@ |
131 |
|
132 |
/* __BEGIN__BEGIN__ */ |
133 |
|
134 |
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 |
135 |
index 9237f95978e..ead10c90400 100644 |
136 |
--- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch |
137 |
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch |
138 |
@@ -2,8 +2,8 @@ Don't typecast otherwise C++ will fail to match on some arches. |
139 |
|
140 |
http://bugs.gentoo.org/84187 |
141 |
|
142 |
---- loadparts.cpp |
143 |
-+++ loadparts.cpp |
144 |
+--- a/loadparts.cpp |
145 |
++++ b/loadparts.cpp |
146 |
@@ -247,3 +247,3 @@ |
147 |
// concat next line(s) |
148 |
- int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1); |
149 |
|
150 |
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 |
151 |
index 99c1e2f944f..e56b51e0b92 100644 |
152 |
--- a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch |
153 |
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch |
154 |
@@ -1,8 +1,8 @@ |
155 |
Patch by Jason Bucata. |
156 |
http://bugs.gentoo.org/84187 |
157 |
|
158 |
---- configure |
159 |
-+++ configure |
160 |
+--- a/configure |
161 |
++++ b/configure |
162 |
@@ -5515,7 +5515,11 @@ |
163 |
fi |