Jon Ciesla wrote:
Sure. I downloaded the source: http://www.agidev.com/dl_files/nagi/nagi_src_-_2002-11-14.tar.gz Untarred into a new folder foo. In foo/src I rtan make -f Makefile.linux as indicated by the docs included, and the website. I get: gcc -O2 -fwritable-strings -Wall -Winline -Wshadow -Wstrict-prototypes -DRAD_LINUX -DRAD_WARN -c base.c -o base.o cc1: error: unrecognized command line option "-fwritable-strings" make: *** [base.o] Error 1 If I comment out this or other flags, I get other warnings. I am running patched FC6 with SDL-devel installed. I'll RPM this once I can get it built from source.
Luckily 100+ packages experience does marvels and has thought me to first go look for packages by other distros in cases like this, attached are 3 patches courtesy of debian.
the 00_debian_custom.diff patch should be applied with -p1 (while standing in the dir which contains the src dir) the other 2 with -p0. The custom patch unixifies nagies, iow makes it look for its data files under /usr/share and for
its ini file under /etc. Once the debian patches have been applied, debian simply builds it by doing: cd src; $(MAKE) -f Makefile.linux docbook-to-man debian/nagi.sgml > debian/nagi.1 I thought especially the docbook-to-man command would be good to know for you. I've verified that nagi builds with the 3 patches, but I haven't actually run it :) Regards, Hans
--- nagi-2.07b.orig/src/initialise.c +++ nagi-2.07b/src/initialise.c @@ -103,7 +103,7 @@ // read nagi.ini dir_preset_change(DIR_PRESET_NAGI); - ini_nagi = ini_open("nagi.ini"); + ini_nagi = ini_open("/etc/nagi/nagi.ini"); config_load(config_nagi, ini_nagi); ini_close(ini_nagi); --- nagi-2.07b.orig/src/sys/chargen.c +++ nagi-2.07b/src/sys/chargen.c @@ -93,8 +93,9 @@ { u8 *token, *running; u8 *list; + u8 *fullpath; SIZE size; FILE *pref_file = 0; int pref_scale = 0; @@ -106,7 +107,11 @@ while (token != 0) { //check token - cur_file = fopen(token, "rb"); + fullpath = malloc( strlen(token) + strlen("/usr/share/nagi/")+1 ); + strcpy( fullpath, "/usr/share/nagi/" ); + strcat( fullpath, token ); + cur_file = fopen(fullpath, "rb"); + free( fullpath ); if (cur_file != 0) { // FIXME .. doesn't check size --- nagi-2.07b.orig/src/tools/savefont.c +++ nagi-2.07b/src/tools/savefont.c @@ -62,8 +62,8 @@ u8 *ch_ptr; u8 ch_check; - file = fopen("font_4x8.fnt", "w"); - + file = fopen("/usr/share/nagi/font_4x8.fnt", "w"); + this_font = &font_4x8; --- nagi-2.07b.orig/src/version/standard.c +++ nagi-2.07b/src/version/standard.c @@ -794,9 +794,9 @@ GAMEINFO *game_selected; dir_preset_change(DIR_PRESET_NAGI); - ini_standard = ini_open("standard.ini"); + ini_standard = ini_open("/etc/nagi/standard.ini"); text_init(); // read in standard parameters config_load(config_standard, ini_standard);
diff -urN ../tmp-orig/nagi-2.07b/src/objects.c ./src/objects.c --- ../tmp-orig/nagi-2.07b/src/objects.c 2002-11-01 11:32:28.000000000 +0100 +++ ./src/objects.c 2004-07-21 17:39:15.081471539 +0200 @@ -146,6 +146,7 @@ count = 0; obj_continue: + continue; } // bung in a '\0' at the end if one doesn't exist diff -urN ../tmp-orig/nagi-2.07b/src/ui/cmd_input.c ./src/ui/cmd_input.c --- ../tmp-orig/nagi-2.07b/src/ui/cmd_input.c 2002-11-01 11:32:28.000000000 +0100 +++ ./src/ui/cmd_input.c 2004-07-21 17:44:08.445769637 +0200 @@ -94,7 +94,6 @@ case 10: // mouse mouse_event_handle(si); break; - default: } si = control_key_map( event_read() ); } diff -urN ../tmp-orig/nagi-2.07b/src/ui/events.c ./src/ui/events.c --- ../tmp-orig/nagi-2.07b/src/ui/events.c 2002-11-01 11:32:30.000000000 +0100 +++ ./src/ui/events.c 2004-07-21 17:43:56.790022601 +0200 @@ -314,7 +314,6 @@ agi_event = event_mouse_button(event.button.button,event.button.x,event.button.y); break; - default: } } diff -urN ../tmp-orig/nagi-2.07b/src/ui/list_box.c ./src/ui/list_box.c --- ../tmp-orig/nagi-2.07b/src/ui/list_box.c 2002-11-01 11:32:30.000000000 +0100 +++ ./src/ui/list_box.c 2004-07-21 17:44:33.050013795 +0200 @@ -204,7 +204,6 @@ force = 2; break; - default: } if (item_cur < 0) diff -urN ../tmp-orig/nagi-2.07b/src/ui/menu.c ./src/ui/menu.c --- ../tmp-orig/nagi-2.07b/src/ui/menu.c 2002-11-01 11:32:30.000000000 +0100 +++ ./src/ui/menu.c 2004-07-21 17:44:22.444063864 +0200 @@ -357,7 +357,6 @@ menu_draw(si); break; - default: // NONE? } break; } diff -urN ../tmp-orig/nagi-2.07b/src/ui/msg.c ./src/ui/msg.c --- ../tmp-orig/nagi-2.07b/src/ui/msg.c 2002-11-01 11:32:30.000000000 +0100 +++ ./src/ui/msg.c 2004-07-21 17:43:44.723354983 +0200 @@ -385,7 +385,6 @@ msg = r_display1f93(word_string[my_num], msg); break; - default: } break; diff -urN ../tmp-orig/nagi-2.07b/src/view/obj_loop.c ./src/view/obj_loop.c --- ../tmp-orig/nagi-2.07b/src/view/obj_loop.c 2002-11-01 11:32:30.000000000 +0100 +++ ./src/view/obj_loop.c 2004-07-21 17:43:09.498163644 +0200 @@ -62,7 +62,6 @@ else c = max; break; - default: } obj_cel_set(v, c); diff -urN ../tmp-orig/nagi-2.07b/src/view/obj_motion.c ./src/view/obj_motion.c --- ../tmp-orig/nagi-2.07b/src/view/obj_motion.c 2002-11-01 11:32:30.000000000 +0100 +++ ./src/view/obj_motion.c 2004-07-21 17:43:20.072119818 +0200 @@ -66,7 +66,6 @@ case MT_MOVE: obj_move_update(v); break; - default: } if (state.block_state == 0) diff -urN ../tmp-orig/nagi-2.07b/src/view/obj_proximity.c ./src/view/obj_proximity.c --- ../tmp-orig/nagi-2.07b/src/view/obj_proximity.c 2002-11-01 11:32:30.000000000 +0100 +++ ./src/view/obj_proximity.c 2004-07-21 17:42:50.886760996 +0200 @@ -40,6 +40,7 @@ return 1; loc472e: + continue; } } return 0;
diff -aurE old/nagi-2.07b/src/Makefile.common src/Makefile.common --- old/nagi-2.07b/src/Makefile.common 2002-11-01 12:32:28.000000000 +0200 +++ src/Makefile.common 2005-01-03 18:13:52.000000000 +0200 @@ -59,7 +59,6 @@ #CFLAGS += -pg CFLAGS += -O2 #CFLAGS += -finline-functions -CFLAGS += -fwritable-strings # Warnings CFLAGS += -Wall -Winline -Wshadow -Wstrict-prototypes diff -aurE old/nagi-2.07b/src/initialise.c src/initialise.c --- old/nagi-2.07b/src/initialise.c 2005-01-03 18:10:35.000000000 +0200 +++ src/initialise.c 2005-01-03 17:59:10.000000000 +0200 @@ -89,6 +89,7 @@ u8 env_value[50]; #endif INI *ini_nagi; + char tmp[512]; memset( &state, 0, sizeof(AGI_STATE) ); state.word_13f = 0x0F; @@ -103,7 +104,8 @@ // read nagi.ini dir_preset_change(DIR_PRESET_NAGI); - ini_nagi = ini_open("/etc/nagi/nagi.ini"); + strcpy(tmp, "/etc/nagi/nagi.ini"); + ini_nagi = ini_open(tmp); config_load(config_nagi, ini_nagi); ini_close(ini_nagi); diff -aurE old/nagi-2.07b/src/sys/agi_file.c src/sys/agi_file.c --- old/nagi-2.07b/src/sys/agi_file.c 2002-11-01 12:32:28.000000000 +0200 +++ src/sys/agi_file.c 2005-01-03 18:02:43.000000000 +0200 @@ -121,12 +121,15 @@ -FILE *fopen_nocase(u8 *name) +FILE *fopen_nocase(u8 *orig_name) { #ifdef RAD_LINUX DIR *dir; struct dirent *fileent; FILE *ret; + char name[512]; + + strcpy(name, orig_name); dir = opendir("."); string_lower(name); diff -aurE old/nagi-2.07b/src/sys/memory.c src/sys/memory.c --- old/nagi-2.07b/src/sys/memory.c 2002-11-01 12:32:28.000000000 +0200 +++ src/sys/memory.c 2005-01-03 13:02:46.000000000 +0200 @@ -84,7 +84,7 @@ } return_ptr = mem_ptr; - (u8 *)mem_ptr += size; + mem_ptr = (u8 *)mem_ptr + size; update_var8(); if (mem_ptr > mem_max) mem_max = mem_ptr; diff -aurE old/nagi-2.07b/src/version/standard.c src/version/standard.c --- old/nagi-2.07b/src/version/standard.c 2005-01-03 18:10:35.000000000 +0200 +++ src/version/standard.c 2005-01-03 17:59:49.000000000 +0200 @@ -792,9 +792,11 @@ INI *ini_standard; LIST *list_game; GAMEINFO *game_selected; + char tmp[512]; dir_preset_change(DIR_PRESET_NAGI); - ini_standard = ini_open("/etc/nagi/standard.ini"); + strcpy(tmp, "/etc/nagi/standard.ini"); + ini_standard = ini_open(tmp); text_init(); // read in standard parameters
_______________________________________________ Fedora-games-list mailing list Fedora-games-list@xxxxxxxxxx http://www.redhat.com/mailman/listinfo/fedora-games-list