summaryrefslogtreecommitdiff
path: root/data/macros.meson
AgeCommit message (Collapse)Author
2025-11-19macros: fix feature to disable verbosityDominique Leuenberger
Instead of relying on __meson_verbose being defined or not, handle its value; in context of larger build systems (like open build service) this allows a project wide configuration to override %__meson_verbose to 0
2025-01-08Add macros for declarative buildsystems of rpm >= 4.20fundawang
2024-02-16macros: Allow disabling verbose modeDaan De Meyer
This allows using "--undefine __meson_verbose" to disable the verbose mode. This is useful when running rpmbuild in an interactive terminal and you don't want to be flooded with compilation outputs. We also add --quiet to the meson install macro if __meson_verbose is undefined to reduce the output generated by meson install. The default output stays the same, the output is only affected if __meson_verbose is explicitly undefined.
2022-12-05Use meson setup [options] in meson RPM macroJani Välimaa
Fixes the following warning when building a rpm pkg using %meson macro: WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
2020-06-21mcompile: Add --verbose modeIgor Raits
Closes: https://github.com/mesonbuild/meson/issues/7352 Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-06-15macros.meson: Switch to meson compile / installIgor Raits
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-06-15macros.meson: Switch to %{_smp_build_ncpus}Igor Raits
It is available since RPM 4.15 which has been around 1 year by now. Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2019-04-28RPM Macros: Use `meson test` for %meson_testStephen Gallagher
Previously, this called out to the %ninja_test macro to run the tests, but that limits us to only the arguments that ninja can understand. In particular, it is not possible to add a test timeout multiplier (such as is sometimes needed when building for slow architectures such as armv7hl). With this patch, it will be possible to specify `%meson_test -t 5` in the RPM spec file without needing to patch the sources to extend the timeouts, making life easier for packagers. Related: https://github.com/mesonbuild/meson/issues/2037 Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2019-04-08Revert "rpm: Always set b_ndebug to true"Igor Gnatenko
It turned out that it is not really good idea. This reverts commit da1bb49787b2f65ca3a4c3c3fb0d9eda822f3275. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2019-03-26rpm: Always set b_ndebug to trueIgor Gnatenko
'if-release' does not catch buildtype=plain, so we need to do this. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2019-01-04rpm: remove manual printing of error logs on failureZbigniew Jędrzejewski-Szmek
This effectively reverts 92219a2739ea69fa617cca74517b68ed5e1bcb7d. Back in the day, meson test would not print the logs on failure. But it now does that automatically, for the failed test. Printing all logs is annoying because it results in exteremely long output in some packages. Example output: + /usr/bin/ninja test -v -j4 -C x86_64-redhat-linux-gnu ninja: Entering directory `x86_64-redhat-linux-gnu' [0/1] /usr/bin/meson test --no-rebuild --print-errorlogs 1/16 test-script.sh OK 46.23 s ... 14/16 test-casync FAIL 1.17 s (exit status 1) 15/16 test-cautil OK 0.00 s 16/16 test-util OK 0.01 s Ok: 15 Expected Fail: 0 Fail: 1 Unexpected Pass: 0 Skipped: 0 Timeout: 0 The output from the failed tests: 14/16 test-casync FAIL 1.17 s (exit status 1) --- command --- /home/zbyszek/fedora/casync/casync-2/x86_64-redhat-linux-gnu/test-casync --- stdout --- error -------
2018-07-25rpm: pass --auto-features=enabled [skip ci]Igor Gnatenko
We really want to be explicit. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-07-25rpm: use %{shrink…} [skip ci]Igor Gnatenko
Make logs look better! Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-07-25rpm: use %set_build_flags [skip ci]Igor Gnatenko
It has better name and should do the trick. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-01-04rpm: print testlog from subshellIgor Gnatenko
false || { rc=$?; echo $rc; exit $rc } || : Exits current shell without possibility to prevent that. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-10-12rpm: print test logs on failureZbigniew Jędrzejewski-Szmek
References: https://bugzilla.redhat.com/show_bug.cgi?id=1500248 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-04-28rpm: pass --wrap-mode=nodownload to %mesonIgor Gnatenko
With ability to change it if needed.
2016-12-18add support for $sharedstatedirIgor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18add support for $infodirIgor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18add support for $sbindirIgor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-15rpm: use VPATH macroIgor Gnatenko
This is more or less standardized way to have one variable which will work for all buildsystems defined in redhat-rpm-config. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-13rpm: use __global_*flagsIgor Gnatenko
Using RPM's %{optflags} is definitely nice, but not enough. LDFLAGS are not there, and idea of optflags is too generic. It is supposed to work under CC and CXX, but apparently someone forgot that there is difference between these two. %__global_*flags is not part of RPM itself, it's coming within redhat-rpm-config which makes our macros file not that portable, but anyway we already have %__global_ldflags and %ninja_build and no one complained. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-13rpm: use meson's syntax to specify sourcedir and builddirIgor Gnatenko
When user uses %meson -Denable_cool_feature=true current macro fails because RPM adds flag after popd: ... pushd x86_64-redhat-linux-gnu /usr/bin/meson ... $OLDPWD/. popd -Denable_cool_feature Since meson can accept $srcdir and $builddir arugments we don't have this problem with pushd/popd. It also simplifies things a bit. Reported-by: Richard Hughes <richard@hughsie.com> References: https://bugzilla.redhat.com/show_bug.cgi?id=1401062 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-06add builtin support for localstatedirIgor Gnatenko
Reported-by: Richard Hughes <richard@hughsie.com> Closes: https://github.com/mesonbuild/meson/issues/1142 Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-10-08fixup! fixup! rpm: couple of improvements and fixesIgor Gnatenko
2016-10-08fixup! rpm: couple of improvements and fixesIgor Gnatenko
2016-10-08rpm: couple of improvements and fixesIgor Gnatenko
* Don't hardcode /usr/bin, use %{_bindir} * Implement %meson_build / %meson_install / %meson_test * Automatic handling of out-of-tree builds Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-08-25macros.meson: override all supported options (#717)Igor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2015-10-30rpm macros: export *FLAGSIgor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2015-08-02macros.meson: simplify RPM macros by using expandIgor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2015-03-23Moved rpm macros to a subdirectory to reduce clutter.Jussi Pakkanen