2015-07-24 16:37:01 +02:00
#
2017-07-22 16:31:04 +02:00
# spec file for package meson-testsuite
2015-07-24 16:37:01 +02:00
#
2017-01-01 13:44:07 +01:00
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
2015-07-24 16:37:01 +02:00
#
# 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/
#
2017-06-23 22:29:28 +02:00
%define testsuite 0
%if %{testsuite}
%define name_ext -testsuite
%else
%define name_ext %nil
%endif
2016-02-11 20:42:09 +01:00
%define _name mesonbuild
2017-06-23 22:29:28 +02:00
Name : meson%{name_ext}
2017-07-22 16:31:04 +02:00
Version : 0.41.2
2015-07-24 16:37:01 +02:00
Release : 0
2017-01-01 13:44:07 +01:00
Summary : Python-based build system
2015-07-24 16:37:01 +02:00
License : Apache-2.0
2015-08-21 11:26:36 +02:00
Group : Development/Tools/Building
2015-07-24 16:37:01 +02:00
Url : http://mesonbuild.com/
2017-06-23 22:29:28 +02:00
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
2017-03-17 14:58:10 +01:00
# 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.
2017-01-10 17:34:08 +01:00
Patch0 : meson-suse-ify-macros.patch
2017-03-17 14:58:10 +01:00
# PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x.
Patch1 : meson-fix-gcc48.patch
2017-06-23 22:29:28 +02:00
# 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
Patch100 : meson-test-installed-bin.patch
BuildRequires : python3 >= 3.4
2017-06-29 12:19:32 +02:00
BuildArch : noarch
2017-06-23 22:29:28 +02:00
%if %{testsuite}
2015-07-24 16:37:01 +02:00
BuildRequires : bison
BuildRequires : boost-devel
BuildRequires : flex
BuildRequires : gcc-c++
BuildRequires : gcc-fortran
BuildRequires : gcc-obj-c++
2015-09-14 12:11:26 +02:00
BuildRequires : gcc-objc
2015-07-24 16:37:01 +02:00
BuildRequires : gettext
BuildRequires : git
2017-06-23 22:29:28 +02:00
BuildRequires : gnustep-make
BuildRequires : googletest-devel
2015-09-14 12:11:26 +02:00
BuildRequires : gtk-doc
2016-11-22 18:18:39 +01:00
BuildRequires : itstool
2017-06-23 14:40:55 +02:00
BuildRequires : llvm-devel
2017-06-23 22:29:28 +02:00
BuildRequires : meson
2017-06-23 14:40:55 +02:00
BuildRequires : ncurses-devel
2015-07-24 16:37:01 +02:00
BuildRequires : ninja
2016-07-23 21:45:57 +02:00
BuildRequires : pkgconfig
2015-07-24 16:37:01 +02:00
BuildRequires : python3-devel
2015-09-14 12:11:26 +02:00
BuildRequires : python3-gobject
2016-02-11 20:42:09 +01:00
BuildRequires : python3-setuptools
2015-07-24 16:37:01 +02:00
BuildRequires : vala
2017-06-23 22:29:28 +02:00
BuildRequires : cmake(Qt5Core)
BuildRequires : cmake(Qt5Gui)
BuildRequires : cmake(Qt5Widgets)
2015-07-24 16:37:01 +02:00
BuildRequires : pkgconfig(glib-2.0)
BuildRequires : pkgconfig(gobject-introspection-1.0)
2017-06-23 22:29:28 +02:00
BuildRequires : pkgconfig(gtk+-3.0)
BuildRequires : pkgconfig(sdl2)
2015-07-24 16:37:01 +02:00
BuildRequires : pkgconfig(zlib)
2017-06-23 22:29:28 +02:00
%else
2015-07-24 16:37:01 +02:00
Requires : ninja
2016-07-23 21:45:57 +02:00
# meson-gui was last used in openSUSE Leap 42.1.
2017-06-23 22:29:28 +02:00
Provides : meson-gui = %{version}
Obsoletes : meson-gui < %{version}
%endif
2015-07-24 16:37:01 +02:00
%description
2017-01-01 13:44:07 +01:00
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.
2015-07-24 16:37:01 +02:00
2017-06-29 12:18:00 +02:00
%package vim
2017-06-29 12:19:32 +02:00
%{!?vim_data_dir:%global vim_data_dir %_datadir /vim}
2017-06-29 12:18:00 +02:00
Summary : Vim support for meson.build files
Group : Productivity/Text/Editors
Requires : vim
Supplements: packageand(vim:%{name} )
2017-06-29 12:19:32 +02:00
BuildArch : noarch
2017-06-29 12:18:00 +02:00
%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.
2015-07-24 16:37:01 +02:00
%prep
2017-06-23 22:29:28 +02:00
%setup -q -n meson-%{version}
2017-01-10 17:34:08 +01:00
%patch0 -p1
2017-03-17 14:58:10 +01:00
%patch1 -p1
2017-06-23 22:29:28 +02:00
%patch100 -p1
2015-07-24 16:37:01 +02:00
2017-06-23 22:29:28 +02:00
# We do not have gmock available at this moment - can't run the test suite for it
rm -rf " t e s t c a s e s / f r a m e w o r k s / 3 g m o c k " \
" t e s t c a s e s / o b j c / 2 n s s t r i n g "
2015-07-24 16:37:01 +02:00
%build
2017-06-23 22:29:28 +02:00
# If this is the test suite, we don't need anything else but the meson package
%if ! %{testsuite}
2016-02-11 20:42:09 +01:00
python3 setup.py build
2017-06-23 22:29:28 +02:00
%else
# When running the test suite, we want to be sure to use the installed meson version
rm -rf meson.py mesonbuild
%endif
2015-07-24 16:37:01 +02:00
%install
2017-06-23 22:29:28 +02:00
# If this is the test suite, we don't need anything else but the meson package
%if ! %{testsuite}
2016-02-11 20:42:09 +01:00
python3 setup.py install \
--root=%{buildroot} --prefix=%{_prefix}
2016-05-07 11:25:18 +02:00
2017-06-23 22:29:28 +02:00
install -Dpm 0644 data/macros.meson \
%{buildroot} %{_rpmconfigdir} /macros.d/macros.meson
2017-06-29 12:18:00 +02:00
install -Dpm 0644 syntax-highlighting/vim/ftdetect/meson.vim \
-t %{buildroot} %{vim_data_dir} /site/ftdetect
install -Dpm 0644 syntax-highlighting/vim/indent/meson.vim \
-t %{buildroot} %{vim_data_dir} /site/indent
install -Dpm 0644 syntax-highlighting/vim/syntax/meson.vim \
-t %{buildroot} %{vim_data_dir} /site/syntax
2017-06-23 22:29:28 +02:00
%endif
2015-07-24 16:37:01 +02:00
2017-06-23 22:29:28 +02:00
%if %{testsuite}
2015-07-24 16:37:01 +02:00
%check
2017-06-23 22:29:28 +02:00
export LANG=C.UTF-8
2015-07-24 16:37:01 +02:00
export MESON_PRINT_TEST_OUTPUT=1
2016-11-22 18:18:39 +01:00
export SUSE_ASNEEDED=0
2015-07-24 16:37:01 +02:00
python3 run_tests.py
2017-06-23 22:29:28 +02:00
%endif
2015-07-24 16:37:01 +02:00
%files
%defattr (-,root,root)
2017-06-29 12:18:00 +02:00
2017-06-23 14:40:55 +02:00
%doc contributing.txt COPYING
2017-06-23 22:29:28 +02:00
%if !%{testsuite}
%{_bindir} /meson
%{_bindir} /mesonconf
%{_bindir} /mesonintrospect
%{_bindir} /mesontest
2015-07-24 16:37:01 +02:00
%{_bindir} /wraptool
2016-02-11 20:42:09 +01:00
%{python3_sitelib} /%{_name}/
2017-06-23 22:29:28 +02:00
%{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}
2015-07-24 16:37:01 +02:00
%{_mandir} /man1/wraptool.1%{?ext_man}
2017-06-23 22:29:28 +02:00
%endif
2015-07-24 16:37:01 +02:00
2017-06-29 12:19:32 +02:00
%if !%{testsuite}
2017-06-29 12:18:00 +02:00
%files vim
%defattr (-,root,root)
%doc 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
2015-07-24 16:37:01 +02:00
%changelog