Add build conditions for modularity

This commit is contained in:
Petr Písař 2017-08-31 13:47:37 +02:00
parent f1aa60c567
commit 8e757445c1

View File

@ -2,6 +2,8 @@
# run "make check" by default
%bcond_without check
# Run optional test
%bcond_without automake_enables_optional_test
# remove once %%configure is used instead of ./configure
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -22,7 +24,7 @@ Source3: http://git.savannah.gnu.org/cgit/config.git/plain/config.guess
# Keep those patches in 'git format-patch' format (with docs).
%if %{with check}
%if %{with check} && !%{without automake_enables_optional_test}
Patch0: automake-1.15-disable-vala-tests.patch
Patch1: automake-1.15-dejagnu-testcase.patch
%endif
@ -50,6 +52,7 @@ BuildArch: noarch
# for better tests coverage:
%if %{with check}
%if %{with automake_enables_optional_test}
BuildRequires: automake libtool gettext-devel flex bison texinfo-tex texlive-dvips
BuildRequires: java-devel-openjdk gcc-gfortran
BuildRequires: dejagnu expect emacs imake python-docutils vala
@ -59,6 +62,7 @@ BuildRequires: gcc-objc gcc-objc++
BuildRequires: python-virtualenv lzip
%endif
%endif
%endif
@ -76,7 +80,7 @@ Makefiles.
%prep
%autosetup -p1
%if %{with check}
%if %{with check} && %{with automake_enables_optional_test}
autoreconf -iv
%endif