This particular homebrew is open source?
If yes - then look for the source code, change what you need, and build your version.
If not - well... you can try to hack it somehow. Just don't ask "how" in general. There is no single general approach to such things.