The ports `libvorbis`, `readline` and `timidity` would not install on
macOS as a result of using `sed -i` without an extension provided. GNU
sed is available through Homebrew, but it does not replace `sed` by
default.
Instead, provide a new `sed_in_place` function that calls `sed` with the
right arguments.
Sets `$LD` to `$HOST_LD` in `.port_include.sh` if it is defined as well,
else it will be set to `ld`.
Makes libiconv build with the Clang toolchain.
This also impacts other ports when building them with the Clang
toolchain, and might result in more ports building correctly.
The ScummVM icon repository no longer accepts "1970-01-01" as a valid
start date for the icon pack generation. We now use the oldest commit
date in the repository which _is_ accepted.
If a developer built cmake (or we built it for them) from source, make
sure that port builds can find that version of CMake that has the
SerenityOS platform files included.
:yakkie:
The build process for the Zig compiler is more involved than most of
the other ports, because the Zig compiler is mostly self-hosting. In
order to build it, the zig-bootstrap build system is used, which does
the following:
1) Build LLVM for the host OS;
2) Build Zig for the host OS with the SerenityOS target enabled;
3) Build zlib, zstd and LLVM for SerenityOS using `zig cc` as the C/C++
compiler;
4) Build Zig for SerenityOS using the host Zig.
A few hacks are required in order to tell `zig cc` and zig about what
Serenity's libc looks like in the build process, but other than that
it's fairly straightforward. All of the patches that are included with
this commit are Zig-upstream ready once the LLVM patches are upstreamed.
When using cmake --build, CMake will look for this environment variable
to enable parallelism. The Zig port, for example, uses cmake --build,
and will otherwise use a single core if cmake selects Make as the build
system. This should help with all ports which use cmake --build.
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
This makes the port install drop the CMake install files into the
sysroot, which is friendlier to macOS users. Homebrew CMake really
likes to pick homebrew zstd, even for cross-builds.
When building a port with `useconfigure="false"`, the `do_configure`
function invokes a `buildstep` with multiple positional arguments as the
command to execute.
It then tests whether the positional arguments evaluate to an emtpy
string, but could fail when multiple positional arguments were provided.
This resulted in the following warning when building the Composer port,
for example:
../.port_include.sh: line 16: [: echo: binary operator expected
Prevent this warning by testing against the number of positional
arguments, instead.
Since ac40197047 LibCrypt has its own library. PHP tries to detect the
`crypt_data` struct but fails to do so since it cannot find `crypt.h`.
By adding this explicit include path, PHP builds again.
These were no longer being picked up after some recent changes. Since
port builds happen in subshells nowadays, we can get rid of the export /
unset combo anyway.
This fixes ScummVM crashing on startup, caused by `-fvisibility` not
being set.