Commit graph

873 commits

Author SHA1 Message Date
Tim Schumacher 1b6a1748f0 Ports: Add ca-certificates as a dependency to curl 2022-03-08 18:21:06 -08:00
Tim Schumacher 813a1f2865 Ports: Add a ca-certificates "port" 2022-03-08 18:21:06 -08:00
Daniel Bertalan 4f89f47acb Ports: Download fresh config.guess if needed
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-08 23:30:47 +01:00
Daniel Bertalan aed2e214b6 Ports: Use sed -i for run_replace_in_file on Serenity hosts
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-03-08 23:30:47 +01:00
Ali Mohammad Pur ce9f355b12 Ports: Add a bdwgc (aka libgc) port
For all your ports' garbage collection needs :^)
2022-03-08 22:29:53 +01:00
Jelle Raaijmakers f8bdb36f4c Ports: Add OpenGL include dir to quake2 build 2022-03-08 15:32:23 +01:00
Daniel Bertalan 6879465725 Ports: Update vttest to version 20220215
We now download a versioned tarball instead of the latest release to
avoid breaking the port build due to a signature mismatch when a new
version is released.
2022-03-02 21:37:26 +01:00
Peter Ross 451fee8fd7 Ports: Upgrade to FFmpeg 5.0 release; enable SDL and networking 2022-03-02 11:40:37 +01:00
Peter Ross ceb9f43ed5 Ports: Add Bochs x86 PC emulator 2022-02-23 09:59:08 +00:00
Jelle Raaijmakers e3d5a11d84 Ports: Enable monkey4 engine for ScummVM
This depends on both the `libmpeg2` and `libmad` ports. Since `monkey4`
is currently an experimental engine in ScummVM, we need to explicitly
enable it during configuration.
2022-02-22 23:48:59 +00:00
Jelle Raaijmakers 6a3017625b Ports: Add libmpeg2 2022-02-22 23:48:59 +00:00
Jelle Raaijmakers 5b593783f3 Ports: Add libmad 2022-02-22 23:48:59 +00:00
Daniel Bertalan 0be67ef12c Ports: Use the objcopy built as part of the toolchain
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-20 23:07:31 +00:00
Daniel Bertalan 92449e2f1c Ports: Update libjpeg to 9e 2022-02-20 12:42:13 +00:00
Brian Gianforcaro e56262caed Ports/gdb: Implement wait and mourn_inferior overrides for our target
While troubleshooting why gdb wasn't working when attempting to debug
serenity programs I noticed two things:

 - The contract of serenity's `waitpid(..)` appears to be slightly
   different than the generic ptrace target expects. We need to make
   sure we pass `WSTOPPED`, and it can return different errno values
   that we would want to re-try on.

-  The contract of serenity's `ptrace(..)` implementation appears to
   diverge as well, as we are expected to call `PT_ATTACH` before we
   call `PT_CONTINUE`, otherwise `ptrace(..)` will just error out.

