This is part 2 of #2119. The parent commit only moved files to retain
their correct history, this commit fixes all the includes and build files.
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
- Fix use of deprecated `exec_program`.
- Reformat 'UninstallConky.cmake.in' file.
- Separate BUILD_TESTS (now BUILD_TESTING to shadow CTest variable) from
MAINTAINER_MODE flag.
- Remove BUILD_TESTS flag from CI, default it already true.
- Add support for (s)ccache, enable it by default.
- Add REPRODUCIBLE_BUILD to disable (s)ccache default.
- Set REPRODUCIBLE_BUILD=ON in nix flake.
- Add sccache to CI.
- Add CI detection for possible future use, stored in ENV_IS_CI variable.
- Minor formatting tweaks.
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
The current wayland display's clean_text function is missing
cairo_fill to actually clear the background, causing the text to overlap.
Signed-off-by: Leo Chung <gewalalb@gmail.com>
* Use test globbing to find new tests
* Silence CodeCoverage.cmake warning
* Update Catch2 to v3.7.1
* Add --output-on-failure flag to CI
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Simplifies parsing code, gives a better message and removes responsibility from last parser to report errors.
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Report the correct number of CPUs and calculate the per-CPU load.
Start implementing a common BSD interface, as all BSD implementations use
*slightly* different functions to achieve the same goal,
and maintaining them in one place would be easier.
Fixes #2097.
Not all systems report current_now through the power supply sysfs
interface, but some do report power_now instead. Add support for these,
too.
The new implementation first tries power_now and then falls back to
computing power as the product of current and voltage. The new
implementation also reduces memory footprint on the stack by some 512k.
Also the old implementation potentially left files open under some
circumstances.
The C language defines long to be at least 32 bit and so on ILP32 data
models like Win32 and 32-bit Unix systems. It therefore will overflow
for values of the order of 1e12, which we obtain as a multiplication
result in get_battery_power_draw().
Fix this by an early conversion to double.
* Implement `-U` for Haiku.
This patch also fixes a compilation error on Haiku.
Compiled with `cmake -DBUILD_X11=FALSE ..`
Tested on Haiku-r1beta5.
Takes part of #2072.
* Revert `common.cc`.
A cross-platform solution is already implemented in #2080.
This PR will be rebased *after* the OpenBSD fix was merged.
* Haiku: Remove `wordexp.h`.
Use the `to_real_path()` used for OpenBSD.
* Haiku: Remove `HAIKU_HOME_DIR`.
It was not used.
- Fix unclosed OBJ in core.cc when target is OpenBSD
- `to_real_path` changes:
- Canonicalize result to mimic `realpath` behavior
- Partially implement `to_real_path` for OpenBSD
- Add more tests for `to_real_path`.
- Build system improvements:
- Use same i18n include/link logic for all platforms
- Replace `HAVE_SOME_SOUNDCARD_H` and `HAVE_LINUX_SOUNDCARD_H` with `HAVE_SOUNDCARD_H`
and use other defines (__linux__) to guard include
- Replace `<XXX>_LIBRARIES` with `<XXX>_LINK_LIBRARIES` for linking.
- Libraries weren't in default linker search path on OpenBSD
- OpenBSD specific:
- Fix bsdapm.cc
- Remove diskio stats stubs
- Stub get_battery_short_status
- Remove `-stdlib=libc++` build flag on OpenBSD
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Co-authored-by: gmb <gmb@openbsd76.my.domain>
Co-authored-by: Tin Švagelj <tin.svagelj@live.com>
Fixes #2042
We can't just assume select() exiting before the timeout to be a
success, since connect() can actually tell us there's no route to host
or other errors.