diff --git a/abe-1.0-gcc4.patch b/abe-1.0-gcc4.patch new file mode 100644 index 0000000..472d392 --- /dev/null +++ b/abe-1.0-gcc4.patch @@ -0,0 +1,18 @@ +--- abe-1_0/src/Monster.c.gcc4 2005-04-11 18:53:41.041488498 +0300 ++++ abe-1_0/src/Monster.c 2005-04-11 19:03:18.791039043 +0300 +@@ -563,13 +563,13 @@ + } + + void allocFireCustom(LiveMonster *live) { +- if(((int*)live->custom = (int*)malloc(sizeof(int))) == NULL) { ++ if((live->custom = (int*)malloc(sizeof(int))) == NULL) { + fprintf(stderr, "Out of memory when trying to allocate custom storage for fire column.\n"); + } + } + + void allocEndGameCustom(LiveMonster *live) { +- if(((int*)live->custom = (int*)malloc(sizeof(int))) == NULL) { ++ if((live->custom = (int*)malloc(sizeof(int))) == NULL) { + fprintf(stderr, "Out of memory when trying to allocate custom storage for end game.\n"); + } + *((int*)(live->custom)) = 0; diff --git a/abe-1.0-misc-fixes.patch b/abe-1.0-misc-fixes.patch new file mode 100644 index 0000000..15fd17a --- /dev/null +++ b/abe-1.0-misc-fixes.patch @@ -0,0 +1,32 @@ +--- abe-1_0/src/Menu.c.miscfix 2003-04-12 22:19:36.000000000 +0300 ++++ abe-1_0/src/Menu.c 2005-04-11 19:15:53.247710332 +0300 +@@ -102,6 +102,8 @@ + int isEnabled(int n) { + if(n == SOUND_ENABLED || n == MUSIC_ENABLED) + return sound_loaded; ++ else ++ return 0; + } + + void saveSettings() { +--- abe-1_0/src/Image.c.miscfix 2005-04-11 19:15:53.243710955 +0300 ++++ abe-1_0/src/Image.c 2005-04-11 19:15:53.247710332 +0300 +@@ -15,7 +15,7 @@ + int image_count; + int img_brick, img_rock, img_back, img_key, img_door, img_door2, img_key, img_smash, img_smash2, img_smash3, img_smash4; + int img_water, img_spring, img_spring2, img_spider, img_spider2, img_health; +-int img_balloon[3], img_gem[2], img_bullet[4], img_slide_left[3], img_slide_right[3], img_slideback; ++int img_balloon[3], img_gem[3], img_bullet[4], img_slide_left[3], img_slide_right[3], img_slideback; + int alphacount = 0; + int alphas[256]; + +--- abe-1_0/src/Image.h.miscfix 2005-04-11 19:16:36.931909063 +0300 ++++ abe-1_0/src/Image.h 2005-04-11 19:16:43.940817642 +0300 +@@ -36,6 +36,6 @@ + // known image indexes + extern int img_brick, img_rock, img_back, img_key, img_door, img_door2, img_key, img_smash, img_smash2, img_smash3, img_smash4; + extern int img_water, img_spring, img_spring2, img_spider, img_spider2, img_health; +-extern int img_balloon[3], img_gem[2], img_bullet[4], img_slide_left[3], img_slide_right[3], img_slideback; ++extern int img_balloon[3], img_gem[3], img_bullet[4], img_slide_left[3], img_slide_right[3], img_slideback; + + #endif diff --git a/abe.spec b/abe.spec index 6f397af..9ab7677 100644 --- a/abe.spec +++ b/abe.spec @@ -1,6 +1,6 @@ Name: abe Version: 1.0 -Release: 4 +Release: 5 Summary: Scrolling, platform-jumping, ancient pyramid exploring game Group: Amusements/Games @@ -10,6 +10,8 @@ Source0: http://download.sourceforge.net/abe/abe-1_0.tar.gz Source1: %{name}.png Patch0: %{name}-%{version}-datapath.patch Patch1: %{name}-%{version}-tmppath.patch +Patch2: %{name}-%{version}-gcc4.patch +Patch3: %{name}-%{version}-misc-fixes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: SDL-devel >= 1.2.3, SDL_mixer-devel >= 1.2.3 @@ -27,6 +29,8 @@ vaguely in the style of similar games for the Commodore+4. %patch0 -p1 -b .datapath # Write temporary image files into home directory, not data directory %patch1 -p1 -b .tmppath +%patch2 -p1 -b .gcc4 +%patch3 -p1 -b .miscfix %build %configure @@ -70,6 +74,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/pixmaps/* %changelog +* Mon Apr 11 2005 Panu Matilainen 0:1.0-5 +- fix build on gcc4 +- patch to fix issues in #149362 + * Fri Apr 7 2005 Michael Schwendt - rebuilt