rpms/grhino/devel grhino-0.16.0-emptyelse.patch, NONE, 1.1 grhino-0.16.0-gcc43.patch, NONE, 1.1 grhino-0.16.0-types.patch, NONE, 1.1 grhino.spec, 1.14, 1.15

Michel Alexandre Salim (salimma) fedora-extras-commits at redhat.com
Fri Feb 22 20:56:59 UTC 2008


Author: salimma

Update of /cvs/pkgs/rpms/grhino/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10885

Modified Files:
	grhino.spec 
Added Files:
	grhino-0.16.0-emptyelse.patch grhino-0.16.0-gcc43.patch 
	grhino-0.16.0-types.patch 
Log Message:
- Fix compilation problems due to GCC 4.3 header streamlining
- Fix other compile warnings


grhino-0.16.0-emptyelse.patch:

--- NEW FILE grhino-0.16.0-emptyelse.patch ---
--- grhino-0.16.0/board.h.emptyelse	2006-11-25 12:07:41.000000000 -0500
+++ grhino-0.16.0/board.h	2008-02-22 15:05:10.000000000 -0500
@@ -135,9 +135,9 @@
 			black_score = 64 - white_score;
 		else if (black_score < white_score)
 			white_score = 64 - black_score;
-		else
+		else {
 			// FIXME: Get the scoring right
-			;
+			; }
 	}
 }
 

grhino-0.16.0-gcc43.patch:

--- NEW FILE grhino-0.16.0-gcc43.patch ---
--- grhino-0.16.0/book.cc.gcc43	2006-11-25 12:07:41.000000000 -0500
+++ grhino-0.16.0/book.cc	2008-02-22 14:31:08.000000000 -0500
@@ -28,6 +28,7 @@
 #include <vector>
 #include <iostream>
 #include <stdexcept>
+#include <cstdlib> // for abort
 
 #ifdef _
 #undef _
--- grhino-0.16.0/game.cc.gcc43	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/game.cc	2008-02-22 14:30:22.000000000 -0500
@@ -37,6 +37,7 @@
 #include <sys/stat.h> 
 #include <unistd.h>
 #include <fcntl.h>
+#include <cstdlib> // for getenv
 
 #ifdef _
 #  undef _
--- grhino-0.16.0/log_proc.h.gcc43	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/log_proc.h	2008-02-22 14:33:58.000000000 -0500
@@ -22,6 +22,7 @@
 
 #include <exception>
 #include <stdexcept>
+#include <cstdlib> // for abort
 #include <string>
 #include <fstream>
 #include <iomanip>

grhino-0.16.0-types.patch:

