bytedeco / javacpp

The missing bridge between Java and native C++
Other
4.5k stars 586 forks source link

OpenBSD support #785

Open glowiak opened 3 weeks ago

glowiak commented 3 weeks ago

Good morning day evening whenever you are reading this.

JavaCPP is a dependency of Jaylib (https://github.com/electronstudio/jaylib), which I use in my games.

With Linux becoming more and more bloated I would like to switch to something simpler, with OpenBSD being the best available option.

Jaylib doesn't ship with OpenBSD natives, so I though of building it myself.

The build script (build_java.sh) uses JavaCPP to autogenerate bindings.

And, JavaCPP said:

"Nothing targetted for ../gen/com/raylib/Raylib.java"

After browsing javacpp.jar for a while I found a directory with configurations and noticed the lack of an OpenBSD configuration.

Therefore I repacked the jarfile adding an OpenBSD one (which is a copy of the Linux config with clang++ instead of g++).

But that didn't change anything. The error message stays still the same.

I am not giving any detailed tracelogs, because JavaCPP does not print such.

Can there be OpenBSD (and possibly also NetBSD) support added in reasonable future? Thanks in advance.

saudet commented 3 weeks ago

First, we probably need to update Loader.Detector code so that it returns something sane like "openbsd-x86_64": https://github.com/bytedeco/javacpp/blob/master/src/main/java/org/bytedeco/javacpp/Loader.java And then, it should be only a matter of adding properties here, yes: https://github.com/bytedeco/javacpp/tree/master/src/main/resources/org/bytedeco/javacpp/properties