Building on FreeBSD


I’m trying to build my prefered browser on my prefered OS. Chromium is not supported by default on BSDs, so I need to use the patched Chromium from FreeBSD Ports Collection to be able to build Brave on it.

To do this task I need to set my local path where chromium is fetched manually instead using depot_tools, then I can apply the FreeBSD patches before building Brave. How can I skip depot_tools?


1 Like

Just taking a guess here- but I’d start by looking at the depot_tools references in brave-browser:

You should be able to remove it from .gitmodules and instead have your own depot tools that you set the PATH for

1 Like

@brunomaximom I’m not sure what steps are involved in building on FreeBSD. Can you link to some instructions?

If you’re curious, we do use depot_tools to build the official Brave packages on Linux, so if its just concern over using depot_tools, maybe that will allay your fears. But if the issues is more related to having to replace a Chromium URL in depot_tools with a Brave location it may not be possible to do what you’re asking.

Clarification of your question would be helpful.


1 Like

@clifton @mbacchi look here:

The Makefile downloads the chromium source code and apply the patches in files/ directory, then builds the chromium source. I can just download with make fetch and apply patches with make patch, then I believe I could run the Brave build process with no problems.

But to be able to do it, I need to pass the freebsd’s chromium already patched directory to Brave build process rather than Brave using depot_tools to download original chromium source.

If I remove depot_tools from .gitmodules, it won’t change the build process to use patched chromium dir.

Any idea?

So there are a number of things that happen when a Brave build runs. We first run our init, which downloads dependencies, then we perform patching of the Chromium source using gclient hooks(part of depot_tools):

We leverage the Chromium tooling and build with GN once Brave patches are applied. If you were interested in doing the same you would likely want to apply your own patches on top of the Brave patches, rather than using a Makefile to do your patching earlier in the process. This solution likely won’t be as simple as adding your patches to the brave-core/patches directory(at this moment), but you might want to move in that direction, by making your patching apply on top of Brave patched files.

We don’t have the cycles to be hands on assisting this effort but we could give you pointers.

Hope this helps.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.