From 72cc8e17e6628aaf63742b344aeb90ac3466467e Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: May 26 2005 16:48:07 +0000 Subject: - fix build on x86_64 --- diff --git a/wesnoth-64bit.patch b/wesnoth-64bit.patch new file mode 100644 index 0000000..416af51 --- /dev/null +++ b/wesnoth-64bit.patch @@ -0,0 +1,44 @@ +--- wesnoth-0.8/src/image.cpp.64bit 2005-05-26 11:59:06.000000000 -0400 ++++ wesnoth-0.8/src/image.cpp 2005-05-26 11:59:44.000000000 -0400 +@@ -472,7 +472,7 @@ + if(minimap == NULL) + return NULL; + +- std::cerr << "created minimap: " << int(minimap) << "," << int(minimap->pixels) << "\n"; ++ std::cerr << "created minimap: " << minimap << "," << minimap->pixels << "\n"; + + typedef mini_terrain_cache_map cache_map; + cache_map& cache = mini_terrain_cache; +@@ -523,7 +523,7 @@ + } + } + +- std::cerr << "scaling minimap..." << int(minimap) << "." << int(minimap->pixels) << "\n"; ++ std::cerr << "scaling minimap..." << minimap << "." << minimap->pixels << "\n"; + + if((minimap->w != w || minimap->h != h) && w != 0) { + const scoped_sdl_surface surf(minimap); +--- wesnoth-0.8/src/multiplayer_lobby.cpp.64bit 2005-05-26 12:01:48.000000000 -0400 ++++ wesnoth-0.8/src/multiplayer_lobby.cpp 2005-05-26 12:01:58.000000000 -0400 +@@ -114,7 +114,7 @@ + + //generate a unique id to show the map as + char buf[50]; +- sprintf(buf,"addr %d",(int)mini); ++ sprintf(buf,"addr %d",(int)(long)mini); + + image::register_image(buf,mini); + +--- wesnoth-0.8/src/widgets/menu.cpp.64bit 2005-05-26 12:07:02.000000000 -0400 ++++ wesnoth-0.8/src/widgets/menu.cpp 2005-05-26 12:07:13.000000000 -0400 +@@ -389,8 +389,8 @@ + x = event.button.x; + y = event.button.y; + } else { +- x = (int)event.user.data1; +- y = (int)event.user.data2; ++ x = (int)(long)event.user.data1; ++ y = (int)(long)event.user.data2; + } + + const int item = hit(x,y); diff --git a/wesnoth.spec b/wesnoth.spec index e206261..49cbd4f 100644 --- a/wesnoth.spec +++ b/wesnoth.spec @@ -1,6 +1,6 @@ Name: wesnoth Version: 0.8 -Release: 4 +Release: 5 Summary: Battle for Wesnoth, a fantasy turn-based strategy game @@ -8,6 +8,7 @@ Group: Amusements/Games License: GPL URL: http://www.wesnoth.org Source0: http://www.wesnoth.org/files/wesnoth-0.8.tar.gz +Patch0: wesnoth-64bit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: SDL-devel, SDL_image-devel, SDL_mixer-devel @@ -24,6 +25,7 @@ from one scenario to the next campaign. %prep %setup -q +%patch0 -p1 -b .64bit %build @@ -61,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man6/* %changelog +* Thu May 26 2005 Jeremy Katz - 0.8-5 +- fix build on x86_64 + * Sun May 22 2005 Jeremy Katz - 0.8-4 - rebuild on all arches