Create a .bep file for Haikuporter to build latest version of bzflag Haiku
Status: Closed Time to complete: 72 hrs Mentors: Barrett, Scott McCreary, Richie Nyhus Tags: C, C++

This task requires creating a .bep file to allow Haikuporter to build from source code the listed package.  You will need a working installation of Haiku, this could be on real hardware or in a VM, and haikuporter which can be installed by following the install instructions at HaikuPorts

Some knowledge of C, C++ may or may not be required in order to complete this task.  Knowledge of the GNU autotools and/or cmake may also be helpful.  The package may or may not require some patching to get it to work on Haiku.  For these cases don't be afraid to ask for help.  Many compile issues can be figured out by reading through the various wiki pages at HaikuPorts.  Also google (or other web search engine) may be of help in finding solutions to build issues that you may run into, irc channel #haiku on freenode might also be of help.  Be sure to follow the correct format for creating your .bep file, including the license and copyright entries.

Previous work on bzflag can be found here:

http://ports.haiku-files.org/ticket/361

Updating to the latest version of bzflag may fix the issue that was reported in the trac ticket listed above.

For this task we would like to see a screenshot of it running on Haiku, your bep and any patch files and the output of terminal showing the complete building output.

 

Uploaded Work
File name/URL File size Date submitted
bzflag-haiku.zip 404.0 KB December 28 2012 08:15 UTC
Comments
qxcv on December 27 2012 09:30 UTC Task Claimed

I would like to work on this task.

Jérôme Duval on December 27 2012 10:51 UTC Task Assigned

This task has been assigned to qxcv. You have 72 hours to complete this task, good luck!

qxcv on December 28 2012 08:08 UTC Progress


I'm uploading what I've done so far. A few points;



  • Upgrading to the latest bzflag didn't fix the socklen_t problem. I ended up putting fixes for their socket calls where the type causes a problem. There are also a few places where they've casted from int* to socklen_t*, which will probably break on other platforms but should be fine on Haiku (at least for now) since sizeof(socklen_t) == sizeof(int).

  • Haiku's implementation of FD_ZERO in sys/select.h is broken. It calls memset() without pulling in string.h.

  • Haiku's GLEW port is incomplete (marked "broken" in the .bep) and should probably have a ticket on haikuports trac. I got around this by hacking GLEW out of bzflag in the patch.

  • So far, starting bzflag and connecting to a server (via its IP address) works.

  • Server listing works.

  • Starting your own server does not work.

  • Connecting to a server using its domain name does not work (possibly an issue with C-Ares, which bzflag uses for async DNS requests).

  • The game does not exit cleanly (it crashes or hangs).


I'll try and fix what I can, and re-upload if I succeed.

Jérôme Duval on December 28 2012 12:04 UTC Ticket for FD_ZERO

see http://dev.haiku-os.org/ticket/9327

qxcv on December 28 2012 12:15 UTC Server

It turns out that the server works, I just hadn't given it enough memory to play with in the VM. I haven't been able to figure out the cause of the hanging or the name resolution problem, though, so I'll mark as complete and let you see if I'm missing anything.

qxcv on December 28 2012 12:15 UTC Ready for review

The work on this task is ready to be reviewed.

Scott McCreary on December 30 2012 03:11 UTC Task Closed

Congratulations, this task has been completed successfully.