SHA256
1
0
forked from pool/meson
meson/meson.spec

228 lines
7.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package meson-testsuite
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define testsuite 0
%if %{testsuite}
%define name_ext -testsuite
%else
%define name_ext %{nil}
%endif
%define _name mesonbuild
Name: meson%{name_ext}
Version: 0.46.0
Release: 0
Summary: Python-based build system
License: Apache-2.0
Group: Development/Tools/Building
URL: http://mesonbuild.com/
Source: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz
Source1: https://github.com/%{_name}/meson/releases/download/%{version}/meson-%{version}.tar.gz.asc
Source2: meson.keyring
# PATCH-FIX-OPENSUSE meson-suse-ify-macros.patch dimstar@opensuse.org -- Make the macros non-RedHat specific: so far there are no separate {C,CXX,F}FLAGS.
Patch0: meson-suse-ify-macros.patch
# PATCH-FIX-OPENSUSE meson-test-installed-bin.patch dimstar@opensuse.org -- We want the test suite to run against /usr/bin/meson coming from our meson package.
Patch1: meson-test-installed-bin.patch
# PATCH-FIX-UPSTREAM meson-keep-spaces-in-pc-files.patch gh#mesonbuild/meson#3479 dimstar@opensuse.org -- Keep spaces in generated .pc files
Patch2: meson-keep-spaces-in-pc-files.patch
# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests.
Patch3: meson-suse-fix-llvm-3.8.patch
# PATCH-FIX-OPENSUSE meson-restore-python3.4.patch -- Restore Python 3.4 support (reverts commit 0538009).
Patch4: meson-restore-python3.4.patch
# PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x.
Patch5: meson-fix-gcc48.patch
# PATCH-FIX-UPSTREAM Don-t-raise-StopIteration-in-generators-no-longer-al.patch -- Don't raise StopIteration in generators, no longer allowed with Python 3.7. Fixes #3622
Patch6: Don-t-raise-StopIteration-in-generators-no-longer-al.patch
BuildRequires: python3-base
BuildArch: noarch
%if %{testsuite}
BuildRequires: bison
BuildRequires: cups-devel
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: gcc-obj-c++
BuildRequires: gcc-objc
BuildRequires: gettext
BuildRequires: git
BuildRequires: gnustep-make
BuildRequires: googletest-devel
BuildRequires: gtk-doc
BuildRequires: itstool
BuildRequires: libjpeg-devel
BuildRequires: libpcap-devel
BuildRequires: libwmf-devel
BuildRequires: llvm-devel
BuildRequires: meson = %{version}
BuildRequires: ncurses-devel
BuildRequires: ninja
BuildRequires: openmpi-devel
BuildRequires: pkgconfig
BuildRequires: python3-devel >= 3.4
BuildRequires: python3-gobject
BuildRequires: python3-setuptools
BuildRequires: vala
BuildRequires: vulkan-devel
BuildRequires: zlib-devel-static
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(zlib)
%if 0%{?suse_version} >= 1500
BuildRequires: libboost_log-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_test-devel
BuildRequires: libboost_thread-devel
%else
BuildRequires: boost-devel
%endif
%else
Requires: ninja
Requires: python3-xml
# meson-gui was last used in openSUSE Leap 42.1.
Provides: meson-gui = %{version}
Obsoletes: meson-gui < %{version}
%endif
%description
Meson is a build system designed to optimise programmer productivity.
It aims to do this by providing support for software development
tools and practices, such as unit tests, coverage reports, Valgrind,
CCache and the like. Supported languages include C, C++, Fortran,
Java, Rust. Build definitions are written in a non-turing complete
Domain Specific Language.
%package vim
%{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim}
Summary: Vim support for meson.build files
Group: Productivity/Text/Editors
Requires: vim
Supplements: packageand(vim:%{name})
BuildArch: noarch
%description vim
Meson is a build system designed to optimise programmer productivity.
It aims to do this by providing support for software development
tools and practices, such as unit tests, coverage reports, Valgrind,
CCache and the like. Supported languages include C, C++, Fortran,
Java, Rust. Build definitions are written in a non-turing complete
Domain Specific Language.
This package provides support for meson.build files in Vim.
%prep
%setup -q -n meson-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%if 0%{?suse_version} < 1500
%patch3 -p1
%patch4 -p1
%patch5 -p1
%endif
%patch6 -p1
# Remove static boost tests from test cases/frameworks/1 boost (can't use patch due to spaces in dirname)
sed -i "/static/d" test\ cases/frameworks/1\ boost/meson.build
# Disable test of llvm-static libs: openSUSE does not package/ship them
sed -i "s/foreach static : \[true, false\]/foreach static : \[false\]/" test\ cases/frameworks/15\ llvm/meson.build
# We do not have gmock available at this moment - can't run the test suite for it
rm -rf "test cases/frameworks/3 gmock" \
"test cases/objc/2 nsstring"
Accepting request 535269 from home:badshah400:branches:devel:tools:building - Update to version 0.43.0: + Generator learned capture: Generators can now be configured to capture the standard output. + Can index CustomTarget objects: The CustomTarget object can now be indexed like an array. The resulting object can be used as a source file for other Targets, this will create a dependency on the original CustomTarget, but will only insert the generated file corresponding to the index value of the CustomTarget's output keyword. + The cross file can now be used for overriding the result of find_program. Then issuing the command find_program('objdump') will return the version specified in the cross file. + Easier handling of supported compiler arguments. + Better support for shared libraries in non-system paths: This release adds feature parity to shared libraries that are either in non-standard system paths or shipped as part of your project. On systems that support rpath, Meson automatically adds rpath entries to built targets using manually found external libraries. + The Wrap dependency system now supports Subversion (svn). This support is rudimentary. The repository url has to point to a specific (sub)directory containing the meson.build file (typically trunk/). However, providing a revision is supported. - Rebase meson-test-installed-bin.patch. - Run sed to strip the hashbang from a non-executable file; this prevents an rpmlint warning. - Update to version 0.43.0: + Generator learned capture: Generators can now be configured to OBS-URL: https://build.opensuse.org/request/show/535269 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=65
2017-10-19 17:35:14 +02:00
# Remove hashbang from non-exec script
sed -i '1{/\/usr\/bin\/env/d;}' ./mesonbuild/rewriter.py
%build
# If this is the test suite, we don't need anything else but the meson package
%if !%{testsuite}
python3 setup.py build
%else
# Ensure we have no mesonbuild / meson in CWD, thus guaranteeing we use meson in $PATH
rm -rf meson.py mesonbuild
%endif
%install
# If this is the test suite, we don't need anything else but the meson package
%if ! %{testsuite}
python3 setup.py install \
--root=%{buildroot} --prefix=%{_prefix}
install -Dpm 0644 data/macros.meson \
%{buildroot}%{_rpmconfigdir}/macros.d/macros.meson
install -Dpm 0644 data/syntax-highlighting/vim/ftdetect/meson.vim \
-t %{buildroot}%{vim_data_dir}/site/ftdetect
install -Dpm 0644 data/syntax-highlighting/vim/indent/meson.vim \
-t %{buildroot}%{vim_data_dir}/site/indent
install -Dpm 0644 data/syntax-highlighting/vim/syntax/meson.vim \
-t %{buildroot}%{vim_data_dir}/site/syntax
%endif
%if %{testsuite}
%check
export LANG=C.UTF-8
export MESON_PRINT_TEST_OUTPUT=1
export SUSE_ASNEEDED=0
source %{_libdir}/mpi/gcc/openmpi/bin/mpivars.sh
python3 run_tests.py
%endif
%files
%if 0%{?suse_version} >= 1500
%license COPYING
%else
%doc COPYING
%endif
%if !%{testsuite}
%{_bindir}/meson
%{_bindir}/mesonconf
%{_bindir}/mesonintrospect
%{_bindir}/mesontest
%{_bindir}/wraptool
%{python3_sitelib}/%{_name}/
%{python3_sitelib}/meson-*
%{_rpmconfigdir}/macros.d/macros.meson
%{_mandir}/man1/meson.1%{?ext_man}
%{_mandir}/man1/mesonconf.1%{?ext_man}
%{_mandir}/man1/mesonintrospect.1%{?ext_man}
%{_mandir}/man1/mesontest.1%{?ext_man}
%{_mandir}/man1/wraptool.1%{?ext_man}
%endif
%if !%{testsuite}
%files vim
%doc data/syntax-highlighting/vim/README
%dir %{vim_data_dir}
%dir %{vim_data_dir}/site
%dir %{vim_data_dir}/site/ftdetect
%dir %{vim_data_dir}/site/indent
%dir %{vim_data_dir}/site/syntax
%{vim_data_dir}/site/ftdetect/meson.vim
%{vim_data_dir}/site/indent/meson.vim
%{vim_data_dir}/site/syntax/meson.vim
%endif
%changelog