void-packages/common/build-style
maxice8 6580c8d657
build_style/meson.sh: export CFLAGS and CXXFLAGS from host
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]
2018-08-16 01:49:38 -03:00
..
cmake.sh build-style/cmake.sh: fix default do_check 2018-03-09 13:43:10 -05:00
configure.sh build-style/configure.sh: use "make check" if available. 2017-11-20 13:26:29 +01:00
fetch.sh
gnu-configure.sh build-style/gnu-configure.sh: warn, don't fail if "make check" is not implemented. 2017-11-20 13:26:29 +01:00
gnu-makefile.sh build-style/gnu-makefile.sh: use "make check" if available. 2017-11-20 13:26:29 +01:00
go.sh go build style: move GOPATH creation to do_configure() 2017-11-26 00:41:26 -08:00
haskell-stack.sh build-style/haskell-stack.sh: init using --system-ghc too. 2018-04-05 14:32:40 +02:00
meson.sh build_style/meson.sh: export CFLAGS and CXXFLAGS from host 2018-08-16 01:49:38 -03:00
meta.sh
perl-module.sh common/build-style: revert last fix, instead fix a typo 2018-02-26 19:52:04 +01:00
perl-ModuleBuild.sh build-style/perl-ModuleBuild.sh: add generic do_check function. 2017-11-21 11:51:08 +01:00
python-module.sh
python2-module.sh build-style/python{2,3}-module: do not use custom build directory 2017-08-25 16:17:12 +02:00
python3-module.sh build-style/python{2,3}-module: do not use custom build directory 2017-08-25 16:17:12 +02:00
qmake.sh
R-cran.sh Add and document R-cran build style; support CRAN in update-check. 2017-06-08 13:32:40 +02:00
README
ruby-module.sh
scons.sh common/build-style/scons.sh: fix comment 2018-03-05 20:49:36 +00:00
slashpackage.sh
waf.sh build-styles/waf{,3}: make sure waf uses the correct python version 2018-08-09 19:53:32 +02:00
waf3.sh build-styles/waf{,3}: make sure waf uses the correct python version 2018-08-09 19:53:32 +02:00

BUILD STYLES
============

These shell snippets provide support for multiple build systems, i.e GNU configure,
CMake, etc. A build style file must provide at least the following functions:

	- do_configure
	- do_build
	- do_install

If a source package defines its own do_xxx() function, the function defined in
the build style file is simply ignored.