Brian,

I added a CMake option last week called ENABLE_NETWORK_DOWNLOADS that should
make one of your patches obsolete. Setting it to OFF should have the desired
effect. We recently added another required download for the Public Suffix
list from https://github.com/publicsuffix/list as well.

I'm surprised by your clang 15 -> clang 13 patch. Last time I tried to use
that version of clang to compile ladybird, the compiler ICE'd pretty badly.

Ladybird is known to work on both amd64 and aarch64, fwiw. I've at least
tested it on aarch64 macOS and Asahi Linux (on the same Apple silicon
machine)

Your build script looks similar-ish to a few that I've been messing around
with for nixOS [1] and Flatpak [2]. I'm not sure what the best way around
manually setting up the Cache directory for the data files is though.

If you want /usr/local/ladybird/res then passing -DCMAKE_INSTALL_DATADIR
should do the right thing, assuming you also patch Ladybird/Utilities.cpp
to tell Ladybird where its "resource root" is (i.e. /usr/local/ladybird).

One snag with bumping up to a revision with ENABLE_NETWORK_DOWNLOADS is that
I moved the "current binary directory" detection logic out of Qt to reduce
the
dependence on Qt in the helper processes (WebContent, RequestServer, etc).
But all the googling I tried showed that OpenBSD doesn't have a good way to
figure that out aside from looking for argv[0] in $PATH. The logic is in
LibCore/System.cpp:1734 in current_executable_path. Of course for what it's
used for in Ladybird, one could simply hardcode "/usr/local/bin/foobar" and
it would probably work.

[1] https://github.com/NixOS/nixpkgs/pull/248456/files
[2]
https://github.com/bugaevc/ladybird-gtk4/blob/master/org.serenityos.Ladybird-gtk4.json#L35C25-L35C25

- Andrew Kaster

On Sun, Aug 20, 2023 at 1:32 PM Brian Callahan <bcal...@posteo.net> wrote:

> Hi ports --
>
> Attached is a new port, www/ladybird. Ladybird is an independent web
> browser from the SerenityOS project. Posting it here because I know
> there are some people who are looking for a port.
>
> ---
> pkg/DESCR:
> Ladybird is an independent cross-platform web browser based on the
> LibWeb and LibJS engines from SerenityOS.
> ---
>
> There is a little bit of messiness in the port:
> 1. There are a number of dependencies that CMake tries to download at
> configure time. That's obviously no good for us so everything gets
> pre-downloaded and set up before CMake is run.
> 2. There are a lot of files installed to /usr/local/res -- this seems to
> be a paradigm of SerenityOS itself. I looked into trying to set up
> something more sane (maybe /usr/local/ladybird/res) but it looks like
> those tendrils are everywhere so perhaps a better strategy is worthwhile.
>
> This does in fact build and run on amd64. Don't expect miracles but it
> is more web compliant than dillo and possibly more web compliant than
> netsurf. It does have a mostly complete JavaScript engine, but it is
> slow. It was somewhat able to load the YouTube homepage after some time,
> for example. Does not play video though.
>
> If you're looking for a package so you can play around with it without
> compiling:
>
> https://github.com/ibara/ports/releases/download/v1.0/ladybird-0.0.0pl20230719.tgz
>
> Not necessarily looking for OKs right now; feedback might be more
> appropriate.
>
> ~Brian

Reply via email to