Commit graph

38158 commits

Author SHA1 Message Date
Itamar
b35293d945 LibCodeComprehension: Re-organize code comprehension related code
This moves all code comprehension-related code to a new library,
LibCodeComprehension.

This also moves some types related to code comprehension tasks (such as
autocomplete, find declaration) out of LibGUI and into
LibCodeComprehension.
2022-05-21 18:15:58 +02:00
Ariel Don
a2c34554cd touch: Support custom timestamps
Previously, `touch` remained limited to creating files and updating
their current access and modifications time to the current time. It's
now capable of accepting two different timestamp formats with flags `-d`
and `-t` and referencing timestamps of other files with flag `-r`.

`touch` can also update only the last access time with `-a`, only the
last access time with `-m`, or update both as usual. `touch` updates
both left unspecified.

With `-c`, `touch` does not create a file if it doesn't already exist.
2022-05-21 18:15:00 +02:00
Ariel Don
244357472a LibCore: Add Core::Stream::File::exists() 2022-05-21 18:15:00 +02:00
Ariel Don
8a854ba309 Kernel+LibC: Implement futimens(3)
Implement futimes() in terms of utimensat(). Now, utimensat() strays
from POSIX compliance because it also accepts a combination of a file
descriptor of a regular file and an empty path. utimensat() then uses
this file descriptor instead of the path to update the last access
and/or modification time of a file. That being said, its prior behavior
remains intact.

With the new behavior of utimensat(), `path` must point to a valid
string; given a null pointer instead of an empty string, utimensat()
sets `errno` to `EFAULT` and returns a failure.
2022-05-21 18:15:00 +02:00
Ariel Don
9a6bd85924 Kernel+LibC+VFS: Implement utimensat(3)
Create POSIX utimensat() library call and corresponding system call to
update file access and modification times.
2022-05-21 18:15:00 +02:00
Tim Schumacher
7550017f97 Ports: Sanitize environment before handling Ports
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-21 18:12:07 +02:00
MacDue
bdac8c53ea Base: Add hover icons to Cupertino theme
Simple hover effect with slight brightening + glow.
2022-05-21 18:11:36 +02:00
Tim Schumacher
034951dd92 Ports: Remove the /usr/lib pkg-config path
Our Ports are exclusively installed to `/usr/local/lib`, so having
`/usr/lib` in there as well doesn't make much sense.
2022-05-21 18:11:04 +02:00
Simon Danner
92d113ee32 Ports: Enable x265 in ffmpeg 2022-05-21 18:10:52 +02:00
Simon Danner
4af690f376 Ports: Add x265
Co-Authored-By: Tim Schumacher <timschumi@gmx.de>
2022-05-21 18:10:52 +02:00
Simon Danner
b9a8447dc0 LibC: Add a stub for nice() 2022-05-21 18:10:52 +02:00
Tim Schumacher
651560d588 Ports: Update and fix imgcat
- Update imgcat to 2.5.1 to get rid of prebuilt object files that have
  accidentally been included in the previous release tarball.
- Add a missing dependency on `termcap`.
- Remove an unused include of `err.h`, which we do not support.
- Use actually working settings for installing the built files.
2022-05-21 18:10:38 +02:00
Tim Schumacher
749d0eef7f Ports: Install ncurses headers into the main include directory 2022-05-21 18:10:38 +02:00
Ali Mohammad Pur
06c6c046f3 AK: Use static_cast to cast to base type
This is an issue on systems that don't have the empty base class
optimisation (such as windows), and we normally don't need to care -
however static_cast is technically the right thing to use, so let's use
that instead.

Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
2022-05-21 02:18:40 +02:00
Peter Elliott
420f78ca8b Tests: Add tests for posix_memalign(3) and aligned_alloc(3) 2022-05-20 22:18:54 +02:00
Peter Elliott
4e0adb638d LibC: Implement posix_memalign(3) and aligned_alloc(3)
Some ports linked against posix_memalign, but didn't use it, and others
used it if it was Available. So I decided to implement posix_memalign.

My implementation adds almost no overhead to regular mallocs. However,
if an alignment is specified, it will use the smallest ChunkedBlock, for
which aligned chunks exist, and simply use one of the chunks that is
aligned. If it cannot use a ChunkedBlock, for size or alignment reasons,
it will use a BigAllocationBlock, and return a pointer to the first
aligned address past the start of the block. This implementation
supports alignments up to 32768, due to the limitations of the
BigAllocationBlock technique.
2022-05-20 22:18:54 +02:00
Daniel Bertalan
830f5c610d Meta: Fix unused variable warning in lint-ports.py
This went undetected because I broke CI so the Python linter didn't run.
2022-05-20 12:44:12 +01:00
Daniel Bertalan
52710c2672 Toolchain: Fix shellcheck warning 2022-05-20 12:44:12 +01:00
Daniel Bertalan
012aff1f41 CI: Fix syntax error after d0edf2627c 2022-05-20 12:44:12 +01:00
Daniel Bertalan
124bcd743b Documentation: Only install the x86 and AArch64 qemu backends on Arch
The qemu-emulators-full package installs qemu backends for *all*
supported architectures, but we only need x86 and AArch64.

This decreases the installed size of dependencies by 800 MiB.
2022-05-20 09:51:15 +01:00
Ali Mohammad Pur
6b8688228b Meta: Disallow non-git patches for ports 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
80c745066b Ports: Add a ReadMe.md for qt6-qtbase's patches 2022-05-19 20:17:10 +04:30
Daniel Bertalan
d0edf2627c Toolchain+Ports: Split the GCC patches
This shouldn't cause any breaking changes, so a toolchain rebuild is not
required.

As per Hendiadyoin's request, math errno is disabled by default, which
should enable some extra compiler optimizations in LibGL and LibSoftGPU
code that uses math functions heavily.

Co-Authored-By: Ali Mohammad Pur <mpfard@serenityos.org>
2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
83aa5dcbf6 Ports: Update cfunge's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
b321d2b563 Ports: Update zstd's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
a3ff011fcb Ports: Update zsh's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
26ca20a55d Ports: Update x264's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
73f92f49c2 Ports: Update vitetris' patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
4e979feb6e Ports: Update tuxracer's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
624c3c5a46 Ports: Update tr's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
a20773b5ce Ports: Update tinycc's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
3531aa2b84 Ports: Update thesilversearcher's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
6f6d1a8f76 Ports: Update tcl's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
ee557a4145 Ports: Update sqlite's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
54f191f25b Ports: Update sl's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
06f9a1bacc Ports: Update scummvm's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
0068f7f764 Ports: Update sam's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
57bbe11933 Ports: Update ruby's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
8e95236efb Ports: Update the Ruby port to version 3.0.4 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
a9c362a4be Ports: Update pfetch's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
9e12cd0098 Ports: Update pcre2's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
5b91e02dc9 Ports: Update patch's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
848c883bb6 Ports: Update p7zip's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
bb40ff80b2 Ports: Update opentyrian's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
32c380b7f9 Ports: Update openttd's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
2c71a62e09 Ports: Update openssl's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
6e5509183f Ports: Update openssh's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
7077ce7779 Ports: Update oksh's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
bb8febffac Ports: Update nyancat's patches to use git patches 2022-05-19 20:17:10 +04:30
Ali Mohammad Pur
288818eb29 Ports: Update npiet's patches to use git patches 2022-05-19 20:17:10 +04:30