dcantrell / bsdutils

Alternative to GNU coreutils using software from FreeBSD
Other
169 stars 9 forks source link

Question: Haiku port #27

Closed extrowerk closed 2 years ago

extrowerk commented 2 years ago

Hi,

i plan since long to port the bsd iserland to Haiku to reduce the count of the gpl’ed dependencies (which isnt free in my eyes). So far i was unable to extract the necessary files from bsd, so no real progress. Seeingyou have epos with the sources i planning to try to build all of them on Haiku and write recipes for the package builders. Possibly some patching will be nevessary here and there. Would you accept Haiku specific patches?

dcantrell commented 2 years ago

Sure, I will accept Haiku patches. I am in the process of restructuring this source tree anyway to eliminate the distinct patch files and use git tags where I do an initial import from FreeBSD then apply patches. But don't worry about that, just submit your PRs for Haiku support and we will go from there.

extrowerk commented 2 years ago

Thanks for the feedback. I've started with libxo: https://github.com/haikuports/haikuports/pull/6321

extrowerk commented 2 years ago

Just tried to build bsdutils with the fresly baked libxo, here is my buildlog: https://gist.github.com/extrowerk/718b1ad0720ae1515fc08ce713519f2c

I haven't applied any Haiku specific patches, and i don't know how am i supposed to use the supplied patches in the bsdutils tree. Can you give me some hints?

dcantrell commented 2 years ago

It looks like you're going to need to include some additional headers specific to Haiku. I don't know how Haiku is structured, but it looks similar to BeOS (it has been a very long time since I've used BeOS).

What I recommend doing is forking this repo and making your changes in your repo. Once you get things compiling, send me a pull request and I will look over it and offer suggestions on how to fix up the pull request or any changes to make. When it looks good, I will merge it.

Guard Haiku-specifics with macros. If Haiku doesn't offer something like haiku, then I recommend modifying meson.build to detect if you are building on Haiku and if so define a unique macro that indicates you are on Haiku.

Good luck.

dcantrell commented 2 years ago

Oh, and the patches/ subdirectory contains the changes made to the upstream FreeBSD sources after import from FreeBSD. These will be going away in the future, but was an early way on how I structured the project.