summaryrefslogtreecommitdiff
path: root/Ports/.port_include.sh
AgeCommit message (Collapse)Author
2023-02-02Ports: Install all dependencies instead of just oneJelle Raaijmakers
Commit 9b7e217dda0c45 broke installation of port dependencies by `return`ing as soon as the first dependency was found.
2023-01-29Ports: Use absolute path of port_includeJan200101
This ensures that .port_include will always import other scripts from the correct location.
2023-01-29Ports: Support multiple port directoriesJan200101
This allows Ports unfit for the main repository to be put elsewhere.
2023-01-19Ports: Fix compatiblity issues with running package.sh on SerenityPeter Elliott
2023-01-09Ports: Make `sed` work on macOSJelle Raaijmakers
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.
2023-01-06Ports: Set `$LD` for Clang, GCC and host in `.hosted_defs.sh`EWouters
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.
2022-12-31Ports: Use absolute path of scriptJan200101
The relative paths are not valid inside a port build directory. This makes target_env source .hosted_defs.sh correctly.
2022-12-11Ports: Export CMAKE_BUILD_PARALLEL_LEVEL for ports scriptssin-ack
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.
2022-11-24Ports: Fix warning when building with `useconfigure="false"`Jelle Raaijmakers
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.
2022-10-25Ports: Fix return statuses with new buildstepsPeter Elliott
previously every buildstep would return a success error code. As a result, all the steps would run even if previous steps failed. I've also added a red status message when this happens.
2022-10-23Ports: Prefix output with the build step and port nameGunnar Beutner
We already have something similar for the toolchain builds. This makes it easier to identify which build step is currently running.
2022-10-17Ports: Allow ports to specify working directory when run from launchercflip
2022-09-18Ports: Only regenerate patches if there are actual changed commitsTim Schumacher
We were previously comparing the hash against the hash after the initial import, which caused us to regenerate patches every time as long as we did have patches (even if they haven't changed at all) and the script entirely missing that it should remove patches if the current commit is the "import" commit.
2022-09-18Ports: Handle generating a ReadMe for an empty patch directoryTim Schumacher
2022-09-18Ports: Place tags at important points in the commit historyTim Schumacher
This helps with easier rebasing and for easier comparing or returning to the state at which the last actual on-disk patches were.
2022-09-18Ports: Unify the git "origin" and the working copyTim Schumacher
I've lost more changes to "you forgot to push the changed commits to the remote" than I'd like to admit, so let's just unify both and only ever use the actual working repository for detemining whether any patches have changed.
2022-09-18Ports: Force full-length file indices when formatting patchesTim Schumacher
This keeps file index lengths from being dependent on internals of the repository.
2022-09-18Ports: Follow symlinks while discovering whether a port has patchesTim Schumacher
This enables us to use `./package.sh dev` with LLVM and GCC.
2022-09-18Ports: Keep `[...]` prefixes while importing patchesTim Schumacher
This stops us from mangling our LLVM patch names and titles when using `./package.sh dev`, as they like to put their category names in square brackets.
2022-09-13Ports: Do not allow `clean*` to be overriddenJelle Raaijmakers
There were only two packages making use of this functionality, but it seems more sensible to have a fixed implementation for the cleaning of ports - especially now they delete the entire build directory and/or dist files.
2022-09-13Ports: Actually clean port build directoryJelle Raaijmakers
The functionality for `./package.sh clean` was a bit weird: based on whether you were working in dev mode, it would try to delete either `$workdir` or `$nongit_workdir` and `*.out` from your `pwd`. The new functionality is pretty clear: `./package.sh clean` deletes the entire build directory for the port regardless of what mode you're in, `./package.sh clean_dist` removes all `$files`, and `./package.sh clean_all` does both.
2022-07-13Ports: Move build directories into Build/Tim Schumacher
2022-07-07Ports: Don't create ccache symlinks for tools we don't haveTim Schumacher
2022-06-19Ports: Use $arch-serenity-pc-clang{++} for CC and CXXAndrew Kaster
This lets us eliminate the extra arguments on CC and CXX for ports that care about CC and CXX pointing to actual filenames they can invoke realpath or basename on.
2022-06-19Ports: Add variables for Toolchain binary directory and cxxfiltAndrew Kaster
2022-06-17Ports: Ensure that `core.autocrlf` is disabled before handling patchesTim Schumacher
While `core.autocrlf=false` should be the default, there will certainly be users that have changed the default setting in their global configuration. Ensure that the setting is disabled to avoid accidentally mangling or not applying our patches.
2022-06-12Ports: Add option to disable ccacheTimur Sultanov
2022-06-08Ports: Format patches without numbering, commit hash or version numberTim Schumacher
2022-06-08Ports: Automatically enter the work directory when running `dev`Tim Schumacher
2022-06-01Ports: Force-add all files when entering `dev`Tim Schumacher
This keeps us from accidentally excluding files that are listed in the `.gitignore` but that are included in the tarball anyways.
2022-05-25Ports: Allow selecting multiple `config_{sub,guess}_path`sTim Schumacher
Some ports may have more than one `config.sub` that is in use (vendored dependencies, etc.). Instead of fiddling about with space-delimited strings, let's just make that setting into an array right away.
2022-05-25Ports: Fix a typo in `get_new_config_guess`Tim Schumacher
While we're at it, we might as well replace the download arguments in `get_new_config_{sub,guess}` with the variable we defined earlier.
2022-05-22Ports: Fully delete Co-Authored-By lines from the ReadMeTim Schumacher
Otherwise, this results in a number of empty lines where Co-Authored-By would have been.
2022-05-21Ports: Sanitize environment before handling PortsTim Schumacher
This keeps users from leaking their host environment variables (CFLAGS, etc.) into Ports, and it keeps us from leaking Port-specific settings into their dependencies.
2022-05-19Ports: Skip Co-Authored-By lines when generating patch ReadMesAli Mohammad Pur
2022-05-19Ports: Make package.sh dev work with ports that have slashes in $workdirAli Mohammad Pur
2022-05-19Ports: Make the patch auto-import script care about the patch's authorsAli Mohammad Pur
Previously it would commit with the current user's git identity, this commit makes it ask the user if they want to retain the original author(s) of the patch as commit authors and co-authors, as well as the original commit date.
2022-05-12Ports: Add $STRIP and $HOST_STRIP variablesDaniel Bertalan
This fixes stripping the debug information from the gcc port when building on macOS hosts.
2022-05-12Ports: Enable ccache for SERENITY_TOOLCHAIN=ClangDaniel Bertalan
2022-05-09Ports: Improve newline support for `./package.sh dev`Jelle Raaijmakers
Previously `git am` could fail on patches with Windows line endings (CRLF). By supplying `--keep-cr`, we prevent git from stripping the CR from our patches.
2022-05-03Ports: Make the number of compile jobs configurableTim Schumacher
2022-04-26Ports: Make .hosted_defs.sh usable outside of .port_include.shcircl
This commit moves some stuff around in order to isolate .hosted_defs.sh from .port_include.sh
2022-04-23Ports: Fix issue with the patches directory being a symlinkDaniel Bertalan
The path of the temporary directory should be an absolute path to account for the patches directory being a symlink like in the upcoming LLVM port update.
2022-04-03Revert "Ports: Fix dependency install if port name is not folder name"Tim Schumacher
This breaks ports whose name may come up in more than one port name. This reverts commit cc08f82ddb104829112c7c5fe028f2e7dd9aaee1.
2022-04-02Ports: Fix dependency install when port name is not port folder nameEWouters
There was a bug in the way the `.port_include.sh` script handled installing dependencies. According to the [documentation](https://github.com/SerenityOS/serenity/tree/master/Ports#depends) the depends array should have port names in it. The port system allows for the name of the port to be different from the folder where port lives. Previously the `installdepends` function would cd to the name of the port, now it will find and run the `package.sh` that has the line `port=$depend` in it.
2022-03-16Ports: Fail if config.{sub,guess} don't replace existing filesTim Schumacher
This should help with finding misconfigured config.sub and config.guess settings.
2022-03-08Ports: Download fresh config.guess if neededDaniel Bertalan
The config.guess file needs to know about the SerenityOS `uname -m` system name if we want to build ports inside Serenity. Support was only added in January 2022, so most ports don't have a new enough version yet. This commit adds facilities for fetching a fresh config.guess file that supports SerenityOS, similarly to what we do for config.sub. As its first user, we make the bash port buildable inside the system.
2022-03-08Ports: Use `sed -i` for run_replace_in_file on Serenity hostsDaniel Bertalan
We don't have a perl port, so let's use GNU sed's in-place option for doing substitutions when running inside Serenity. Note that we can't do this unconditionally, as `sed -i` is not portable and works differently on BSD systems.
2022-02-20Ports: Use the objcopy built as part of the toolchainDaniel Bertalan
Relying on host tools working correctly is not a good idea, as they may be outdated (and therefore not support features like RELR relocations) or may not exist at all (like objcopy on macOS).
2022-02-12Ports: Add a pre_install hookAli Mohammad Pur