meson/meson.spec

126 lines
3.8 KiB
RPMSpec
Raw Normal View History

%global libname mesonbuild
# Dont run the tests by default, since they are rather flaky.
# Ill get to getting them running eventually, but free time is sparse.
# — ekulik
%bcond_with check
Name: meson
2023-03-09 09:15:16 +00:00
Version: 1.0.1
2022-05-10 13:06:23 +00:00
Release: %autorelease
Summary: High productivity build system
License: ASL 2.0
URL: https://mesonbuild.com/
Source: https://github.com/mesonbuild/meson/releases/download/%{version_no_tilde .}/meson-%{version_no_tilde %{quote:}}.tar.gz
# Fix for meson test crashes with Python 3.12:
# RuntimeError: There is no current event loop in thread 'MainThread'
# Merged upstream.
# https://bugzilla.redhat.com/2155463
Patch: https://github.com/mesonbuild/meson/pull/11215.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python%{python3_version}dist(setuptools)
Requires: ninja-build
%if %{with check}
BuildRequires: ninja-build
# Some tests expect the unversioned executable
BuildRequires: /usr/bin/python
# Various languages
BuildRequires: gcc
BuildRequires: libasan
BuildRequires: gcc-c++
BuildRequires: gcc-gfortran
BuildRequires: gcc-objc
BuildRequires: gcc-objc++
BuildRequires: java-devel
2020-01-14 09:46:13 +00:00
BuildRequires: libomp-devel
BuildRequires: mono-core mono-devel
BuildRequires: rust
# Since the build is noarch, we can't use %%ifarch
#%%ifarch %%{ldc_arches}
#BuildRequires: ldc
#%%endif
# Various libs support
BuildRequires: boost-devel
BuildRequires: gtest-devel
BuildRequires: gmock-devel
BuildRequires: qt5-qtbase-devel
2020-01-14 09:46:13 +00:00
BuildRequires: qt5-qtbase-private-devel
BuildRequires: qt5-linguist
BuildRequires: vala
BuildRequires: python3-gobject-base
BuildRequires: wxGTK3-devel
BuildRequires: flex
BuildRequires: bison
BuildRequires: gettext
BuildRequires: gnustep-base-devel
BuildRequires: %{_bindir}/gnustep-config
BuildRequires: git-core
BuildRequires: pkgconfig(protobuf)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(glib-sharp-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: gtk-doc
BuildRequires: itstool
BuildRequires: pkgconfig(zlib)
2020-11-10 22:09:28 +00:00
BuildRequires: zlib-static
BuildRequires: python3dist(cython)
BuildRequires: pkgconfig(sdl2)
BuildRequires: %{_bindir}/pcap-config
BuildRequires: pkgconfig(vulkan)
BuildRequires: llvm-devel
BuildRequires: cups-devel
%endif
%description
Meson is a build system designed to optimize programmer
productivity. It aims to do this by providing simple, out-of-the-box
support for modern software development tools and practices, such as
unit tests, coverage reports, Valgrind, CCache and the like.
%prep
2021-08-21 09:21:26 +00:00
%autosetup -p1 -n meson-%{version_no_tilde %{quote:}}
# Macro should not change when we are redefining bindir
sed -i -e "/^%%__meson /s| .*$| %{_bindir}/%{name}|" data/macros.%{name}
%build
%py3_build
%install
%py3_install
install -Dpm0644 -t %{buildroot}%{rpmmacrodir} data/macros.%{name}
install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions/ data/shell-completions/bash/meson
install -Dpm0644 -t %{buildroot}%{_datadir}/zsh/site-functions/ data/shell-completions/zsh/_meson
%if %{with check}
%check
2020-01-23 08:24:50 +00:00
# Remove Boost tests for now, because it requires Python 2
rm -rf "test cases/frameworks/1 boost"
# Remove MPI tests for now because it is complicated to run
rm -rf "test cases/frameworks/17 mpi"
export MESON_PRINT_TEST_OUTPUT=1
%{__python3} ./run_tests.py
%endif
%files
%license COPYING
%{_bindir}/%{name}
%{python3_sitelib}/%{libname}/
%{python3_sitelib}/%{name}-*.egg-info/
%{_mandir}/man1/%{name}.1*
%{rpmmacrodir}/macros.%{name}
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%{_datadir}/polkit-1/actions/com.mesonbuild.install.policy
%{_datadir}/bash-completion/completions/meson
%{_datadir}/zsh/site-functions/_meson
%changelog
2022-05-10 13:06:23 +00:00
%autochangelog