C/C++ Game of Trees (got)

unitrunker

Aspiring Daemon

Reaction score: 250
Messages: 549

https://gameoftrees.org/

I like the idea a BSD friendly git work-alike. Like most OpenBSD projects - this one is ISC licensed. The code is very much entrenched into OpenBSD's own eco-system.

1. pledge, unveil, recallocarray.
2. imsg (which thankfully already exists in ports as part of libopenbsd).
3. endian.h
4. util.h
5. SIMPLEQ_XXXX

How hard would it be to port this to FreeBSD? Turns out it wasn't a terrible ordeal. There are some hacks not shown here - I'll put something out later. I've attached the CMakeLists.txt so you can see there's no smoke and mirrors. For simplicity, I copied all the .c and .h files to a flat directory.

I have all parts built but need to do some testing to verify the resulting disk files are correct. I have stubs for #1 above. To achieve feature parity, capsicum is required.

Dependencies:
curses
openbsd
panel
pthread
util
zlib

Big difference is I am using cmake and clang to build everything. More later ...
 

Attachments

  • CMakeLists.txt
    2.8 KB · Views: 82

kpedersen

Son of Beastie

Reaction score: 2,096
Messages: 2,954

I had no idea this existed. Very interesting and I might have a play.
 
OP
U

unitrunker

Aspiring Daemon

Reaction score: 250
Messages: 549

Here's a tarball. It includes three unit tests.

  • delta_test
  • idset_test
  • path_test

All pass - which is encouraging but no idea yet how well this will work.

http://www.unitrunker.com/got/got.tgz

It's cmake so ...

$ tar -xvf got.tgz
$ cd got
$ mkdir build
$ cd build
$ cmake ..
$ make

Should give you 12 executable files - including the three unit tests above.

Enjoy!
 
OP
U

unitrunker

Aspiring Daemon

Reaction score: 250
Messages: 549

Thanks to Christian Weisgerber (naddy), got is now in ports!

 
Top