Compile slash'EM under mac os x?

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Hi all,

I'm trying to get slash'EM to compile under mac os x (the mac
version for slash'EM I found runs ok but launches the old mac
system, and I'd just like something I can run from an xterm in
tty mode), and I'm pathetically failing.
I've had a look at the nethack installation script I have, which
installed nethack with no problem, and which seems to patch the
configuration files before launching the compilation. As I know
nothing of patching, the only solution I see, since I am not very
competent in these matters, is to compare the patched files for
nethack with the original ones, and try to apply similar changes
to the configuration files of slashem (I tried to patch the slashem
files with the nethack patch but this of course fails). This
however seems very tedious.

I wondered if someone had already tried to compile slash'EM under
mac os x and could share experiences with me?

Clemence
 

edwin

Distinguished
Jan 1, 2004
23
0
18,510
Archived from groups: rec.games.roguelike.nethack (More info?)

Clemence Magnien wrote:
> I wondered if someone had already tried to compile slash'EM under
> mac os x and could share experiences with me?

I did it some time ago, so I may not be remembering everything
correctly. Basically, you follow the instructions as if you were
compiling for BSD, choosing ncurses as the windowing library in the
Makefile. The only gotcha I found was that it didn't like the
definition of srandom() in system.h, so I commented those lines out and
it worked fine.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Edwin wrote:
> Clemence Magnien wrote:
> > I wondered if someone had already tried to compile slash'EM under
> > mac os x and could share experiences with me?
>
> I did it some time ago, so I may not be remembering everything
> correctly. Basically, you follow the instructions as if you were
> compiling for BSD, choosing ncurses as the windowing library in the
> Makefile. The only gotcha I found was that it didn't like the
> definition of srandom() in system.h, so I commented those lines out and
> it worked fine.

Thanks for your help. I definitely had to follow your instructions,
but that was not enough. But I got some help on irc and I succeeded.

In case someone needs it for the future, here is the list of the
modifications I made to the configuration files:
- all changes suggested by Edwin, plus
- in config.h, after the lines
#ifdef TTY_GRAPHICS
# define MENU_COLOR
add the following lines:
#undef GNU_REGEX
#undef POSIX_REGEX
#undef USE_REGEX_MATCH
- in unixconf.h, replace the block
#if defined(USE_REGEX_MATCH)
# if defined(__FreeBSD__) || defined(__OpenBSD__)
# define POSIX_REGEX
# else
# define GNU_REGEX Clem
# endif
#endif
by the following line:
#define POSIX_REGEX

Clemence