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.
* Add authenticity methods: sig, asc, md5sum, sha1sum, sha256sum
* Split patch into own step
* Improve extraction and patching: only do it, if it hasn't already be done,
to do that, hidden files are created when a file is extracted or a patch is
applied
* Patch function is named patched_internal to not overwrite patch command in /usr/bin
When running ./package.sh to rebuild an already installed port, we would not
want to spend time re-downlodaing the same tarball again. Ideally, this should
use some sort of hash checking to ensure the file is not truncated or something,
but this is good enough for now.
Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh
have been left largely untouched due to use of Bash-exclusive
functions and variables such as $BASH_SOURCE, pushd and popd.
Much redundancy is removed from package scripts with this system.
It also supports simple dependency management, uninstalling (through
BSD ports style plist files), cleaning up after itself (with clean,
clean_dist, clean_all commands), etc.
I didn't look into why, but for some reason the SDL2 cmake build system
thinks it should build against PulseAudio which we definitely don't have.
So just tell it explicitly not to do that.
Fixes#265.