forked from pool/meson
47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
--- a/data/macros.meson
|
|
+++ b/data/macros.meson
|
|
@@ -1,9 +1,15 @@
|
|
%__meson %{_bindir}/meson
|
|
%__meson_wrap_mode nodownload
|
|
%__meson_auto_features enabled
|
|
+%_vpath_srcdir .
|
|
+%_vpath_builddir build
|
|
|
|
%meson \
|
|
- %set_build_flags \
|
|
+ export LANG=C.UTF-8 \
|
|
+ export CFLAGS="${CFLAGS:-%optflags}" \
|
|
+ export CXXFLAGS="${CXXFLAGS:-%optflags}" \
|
|
+ export FFLAGS="${FFLAGS:-%optflags}" \
|
|
+ export FCFLAGS="${FCFLAGS:-%optflags}" \
|
|
%{shrink:%{__meson} \
|
|
--buildtype=plain \
|
|
--prefix=%{_prefix} \
|
|
@@ -25,21 +31,24 @@
|
|
%{nil}}
|
|
|
|
%meson_build \
|
|
+ export LANG=C.UTF-8 \
|
|
%{shrink:%{__meson} compile \
|
|
-C %{_vpath_builddir} \
|
|
- -j %{_smp_build_ncpus} \
|
|
+ %{?_smp_mflags} \
|
|
--verbose \
|
|
%{nil}}
|
|
|
|
%meson_install \
|
|
+ export LANG=C.UTF-8 \
|
|
%{shrink:DESTDIR=%{buildroot} %{__meson} install \
|
|
-C %{_vpath_builddir} \
|
|
--no-rebuild \
|
|
%{nil}}
|
|
|
|
%meson_test \
|
|
+ export LANG=C.UTF-8 \
|
|
%{shrink:%{__meson} test \
|
|
-C %{_vpath_builddir} \
|
|
- --num-processes %{_smp_build_ncpus} \
|
|
+ %{?jobs:--num-processes %{jobs}} \
|
|
--print-errorlogs \
|
|
%{nil}}
|