Ports such as python require a distinction between host readelf and
target readelf. Set a toolchain-specific varaible for these, but be sure
save off the host readelf binary in case anyone needs it later.
This is part of allowing python to build with the Clang toolchain.
Previously, only `manual` installs would register dependencies of an
installed port package. Since in the future we might want to check all
dependents, not only those for manually installed packages, we should
take care to register dependencies for `auto` installs as well.
Additionally, this surpresses some unnecessary verbose output from the
package management and fixes warnings when the package DB directory did
not yet exist.
This commit introduces the changes needed in the port build system that
will allow us to compile ports with Clang. Note that many ports still
don't build, especially due to linker differences. Fixing these is
outside the scope of this PR.
For now, building bash, ncurses and nano is known to work. Bash runs
fine, while nano crashes due to DT_VERSYM not being supported by our
dynamic loader.
We may need entries with spaces in makeopts, installopts, and
configopts, and at that point we should also convert depends and
auth_opts to avoid confusion.
This is too much bash magic for a simple "Use this value if the script
doesn't set anything", especially since only one default setting depends
on values from the script.
When building a port as a dependency for another port the HOST_*
variables were previously initialized with values referring to the
SerenityOS toolchain.
Fixes#9168.
When installing an icon, we fall back to a resizing strategy when an
exact match on the image dimensions is missing. However, if we are
dealing with an `.ico` file with multiple indices, `convert` will
resize every separate index and will create multiple files.
This changes makes sure we only resize the first index. A future
improvement could be to select an index most closely matching the
requested dimensions.
This adds an overridable pre_fetch method which is called from the fetch
method at the very beginning.
The pre_fetch method can be overridden in your package.sh script so that
you can do any necessary preparations before the fetch method is called.
This changes the .port_include.sh script so that ports can more easily
create more than one launcher by making the install_launcher function
available to the port's package.sh script.
This creates launchers for the stpuzzles port in the Games/Puzzles
category.
This was breaking ports linting, which runs the script with the
'showproperty' option. This check is not needed for some other options
as well, so let's do it conditionally.
Simply by checking whether a built libc.so exists, we should be able to
avoid strange build errors where that's not the case and just tell the
user upfront.
Fixes#7309.
Commit b3db01e20 broke simple commands without arguments like:
./package.sh clean
Now, all available arguments are passed along, even if there are none.
This adds support for detecting incorrect version numbers and links
in the ports list.
Also, unlike before it doesn't parse the package.sh script but executes
it instead which allows us to detect syntax errors.
Previously we'd end up building some ports multiple times, e.g.
as a dependency for another port. This changes the build_all.sh
script so that it builds ports only once.
This is useful for ports which depend on running tools on the host system.
In this case we can build the port twice - once for the host and once for
the target system.
install-ports copys the necessary files from Ports/ to /usr/Ports. Also
refactor the compiler and destiation variables from .port_include.sh
into .hosted_defs.sh. .hosted_defs.sh does not exists when ports are
built in serenity
There's pre_configure to do things required by the configure script,
let's also add post_configure for things not covered by the configure
script.
The specific use case is overwriting a file created by python3's
configure script.
When removing and recreating the Build directory, it's quite annoying
having to edit/remove Ports/packages.db as the installer won't install
previously installed port dependencies again if they're still listed.
This problem is easily solved by just considering packages.db a
build-specific file.
Let's keep things consistent, .diff is the name we use pretty much
everywhere. Also tweak the glob in .port_includes.sh to be
'patches/*.patch' rather than just 'patches/*'.
* Add SERENITY_ARCH option to CMake for selecting the target toolchain
* Port all build scripts but continue to use i686
* Update GitHub Actions cache to include BuildIt.sh
This is useful if we want to do something after patching but before
running the configure script - e.g. creating the configure script using
another script :^)
I've added a post_install step to the system that allows you to run
arbitrary commands after the regular install step.
This allows scripts that start with "#!/bin/bash" to work in Serenity.