%global libname mesonbuild # Don’t run the tests by default, since they are rather flaky. # I’ll get to getting them running eventually, but free time is sparse. # — ekulik %bcond_with check Name: meson Version: 1.3.2 Release: %autorelease Summary: High productivity build system License: Apache-2.0 URL: https://mesonbuild.com/ Source: https://github.com/mesonbuild/meson/releases/download/%{version_no_tilde .}/meson-%{version_no_tilde %{quote:}}.tar.gz # Don't use the removed importlib.resources.path with Python 3.13+ Patch: https://github.com/mesonbuild/meson/pull/12402.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 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 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) 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 %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 # 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 %autochangelog