These two patches fix the behavior of wait and mourn_inferior so that
they work as expected on serenity and allow us to attach and then wait
for a process to exit while running under gdb.
2022-02-20 11:49:41 +01:00
Brian Gianforcaro f01e1d0c17 Ports/gdb: Add descriptions to all gdb patches and remove dead code
Before working on the gdb port some more, I wanted to get these patches
cleaned up to have a good base to build upon.
2022-02-20 11:49:41 +01:00
Tim Schumacher c8aae1ac52 Ports: Enable OpenSSL support for CMake 2022-02-17 21:25:41 -08:00
Tim Schumacher 17f5eb558c Ports: Set the correct config.sub path for patch 2022-02-17 11:16:38 +01:00
Tim Schumacher abb9e3e198 Ports: Set the correct config.sub path for mpc 2022-02-17 11:16:38 +01:00
Tim Schumacher 95f33ffbec Ports: Disable socketpair support for curl
This is currently broken in Serenity. Disable it until we figure out
why.
2022-02-16 17:13:56 -08:00
Joe Petrus 06e33788ea Ports: Add ImageMagick 2022-02-14 11:40:06 +01:00
Ali Mohammad Pur b760a1a4ba Ports: Update the citron patches after upstreaming a few
This also switches to checking out a specific commit instead of just the
master HEAD, as the port linter requires a hash (which is imo pointless
in this case), and we can't provide a stable hash for the master branch
HEAD.
2022-02-13 19:03:43 +03:30
Ali Mohammad Pur 44cf3ac60f Ports: Add a citron port
This disables the GC, so the REPL doesn't run, but basic programs do
work.
2022-02-12 12:16:59 +01:00
Ali Mohammad Pur b0efca5742 Ports: Add a sparsehash port 2022-02-12 12:16:59 +01:00
Ali Mohammad Pur aaa52da97d Ports: Add a pre_install hook 2022-02-12 12:16:59 +01:00
Daniel Bertalan 7ab6816b49 Ports: Update binutils to version 2.38 2022-02-11 18:07:53 +01:00
Jackson d55978c254 Ports: Fix lua not building 2022-02-08 22:21:00 +00:00
BodgeMaster e74e6087b0 Ports: Update nano to version 6.0
This is just a bump of the version number in a couple places.
Tested to work.
2022-02-06 07:16:59 +00:00
BodgeMaster d49a516366 Ports: Update wget to version 1.21.2
This is another one where I just changed the version number and it
worked.
2022-02-06 03:20:25 +00:00
Luke Wilde 4a69072c3a Ports/fontconfig: Add freetype dependency
When I did a fresh build of ports, I got this while building fontconfig:

```
checking for FREETYPE... no
configure: error: Package requirements (freetype2 >= 21.0.15) were not
met:

No package 'freetype2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FREETYPE_CFLAGS
and FREETYPE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
```
2022-01-31 03:31:40 +01:00
Linus Groh ab976667c4 Ports: Update Python to 3.10.2
Released on 2022-01-14.
https://www.python.org/downloads/release/python-3102/
2022-01-30 17:40:39 +00:00
Ali Mohammad Pur 66dcb0123a Ports: Explain some new patch script options and features in the README
This explains:
- `package.sh dev [--no-depends]`
- `use_fresh_config_sub` & `config_sub_path`
2022-01-27 23:01:05 +01:00
Ali Mohammad Pur e79a766901 Ports: Make 'package.sh dev' a bit more friendly when importing patches
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-27 23:01:05 +01:00
Jesse Buhagiar 43ddefec9c Ports: Add Half-Life: Opposing Force port :^) 2022-01-24 17:04:55 +01:00
Daniel Bertalan ad649c48da Toolchain: Backport support for the mold linker
The `-fuse-ld=mold` flag was only added in the not-yet-released GCC 12.

Cherry-picked from the following upstream commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ad964f7eaef9c03ce68a01cfdd7fde9d56524868
2022-01-24 10:41:47 +00:00
Daniel Bertalan bd3ed700f2 Toolchain+Ports: Use the GNU hash format by default
This hash format offers faster symbol lookup than the System V hash.

We've been using it in all our shared libraries for a long time, but did
not have it enabled by default in our toolchain, so ports couldn't make
use of it.
2022-01-24 10:41:47 +00:00
Daniel Bertalan 5576e9c4c5 Kernel+Toolchain: Use .init_array section for global constructors
Before this change, our dynamic linker's global constructor handler
relied on the GNU linker implicitly including the content of `.ctors`
section inside `.init_array`. The mold linker does not do this, so
global constructors would fail to be called in the mold-built userland.

