Friday, October 12, 2007

Porting the “bsdgames” to Mac OSX - 31/47 complete!


Individual opinions may differ, but to my mind the traditional BSD games package contains some of the most influential games of history, even if most people have never heard of them.


When I recently got my new Macbook Pro for work, I started collecting all the bits and pieces to make it my home. Fink and MacPorts got me most of the way, but neither had packages for those games, so I set to making them work.


Prerequisites: I am using Mac OS X 10.4.10, so that's what's tested, and this will require the developers tools.


First, I had to find sources that weren't mangled for Linux porting. I found them here and used Cyberduck to grab the entire tree.


Second, I created a happy environment for them... mkdir /usr/games /usr/share/games /var/games and a few straglers you'll see while compiling.


Most of the games needed nothing more than changing into their directory, and running:


# bsdmake; sudo bsdmake install



That took care of arithmatic, backgammon, banner, bcd, bs, caesar, countmail, cribbage, factor, fish, grdc, hangman, mille, morse, number, pig, pom, ppt, primes, rain, sail, wargames, worm, worms, wtf, and wump.


Rogue compiled perfectly, but complained of a missing file on install. A moment on Google turned up this file, which I gzipped and placed in the USD.doc folder, and then the install went fine.


The next batch of problems surrounded the setresgid function. This doesn't exist as such on Mac OS X, so another round of googling tuned up the following answer - replace:


setresgid(gid, gid, gid);


with:


setgid(gid);


setegid(gid);


That fixed: battlestar, canfield, robots, and snake.


I am still working on making a few work, ones that have more esoteric things going wrong so far... adventure, atc, boggle, dab, dm, fortune (though this has a working port in fink and MacPorts), gomoku, hack, hunt, monop, phantasia, quiz, random, tetris, and trek.


I will be working on those stragglers and then maybe building packages for Fink or MacPorts, stay tuned for updates.


Technorati Tags: , , , ,

5 comments:

Eliot said...

Wonderful! Please let me know if you do make a package. I used to love trek back in the day when it was running on the PDP-11. ;)

Kris Browne said...

Another friend is working on creating a repository for the work I was doing and continuing the progress. He's more into Fink than me, so that will probably be involved.

Dave said...

glad to see discussion continuing on this two years later. :)

I REALLY would love a "checkinstall" package for fink or macports. It would make building packages rather trivial. (I use it on my ubuntu system to make ANYTHING I compile and install "easily removable" via apt-get or dpkg. Even if you simply "remove then upgrade" when the latest version comes out)

Other essential packages are alien (convert deb's to rpm's to slackware, and back again) and fakeroot (for giving a fake root prompt, useful for building packages as root, but not being root)

Dave

Unknown said...

Any word on that repository? Just love these little time wasters. :)

Unfortunately I have not upgraded my little g3 imac from 10.3.9 to 10.4. I am considering attempting an install from source... what problems could you forsee, or any advice would be wonderful.

Once again, thanks for your work here. Best of the season!

Charles

وليد العروى said...


شركة كشف تسربات المياه بنجران
شركة تسليك مجاري بنجران
شركة عزل اسطح بابها
شركة جلي بلاط بابها