rpms/KoboDeluxe/devel KoboDeluxe-0.5.1-avoid-unistd-pipe-collision.patch, NONE, 1.1 KoboDeluxe.spec, 1.6, 1.7

Tom Callaway spot at fedoraproject.org
Wed Sep 24 17:24:54 UTC 2008


Author: spot

Update of /cvs/pkgs/rpms/KoboDeluxe/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20754

Modified Files:
	KoboDeluxe.spec 
Added Files:
	KoboDeluxe-0.5.1-avoid-unistd-pipe-collision.patch 
Log Message:
fix FTBFS

KoboDeluxe-0.5.1-avoid-unistd-pipe-collision.patch:

--- NEW FILE KoboDeluxe-0.5.1-avoid-unistd-pipe-collision.patch ---
diff -up KoboDeluxe-0.5.1/enemies.h.pipe-unistd KoboDeluxe-0.5.1/enemies.h
--- KoboDeluxe-0.5.1/enemies.h.pipe-unistd	2007-12-24 03:18:52.000000000 -0500
+++ KoboDeluxe-0.5.1/enemies.h	2008-09-24 13:06:16.000000000 -0400
@@ -70,9 +70,9 @@ extern const enemy_kind bomb1;
 extern const enemy_kind bomb2;
 extern const enemy_kind bombdeto;
 extern const enemy_kind cannon;
-extern const enemy_kind pipe1;
+extern const enemy_kind pipe_1;
 extern const enemy_kind core;
-extern const enemy_kind pipe2;
+extern const enemy_kind pipe_2;
 extern const enemy_kind rock;
 extern const enemy_kind ring;
 extern const enemy_kind enemy_m1;
@@ -430,7 +430,7 @@ inline int _enemy::realize()
 
 inline int _enemy::is_pipe()
 {
-	return ((_state != notuse) && ((ek == &pipe1) || (ek == &pipe2)));
+	return ((_state != notuse) && ((ek == &pipe_1) || (ek == &pipe_2)));
 }
 
 
diff -up KoboDeluxe-0.5.1/enemy.cpp.pipe-unistd KoboDeluxe-0.5.1/enemy.cpp
--- KoboDeluxe-0.5.1/enemy.cpp.pipe-unistd	2007-12-24 05:36:46.000000000 -0500
+++ KoboDeluxe-0.5.1/enemy.cpp	2008-09-24 13:07:54.000000000 -0400
@@ -713,7 +713,7 @@ void _enemy::move_cannon()
 
 void _enemy::kill_cannon()
 {
-	enemies.make(&pipe1, CS2PIXEL(x), CS2PIXEL(y));
+	enemies.make(&pipe_1, CS2PIXEL(x), CS2PIXEL(y));
 	sound.g_base_node_explo(x, y);
 	release();
 }
@@ -755,10 +755,10 @@ void _enemy::move_core()
 
 void _enemy::kill_core()
 {
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
+	enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
+	enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
+	enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
+	enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
 	enemies.make(&explosion4, CS2PIXEL(x), CS2PIXEL(y));
 	sound.g_base_core_explo(x, y);
 	release();
@@ -777,7 +777,7 @@ const enemy_kind core = {
 
 /*
  * ===========================================================================
- *                                pipe1
+ *                                pipe_1
  * ===========================================================================
  */
 void _enemy::make_pipe1()
@@ -851,7 +851,7 @@ void _enemy::move_pipe1()
 		screen.set_map(x1, y1, m ^ a);
 	release();
 }
-const enemy_kind pipe1 = {
+const enemy_kind pipe_1 = {
 	0,
 	&_enemy::make_pipe1,
 	&_enemy::move_pipe1,
@@ -863,7 +863,7 @@ const enemy_kind pipe1 = {
 
 /*
  * ===========================================================================
- *                                pipe2
+ *                                pipe_2
  * ===========================================================================
  */
 void _enemy::make_pipe2()
@@ -978,19 +978,19 @@ void _enemy::move_pipe2()
 	}
 	p ^= a;
 	if(p & U_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
+		enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
 	if(p & R_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
+		enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
 	if(p & D_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
+		enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
 	if(p & L_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
+		enemies.make(&pipe_2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
 	manage.add_score(10);
 	release();
 }
 
 
-const enemy_kind pipe2 = {
+const enemy_kind pipe_2 = {
 	0,
 	&_enemy::make_pipe2,
 	&_enemy::move_pipe2,


Index: KoboDeluxe.spec
===================================================================
RCS file: /cvs/pkgs/rpms/KoboDeluxe/devel/KoboDeluxe.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- KoboDeluxe.spec	19 Feb 2008 07:43:48 -0000	1.6
+++ KoboDeluxe.spec	24 Sep 2008 17:24:24 -0000	1.7
@@ -1,6 +1,6 @@
 Name:           KoboDeluxe
 Version:        0.5.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        3'rd person scrolling 2D shooter
 Group:          Amusements/Games
 License:        GPLv2+
@@ -9,6 +9,7 @@
 Source1:        %{name}.png
 Source2:        %{name}.desktop
 Patch1:         KoboDeluxe-defaults.patch
+Patch2:         KoboDeluxe-0.5.1-avoid-unistd-pipe-collision.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  SDL_image-devel desktop-file-utils
 Requires:       hicolor-icon-theme
@@ -28,6 +29,7 @@
 %prep
 %setup -q
 %patch1 -p1 -z .defaults
+%patch2 -p1 -b .pipe-unistd
 sed -i 's|$(sharedstatedir)/kobo-deluxe/scores|%{_var}/games/kobo-deluxe|g' \
   configure
 iconv -f ISO-8859-1 -t UTF8 README > tmp;         mv tmp README
@@ -89,6 +91,9 @@
 
 
 %changelog
+* Wed Sep 24 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 0.5.1-3
+- avoid variable collision between "pipe2" and unistd.h
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.5.1-2
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list