There is no point in sticking to `.ctors`, as most other systems already
use the superior `.init_array` scheme. This commit changes the kernel
linker script to not discard this new section, and enables it by default
in our toolchain.
2022-01-24 10:41:47 +00:00
Sahan Fernando d6432a3f99 Ports: Enable menu support for half-life port
This partially enables support for menus in half-life. Currently, mouse
input does not work in it, the arrow keys are needed for navigation.
2022-01-24 07:55:39 +00:00
Sahan Fernando 9d97902081 Ports: Add link flags to pkgconfig file installed by fontconfig port 2022-01-24 07:55:39 +00:00
Sahan Fernando 62192c88a6 Ports: Fix freetype port 2022-01-24 07:55:39 +00:00
Andrew Kaster 1306fab711 Ports: Update mold port to v1.0.2
Patches regenerated with the new ./package.sh dev mode. It seems to
work as advertised, after a bit of experimentation :^).
2022-01-24 02:53:04 +00:00
Jelle Raaijmakers f7de7501d4 Ports: Set config.sub path for SDL2_mixer
This path needs to be set, or otherwise SDL2_mixer will not build.
2022-01-21 22:07:25 +01:00
Fragstiller 07faa6f670 Ports: Remove redundant ensure_new_config_sub call 2022-01-22 00:31:57 +03:30
Fragstiller 673e81b90b Ports: Relocate use_fresh_config_sub check to do_configure() 2022-01-22 00:31:57 +03:30
Brian Gianforcaro bcfc87fcc2 Ports: Add a port of tig 2.5.5 2022-01-18 08:50:40 +01:00
Brian Gianforcaro 3fdc2d8dcf Ports/readline: Fix config.sub refresh for the readline port
The new `use_fresh_config_sub` option puts the config.sub in the root of
the tree, but `readline` puts it in the `support/` folder. So we need to
tell the ports infrastructure to place the file in that folder.
2022-01-18 08:50:40 +01:00
Ali Mohammad Pur 63b02859bc Meta+Ports: Make 'package.sh showproperty' report multiple properties
And use that to avoid shelling out multiple times for checking
properties in lint-ports.py.
2022-01-17 11:17:15 +01:00
Brian Gianforcaro 7a26f6523a Ports/git: Update git to the latest 2.34.1 release 2022-01-17 11:17:15 +01:00
Ali Mohammad Pur afabfc1964 Ports: Correct the config.sub path for freetype
This regressed in cdd6d68, setting the correct path makes it build
again.
2022-01-16 19:57:37 +03:30
Linus Groh fc02370dc7 Ports: Regenerate patches for python3 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur bbd4343b31 Ports: Regenerate patches for bash 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur ae94825cf6 Ports: Regenerate patches for pcre 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur dd9049f6cb Ports: Regenerate the patch readme file for mc 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur ed87bd7fe1 Ports: Regenerate stress-ng patches
And autogenerate a readme.
This fixes the one patch that wasn't made with git.
2022-01-16 10:32:50 +03:30
Ali Mohammad Pur f81e28039b Ports: Regenerate the CMake port patches 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur a906ff5884 Ports: Add ReadMe files explaining port patches that have explanations 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur d543db0286 Ports: Add a 'dev' mode that uses git to autogenerate patches for ports 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur cdd6d68b2a Ports: Remove some config.sub patches and download a fresh one if needed
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-16 10:32:50 +03:30
Jelle Raaijmakers a0086c033d Ports: Do not strip debug symbols from ScummVM
Release mode strips the debug symbols from the resulting binaries,
making it harder than necessary to read backtraces.
2022-01-14 21:38:09 +01:00
Kenneth Myhra 2255e8859c Ports/mc: Add Midnight Commander port 2022-01-13 18:46:22 +01:00
Kenneth Myhra 0a3c2d5a8f Ports/vim: Bump version number to 8.2.4066 2022-01-13 18:46:22 +01:00
Luke Wilde 010a37f997 Ports/HalfLife: Do not delete the OpenGL renderer in post install
We can now play Half-Life using LibGL without crashing on launch! :^)
2022-01-13 10:07:45 +02:00
Jelle Raaijmakers a4e2d93aa2 Ports+LibGL: Replace LibGL context check by ScummVM patch
According to the OpenGL spec, invoking functions without an active
context results in undefined behavior. Since ScummVM seems to be the
only port having issues with our behavior, patch their code instead.
2022-01-12 14:54:18 +01:00
Daniel Bertalan 3cbf20ca5d Ports: Remove obsolete mold patch
This is no longer needed, as both toolchains now support
std::filesystem.
2022-01-12 14:54:12 +01:00
Jelle Raaijmakers b2e0bf24ef Ports: Add missing GLtron port dependencies 2022-01-12 01:08:38 +01:00
Jelle Raaijmakers 90d70479b8 Ports: Correct EOL in GLtron patch
The line endings for this patch were inadvertently normalized because
of our old `.gitattributes` rules.
2022-01-12 01:08:38 +01:00
Jelle Raaijmakers c7e021c1f1 Ports: Add GLTron
The patches mainly convert this SDL1 game to SDL2. It has some
graphical artifacts, but it's playable!
2022-01-11 23:47:42 +01:00
Jesse Buhagiar 5e20c45174 Ports: Add Half-Life Port :^)
Add a port of Half-Life, the classic game by VALVe Software
2022-01-11 15:03:55 +01:00
Andrew Kaster 4ebcae9f4f Ports: Add mold port
The port exposes some dynamic loader and toolchain shortcomings,
namely RTLD_NEXT, RTLD_NOLOAD, and std::filesystem. Hopefully we can
discover a ton of multi-threading bugs in Serenity with this port :^)
2022-01-11 11:47:48 +01:00
Linus Groh b8d640c3f9 Ports: Remove wireguard-tools strsep() replacement patch 2022-01-10 23:47:30 +01:00
Daniel Bertalan 78fa430ca1 Ports: Update bash port to version 5.1.16
The `remove-conflicting-declaration-in-glob` patch seems to not be
needed anymore.
2022-01-10 23:03:24 +01:00
Linus Groh d099527dbb Ports: Add wireguard-tools
What will it take to port WireGuard to SerenityOS? No idea. But this is
a start :^)
2022-01-10 21:22:41 +01:00
Daniel Bertalan b19cc3cdcb Toolchain: Backport --update-section support to llvm-objcopy
This commit backports the LLVM commit that adds support for the
`--update-section` flag to llvm-objcopy. We use this feature of GNU
objcopy to embed the symbol map in the kernel.

