Having got a new server, this time running OpenBSD; I’ve been slowly moving stuff over from the old raspberry pi.
A kind reader left a tip on my previous post about cgit; there’s another program called stagit. It’s conveniently packed for openBSD in the ports system!
However; I would like to customize it a bit, which means recompiling it. I can start looking into the BSD ports system and how to compile them (it looks very simple, I should do this anyway!), or I can figure out how to cross compile it from my linux laptop …
There’s a project called allyourcodebase which contains configuration to compile popular software with the Zig build system. Zig usually makes it very easy to cross compile! Since stagit is built with a nice simple Makefile it was easy to write a roughly equivalent build.zig. Cross compiling to openBSD however isn’t quite as straightforward as it doesn’t yet have tier 1 support. Luckily there’s a convenient repo which makes it reasonably easy, if not quite as trivial as other platforms.