Compiling on NetBSD

All your MAngband related technical questions answered. Problems compiling or running the game/server? No problem! Ask here.
Post Reply
xeitgeist
Blubbering Idiot
Posts: 1
Joined: Wed 04.08.2010, 23:08

Compiling on NetBSD

Post by xeitgeist » Thu 05.08.2010, 01:12

I'm running NetBSD 5.0.1 and I can't get Mangband to compile. I tried compiling with USE_GCU, USE_CAP, and USEHARDCODE and none of them worked. I don't have x11 or sdl, but it should compile without these, so I'm not sure what's wrong.

Make log: http://pastebin.com/TFqZSeth
Configure log: http://pastebin.com/tkuTNZeg

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Compiling on NetBSD

Post by Flambard » Sun 08.08.2010, 18:43

Hi there!

Two following changes are to be done to allow NetBSD compile with base libcurses:
1. Remove/comment '#define USE_NCURSES' from src/config.h
2. Apply the following patch:

Code: Select all

--- src/client/main-gcu.c	2009-04-27 18:52:36.000000000 +0400
+++ src/client/main-gcu.c	2010-08-09 05:04:15.000000000 +0400
@@ -491,7 +491,7 @@
 		mvcur(curscr->cury, curscr->curx, LINES - 1, 0);
 #else
 		/* this moves curses to bottom right corner */
-		mvcur(curscr->_cury, curscr->_curx, LINES - 1, 0);
+		mvcur(getcury(curscr), getcurx(curscr), LINES - 1, 0);
 #endif
 
 		/* Exit curses */
@@ -569,7 +569,7 @@
 	mvcur(curscr->cury, curscr->curx, LINES - 1, 0);
 #else
 	/* This moves curses to bottom right corner */
-	mvcur(curscr->_cury, curscr->_curx, LINES - 1, 0);
+	mvcur(getcury(curscr), getcurx(curscr), LINES - 1, 0);
 #endif
 
 	/* Flush the curses buffer */
Thank you for bringing this to our attention. Next version will have those fixes included and will probably support BSD make as well.

Notes:
This probably won't work if you have ncurses installed from pkgsrc.
Your machine hostname MUST be specified and non-empty for client not to crash.
CAP client is not to be used and is unsupported for a very long time now :(

Post Reply