The corresponding LLVM Phabricator Differential Revision can be found
here: https://reviews.llvm.org/D112116

This patch is identical to the upstream commit, except for two hunks
that had to be changed as they didn't apply cleanly.
2022-01-10 09:55:45 +03:30
Andrew Kaster da00ccb26a Ports: Add "-ldl" as CMAKE_DL_LIBS in CMake platform patch 2022-01-09 23:32:03 +01:00
Andrew Kaster d8110e3bac Ports: Add ccache port to make compiling on Serenity more fun :^) 2022-01-09 23:32:03 +01:00
Andrew Kaster 12c352dfc9 Ports: Convert curl port to use CMake, remove two autoconf patches
This removes the shlib hack from the install step, which repackaged the
static library as the shared one. It also has the benefit of making the
port work with the Clang toolchain :^).
2022-01-09 23:32:03 +01:00
Jelle Raaijmakers 1d627f1b2c Ports: Patch out SDL timer lock from ScummVM
This change is backported from upstream master and prevents unnecessary
spam to our debug console about NULL mutexes.
2022-01-09 23:23:01 +01:00
Jelle Raaijmakers 3ce1118af1 Ports: Compile ScummVM with OpenGL support
By default, ScummVM will still run in software rendering mode, but the
options to enable OpenGL will become available.
2022-01-09 23:23:01 +01:00
Jelle Raaijmakers 6e64ad829a Ports: Update ScummVM to version 2.5.1 2022-01-09 23:23:01 +01:00
Noah Rosamilia 860d142c8c Ports: Add interactive mode to .port_include.sh
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-08 22:43:29 -08:00
Andrew Kaster 3ff7b76502 Ports: Don't try to enable PGO for python3 when cross-compiling
The --enable-optimizations flag attempts to enable PGO. Profile-guided
optimization is great in general, but will not work at all when doing a
cross-compile. If there's a more fine-grained flag for generic
optimization levels that doesn't try to do PGO, we should enable that
instead. The flag also enables `-fno-semantic-interposition`, but our
GCC patches enable that by default for -fPIC anyway, so that's not
necessary.
2022-01-08 18:56:29 +01:00
Andrew Kaster 498d3d8537 Ports: Add $READELF and $HOST_READELF variables to include scripts
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.
2022-01-08 18:56:29 +01:00
Andrew Kaster b85c785c12 Ports: Add /usr/local/lib to openssl's library search path
This allows building with the clang toolchain. We might consider a more
global patch in the future for this, it seems a lot of packages need
help to find /usr/local/lib.
2022-01-08 18:56:29 +01:00
Andrew Kaster 0a04f4ae86 Ports: Patch sqlite's configure script to let it build as a shared lib
By telling the libtool-related configure checks that the serenity
platform does in fact support shared libs, we can get a VERSYM-free
shared lib out of sqlite. This probably applies to other ports as well.

