summaryrefslogtreecommitdiff
path: root/Ports/.port_include.sh
AgeCommit message (Collapse)Author
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
2022-01-27Ports: Make 'package.sh dev' a bit more friendly when importing patchesAli Mohammad Pur
When a git patch that doesn't apply is encountered, start a git am session and _then_ drop the user in it instead of expeting the user to start the session on their own. Also prompt for leftover files and delete them if the user does not want them.
2022-01-22Ports: Relocate `use_fresh_config_sub` check to `do_configure()`Fragstiller
2022-01-17Meta+Ports: Make 'package.sh showproperty' report multiple propertiesAli Mohammad Pur
And use that to avoid shelling out multiple times for checking properties in lint-ports.py.
2022-01-16Ports: Add a 'dev' mode that uses git to autogenerate patches for portsAli Mohammad Pur
2022-01-16Ports: Remove some config.sub patches and download a fresh one if neededAli Mohammad Pur
All of these patches did the same thing, which is already in upstream config.sub. With this change, we need only add `use_fresh_config_sub=true` to the package.sh file. Note that this is not done automatically in case the port has a modified config.sub file.
2022-01-08Ports: Add interactive mode to .port_include.shNoah Rosamilia
Running `./package.sh interactive` in a port directory will spawn a new shell with the serenity build environment set up. This makes porting software much easier as build commands can be run interactively instead of having to modify package.sh just to test things.
2022-01-08Ports: Add $READELF and $HOST_READELF variables to include scriptsAndrew Kaster
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.
2021-10-21Ports: Register all dependencies of portsJelle Raaijmakers
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.
2021-10-21Ports: Return early in parse_arguments() in .port_include.shJelle Raaijmakers
2021-10-17Ports: Make it possible to build (some) ports with ClangDaniel Bertalan
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.
2021-10-05Ports: Make array-like settings actual arraysTim Schumacher
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.
2021-10-05Ports: Set defaults before loading package.shTim Schumacher
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.
2021-08-15Ports: Make the build step messages use ellipsis rather than excl. pointsin-ack
This stops the port build system from yelling at the user. This commit also adds a "success" message after the "Adding to database" message.
2021-08-13Ports: Make sure HOST_* variables are set correctly for nested buildsGunnar Beutner
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.
2021-08-04Ports: Support icons for launchers with argumentsJelle Raaijmakers
2021-08-04Ports: Convert only first index of ico filesJelle Raaijmakers
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.
2021-08-04Ports: Notify user of missing ImageMagick binariesJelle Raaijmakers
2021-07-22Ports: Add overridable pre_fetch method in .port_include.shKenneth Myhra
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.
2021-07-20Ports: Add launcher_run_in_terminal package.sh variableLinus Groh
This is being used to generate the RunInTerminal entry in launcher app files.
2021-07-08Ports: Add './package.sh shell' to get a shell with the build env setpancake
2021-06-16Ports: Add port for DungeonRushGunnar Beutner