diff options
author | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2016-12-13 11:59:52 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-13 14:20:24 +0200 |
commit | dcd3c217121fbb09be8acecd2d866219e85ad9bd (patch) | |
tree | 9cca7d9d388f4b011e9442948760d7853e88c604 /data | |
parent | b01d2c35b7003071fc64c6d2e7d07b7652a8b386 (diff) | |
download | meson-dcd3c217121fbb09be8acecd2d866219e85ad9bd.zip meson-dcd3c217121fbb09be8acecd2d866219e85ad9bd.tar.gz meson-dcd3c217121fbb09be8acecd2d866219e85ad9bd.tar.bz2 |
rpm: use meson's syntax to specify sourcedir and builddir
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>
Diffstat (limited to 'data')
-rw-r--r-- | data/macros.meson | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/data/macros.meson b/data/macros.meson index 97d8a23..5250c34 100644 --- a/data/macros.meson +++ b/data/macros.meson @@ -8,22 +8,20 @@ export FFLAGS="%{optflags} -I%{_fmoddir}" \ export FCFLAGS="%{optflags} -I%{_fmoddir}" \ export LDFLAGS="%{?__global_ldflags}" \ - mkdir -p %{__builddir} \ - pushd %{__builddir} \ - %{__meson} \\\ - --buildtype=plain \\\ - --prefix=%{_prefix} \\\ - --libdir=%{_libdir} \\\ - --libexecdir=%{_libexecdir} \\\ - --bindir=%{_bindir} \\\ - --includedir=%{_includedir} \\\ - --datadir=%{_datadir} \\\ - --mandir=%{_mandir} \\\ - --localedir=%{_datadir}/locale \\\ - --sysconfdir=%{_sysconfdir} \\\ - --localstatedir=%{_localstatedir} \\\ - $OLDPWD/%{__sourcedir} \ - popd + %{__meson} \\\ + --buildtype=plain \\\ + --prefix=%{_prefix} \\\ + --libdir=%{_libdir} \\\ + --libexecdir=%{_libexecdir} \\\ + --bindir=%{_bindir} \\\ + --includedir=%{_includedir} \\\ + --datadir=%{_datadir} \\\ + --mandir=%{_mandir} \\\ + --localedir=%{_datadir}/locale \\\ + --sysconfdir=%{_sysconfdir} \\\ + --localstatedir=%{_localstatedir} \\\ + %{__sourcedir} %{__builddir} \\\ + %{nil} %meson_build \ %ninja_build -C %{__builddir} |