Suggested-by: Daniel Bertalan <dani@danielbertalan.dev>
2022-01-08 18:56:29 +01:00
Luke Wilde 87d19dfa28 Ports: Update curl port to version 7.81.0 2022-01-08 14:04:08 +03:30
Luke Wilde e65052a208 Ports: Update zstd port to version 1.5.1 2022-01-08 14:04:08 +03:30
Luke Wilde 7110c0ecb0 Ports: Update OpenSSL port to version 1.1.1m 2022-01-08 14:04:08 +03:30
Luke Wilde e9d26fb47d Ports: Update libtiff port to version 4.3.0 and use sha256
This uses sha256 instead of signatures like what has been done for the
other ports.

This version of libtiff uses the version of config.sub which has
Serenity in it, so this port no longer needs any patches! :^)
2022-01-08 13:50:48 +03:30
Jelle Raaijmakers 80626ca51f Ports: Remove unnecessary -lmodplug from tuxracer 2022-01-08 00:56:48 +01:00
Jelle Raaijmakers 2a85abb15d Ports: Fix dynamic load of libmodplug by SDL2_mixer
The configure script for `SDL2_mixer` was trying to find the shared
library for `libmodplug` in the wrong directories and with the wrong
filename. This installs the shared library as `libmodplug.so.1` and
symlinks to it from `libmodplug.so`, and instructs the `SDL2_mixer`
build to search for it in `/usr/local/lib`.

Fixes the build for ports Super-Mario, freeciv and dungeonrush.
2022-01-08 00:56:48 +01:00
Tim Schumacher d059bafd8a Ports: Include missing signal.h in emu2
This file apparently relies on the fact that `sys/wait.h` _may_ include
symbols from `signal.h`, but as we don't have that (and it isn't a
requirement), let's just add the include for `signal.h`.
2022-01-08 00:46:30 +01:00
Jelle Raaijmakers 11f1753be1 Ports: Unset env vars after configure in php
These environment variables would linger after the `php` port was done
building. This would pose issues in the future if other ports depend on
this package, since these vars then leak into the build scripts.
2022-01-08 00:45:49 +01:00
Jelle Raaijmakers 40737341a8 Ports: Update php port to version 8.1.1 2022-01-08 00:45:49 +01:00
Jelle Raaijmakers 5293832fc3 Ports: Reinstate config.sub patch for libogg
Commit fee43e3544 broke the `libogg` port build by removing the
`config.sub` patch. This reinstates that patch.
2022-01-08 00:24:23 +01:00
Martin Bříza ddeacce905 Ports/qt6: Add qt6-serenity
And this is the platform plugin we need to run Qt6 apps properly
2022-01-07 18:38:32 +01:00
Martin Bříza ac762c5520 Ports/qt6: Add a very basic Qt6 Base package
It's necessary to have a working serenity platform plugin for it to work
with GUI applications
2022-01-07 18:38:32 +01:00
Erlend Lind Madsen aa6e5e8cdc Ports: Describe in README that 'depends' is an array
The README previously described `depends` as a space-separated
string. This is now changed to an array, which seem to be the
correct type used in the other Ports.
2022-01-07 14:57:50 +03:30
Brian Gianforcaro e2e9560580 Ports/stress-ng: Remove patches which disable lchown testing
Serenity's LibC now supports lchown, so we no longer need to disable
these stressors. The port can build and run cleanly without these
patches.
2022-01-06 18:52:26 -08:00
Brian Gianforcaro c21622ff4d Ports/stress-ng: Update to the latest version - v0.13.10 2022-01-06 18:52:26 -08:00
Noah Rosamilia f3b5f03b2a Ports: Add npiet
Add interpreter for piet programming language
https://www.bertnase.de/npiet/
https://www.dangermouse.net/esoteric/piet.html
2022-01-07 02:12:51 +01:00