PKG_CONFIG environment variable should point to the pkg-config executable
to be used to fetch dependencies that use 'native: true' (indicate to build
against host libraries not cross-compiled ones)
To meet those requirements we set an absolute path to the host
pkg-config since the relative path to pkg-config is taken by the
wrapper.
This currently requires a patch that is a milestone of meson-0.48 that
was generated by the issue:
https://github.com/mesonbuild/meson/issues/1736
meson when compiling something with 'native: true' (for building
executables that are meant to be run on the host system) uses CFLAGS
and CXXFLAGS environment variables, we "pollute" them with
TARGET system cflags/cxxflags, such as -march= for the cross-compiled
arch.
so to fix it we export CFLAGS and CXXFLAGS to be CFLAGS_host and
CXXFLAGS_host respectively, they are set by XBPS and correspond to
the XBPS_CFLAGS/XBPS_CXXFLAGS. This same set of changes is also done
with CC and CXX see L#61
this was found when cross-compiling lighttpd which created the
'lemon' executable to generate inputs
thanks to @Cogitri from Exherbo for helping me debug this
[ci skip]
following https://mesonbuild.com/Cross-compilation.html
- host_machine is our XBPS_TARGET_MACHINE
- build_machine is our XBPS_MACHINE, and meson can find out the details
on it's own
- also don't include -musl in the CPU because meson doesn't recognize it
and projects like Mesa (LibGL) don't enable optimizations for it
- cpu_family and cpu are different, they need to be set properly:
- armv* is arm
- mips* is mips
- i686 is x86
- x86_64 is x86_64
- aarch64 is aarch64
There is no need to use a custom build directory for python{2,3}-only
modules.
This indirectly fixes our issues with packages that use distutils-extra.
Instead of relying on qtchooser to provide the link to the qmake
binary for Qt4 or Qt5 test for either version and use that.
Sometimes qtchooser can fail if e.g. a package was built with Qt4
and after that another package with Qt5 without zapping the masterdir.
Many packages depending on Qt5 or Qt4 and built with cmake
generate "flags.make" files with -isystem for include paths.
With gcc6 this results in e.g. "#include_next <stdlib.h>" giving
an error, because a -isystem /usr/include is in the wrong place.
The simple fix is to replace "-isystem" with just "-I".
in order to make gufw installation process work, it includes itself
while installing. this raise the need that the build directory needs
to be a valid python identifier too. this commit solves this issue.