--- NEW FILE grhino-0.16.0-types.patch ---
--- grhino-0.16.0/highlight_white.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/highlight_white.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * highlight_white_xpm[] = {
+static const char * highlight_white_xpm[] = {
 "40 40 23 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/gtp-rhino.cc.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/gtp-rhino.cc	2008-02-22 15:43:09.000000000 -0500
@@ -55,7 +55,7 @@
 
 // Grab version number in VERSION variable
 #undef VERSION
-char *
+const char *
 #include "scripts/version"
 ;
 
--- grhino-0.16.0/hint_white.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/hint_white.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * hint_white_xpm[] = {
+static const char * hint_white_xpm[] = {
 "40 40 6 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/right.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/right.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * right_xpm[] = {
+static const char * right_xpm[] = {
 "20 320 3 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/icon_bw.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/icon_bw.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * icon_bw_xpm[] = {
+static const char * icon_bw_xpm[] = {
 "48 48 11 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/black_last.xpm.types	2006-11-25 12:07:41.000000000 -0500
+++ grhino-0.16.0/black_last.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * black_last_xpm[] = {
+static const char * black_last_xpm[] = {
 "40 40 28 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/hint_black.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/hint_black.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * hint_black_xpm[] = {
+static const char * hint_black_xpm[] = {
 "40 40 6 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/icon_white.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/icon_white.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * icon_white_xpm[] = {
+static const char * icon_white_xpm[] = {
 "48 48 11 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/highlight_black.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/highlight_black.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * highlight_black_xpm[] = {
+static const char * highlight_black_xpm[] = {
 "40 40 22 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/ggamewin.cc.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/ggamewin.cc	2008-02-22 15:45:45.000000000 -0500
@@ -76,7 +76,7 @@
 
 	for (size_t i = 0; i != res->vec->size(); ++i) {
 
-		snprintf(buf1, 20, "%d", i+1);
+		snprintf(buf1, 20, "%d", (int)i+1);
 
 		if (res->vec->operator[](i).random) {
 			snprintf(buf2, 20, _("Rand %d"),
--- grhino-0.16.0/highlight_empty.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/highlight_empty.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * highlight_empty_xpm[] = {
+static const char * highlight_empty_xpm[] = {
 "40 40 3 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/grhino.cc.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/grhino.cc	2008-02-22 15:44:27.000000000 -0500
@@ -87,7 +87,7 @@
 
 // Grab version number in VERSION variable
 #undef VERSION
-char *
+const char *
 #include "scripts/version"
 ;
 
--- grhino-0.16.0/icon_empty.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/icon_empty.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * icon_empty_xpm[] = {
+static const char * icon_empty_xpm[] = {
 "48 48 1 1",
 " 	c None",
 "                                                ",
--- grhino-0.16.0/icon_black.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/icon_black.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * icon_black_xpm[] = {
+static const char * icon_black_xpm[] = {
 "48 48 2 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/empty.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/empty.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * empty_xpm[] = {
+static const char * empty_xpm[] = {
 "40 40 3 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/bottom.xpm.types	2006-11-25 12:07:41.000000000 -0500
+++ grhino-0.16.0/bottom.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * bottom_xpm[] = {
+static const char * bottom_xpm[] = {
 "360 20 3 1",
 " 	c None",
 ".	c #C3C3C3",
--- grhino-0.16.0/icon_new.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/icon_new.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * icon_new_xpm[] = {
+static const char * icon_new_xpm[] = {
 "38 38 50 1",
 " 	c None",
 ".	c #3FDD18",
--- grhino-0.16.0/white_last.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/white_last.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * white_last_xpm[] = {
+static const char * white_last_xpm[] = {
 "40 40 30 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/left.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/left.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * left_xpm[] = {
+static const char * left_xpm[] = {
 "20 320 11 1",
 " 	c None",
 ".	c #C3C3C3",
--- grhino-0.16.0/top.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/top.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * top_xpm[] = {
+static const char * top_xpm[] = {
 "360 20 12 1",
 " 	c None",
 ".	c #C3C3C3",
--- grhino-0.16.0/ghistwin.cc.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/ghistwin.cc	2008-02-22 15:46:39.000000000 -0500
@@ -53,8 +53,8 @@
 	static gchar m[NUM_MOVE][3];	// Enough space for A1 .. H8 and string
 				// termination
 	static gchar p[NUM_MOVE][3];
-	static gchar *pos_table_x;
-	static gchar *pos_table_y;
+	static const gchar *pos_table_x;
+	static const gchar *pos_table_y;
 	static GdkPixbuf *color_table[3];
 	static GdkPixbuf *empty_player_pixbuf;   
 	static GdkPixbuf *black_player_pixbuf;
--- grhino-0.16.0/white.xpm.types	2006-11-25 12:07:42.000000000 -0500
+++ grhino-0.16.0/white.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * white_xpm[] = {
+static const char * white_xpm[] = {
 "40 40 23 1",
 " 	c None",
 ".	c #000000",
--- grhino-0.16.0/black.xpm.types	2006-11-25 12:07:41.000000000 -0500
+++ grhino-0.16.0/black.xpm	2008-02-22 15:43:09.000000000 -0500
@@ -1,5 +1,5 @@
 /* XPM */
-static char * black_xpm[] = {
+static const char * black_xpm[] = {
 "40 40 22 1",
 " 	c None",
 ".	c #000000",


Index: grhino.spec
===================================================================
RCS file: /cvs/pkgs/rpms/grhino/devel/grhino.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- grhino.spec	19 Feb 2008 23:16:17 -0000	1.14
+++ grhino.spec	22 Feb 2008 20:56:25 -0000	1.15
@@ -1,21 +1,24 @@
 Name:           grhino
 Version:        0.16.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Reversi game for GNOME, supporting the Go/Game Text Protocol
 
 Group:          Amusements/Games
 License:        GPLv2+
 URL:            http://rhino.sourceforge.net/
 Source0:        http://dl.sourceforge.net/rhino/grhino-%{version}.tar.gz
+Patch0:         grhino-0.16.0-gcc43.patch
+Patch1:         grhino-0.16.0-types.patch
+Patch2:         grhino-0.16.0-emptyelse.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:	desktop-file-utils
-BuildRequires:	gettext
+BuildRequires:  desktop-file-utils
+BuildRequires:  gettext
 BuildRequires:  libgnomeui-devel
-BuildRequires:	scrollkeeper
+BuildRequires:  scrollkeeper
 #Requires:       
-Requires(post):		scrollkeeper
-Requires(postun):	scrollkeeper
+Requires(post):         scrollkeeper
+Requires(postun):       scrollkeeper
 
 %description
 GRhino, or Rhino its former name, is a Reversi game on Linux and other
@@ -34,6 +37,9 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .gcc43
+%patch1 -p1 -b .types
+%patch2 -p1 -b .emptyelse
 
 
 %build
@@ -47,9 +53,9 @@
 
 # desktop file
 desktop-file-install --vendor fedora \
-	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
-	--remove-key=Version\
-	desktop/%{name}.desktop
+        --dir $RPM_BUILD_ROOT%{_datadir}/applications \
+        --remove-key=Version\
+        desktop/%{name}.desktop
 
 # Icon
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
@@ -79,6 +85,10 @@
 
 
 %changelog
+* Fri Feb 22 2008 Michel Salim <michel.sylvan at gmail.com> - 0.16.0-5
+- Fix incompatibilities with GCC 4.3 (header changes)
+- Fix compilation warnings
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.16.0-4
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list