`wrksrc` is supposed to be a top-level directory. Should the build
system need to be run inside a sub-directory, `build_wrksrc` should be
used instead. We change to `build_wrksrc` implicitly before `do_build`
and `do_install`.
Let's respect `build_wrksrc` in `perl-module`.
1. Relying on `python3 -m pytest --help` to test for pytest can fail
because the pytest packages's __main__ is still invoked; this can
trigger import problems and falsely indicate that pytest is missing.
A simpler test is to just confirm that pytest is importable. If so,
the interpreter returns 0. Otherwise, an ImportError is thrown and
the interpreter will return 1.
2. Many templates require a custom do_check just to set PYTHONPATH to
either a build directory (especially for compiled extensions) or some
subdirectory of the source tree. Setting PYTHONPATH automatically to
the build directory should drastically reduce the need for custom
do_check in py3 templates. (This only applies to python3-module.sh
because pep517 builders will have unpredictable build directories.)
Closes: #31354.
- CMAKE_BUILD_TYPE=Release will force -O3 instead of respecting our
CFLAGS and CXXFLAGS
- Theoretically, we could patch cmake to always use -O2 instead,
however, patching will break users' expectation when compiling their
our code.
- RelWithDebInfo could be another option if it's acceptable to always
have debug symbol available.
- However, some projects ignore all CFLAGS and CXXFLAGS;
- Some other projects relies on CMAKE_BUILD_TYPE=Release to install to
correct location and/or disable coverage.
- To get away with -O3, we need patching either ways, let's go with
CMAKE_BUILD_TYPE=None, and patch all problematic softwares.
libtool will insert RPATH if $libdir not in sys_lib_dlsearch_path_spec.
libtool's configure will parse /etc/ld.so.conf for this value.
Without this change the original value is:
- glibc: /lib /usr/lib /usr/lib32 /usr/local/lib
- musl: /lib /usr/lib
Fix Manual accordingly, and also fix indentation to be compatible with
nearby items.
The two packages which set this variable set it explicitly to "no", so
it wasn't relied upon. From its description, it was recommended only for
git packages, which by default don't fit Void's packaging guidelines.
Removing to avoid anyone coming to rely on it.
make was accidentally left hardcoded to query if a test target was
available, which meant tests wouldn't be run for most of the
applications, since they were now using ninja.
This reverts commit 2163ca2d03.
Removing `export AR=gcc-ar` was apparently done based on the assumption
that the linked issue (https://github.com/mesonbuild/meson/issues/1646)
had been solved completely on meson's side.
Instead, their solution, seen in
https://github.com/void-linux/void-packages/pull/2815, had been to force
gcc-ar for linking static libraries; by exporting `AR=ar`, we were
accidentally breaking static libraries when LTO is enabled. This was
noticed by leah while we were trying to build qemu-user-static using the
normal libglib-devel package (built with meson, which for us defaults to
enabling LTO).
Unfortunately, while correct, this change wasn't enough to fix the
static glib build, which had to resort to disabling LTO.
This allows templates to override do_build and not have to create the
build subdirectory used as TMPDIR in do_install; failure to create this
directory will cause pip to use (and pollute) /tmp in the masterdir.
this introduces a new build-style void-cross, which can be used
to write system crosstoolchain templates; this is to reduce the
amount of maintenance, resolve existing problems with the cross
toolchain templates and remove repeated code
This allows the build system to detect itself whether it should use
certain features, instead of defaulting to (potentially bad) enabled
status.
Features that aren't detected properly, be it because false positives or
negatives, should be explicitly called out in the templates.