From 9604bc87196ca3c316f2ae8d657b1764ba5aef3d Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 23 Sep 2017 11:30:48 +0200 Subject: [PATCH] Conditionally allow building without C++ docs --- antlr.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/antlr.spec b/antlr.spec index 54990c9..7786369 100644 --- a/antlr.spec +++ b/antlr.spec @@ -1,3 +1,4 @@ +%bcond_without doxygen %bcond_without python %global debug_package %{nil} @@ -6,7 +7,7 @@ Summary: ANother Tool for Language Recognition Name: antlr Version: 2.7.7 -Release: 50%{?dist} +Release: 51%{?dist} Epoch: 0 License: Public Domain URL: http://www.antlr2.org/ @@ -30,7 +31,9 @@ BuildRequires: ant BuildRequires: java-devel >= 1:1.7.0 BuildRequires: java-javadoc BuildRequires: javapackages-local +%if %{with doxygen} BuildRequires: doxygen graphviz +%endif %if %{with python} # Do not support Python3 BuildRequires: python2-devel @@ -77,6 +80,7 @@ Provides: antlr-static = %{version}-%{release} %description C++ This package provides a static C++ library for parsers generated by ANTLR2. +%if %{with doxygen} %package C++-doc Summary: Documentation for C++ bindings for antlr2 generated parsers BuildArch: noarch @@ -84,6 +88,7 @@ BuildArch: noarch %description C++-doc This package contains the documentation for the C++ bindings for parsers generated by ANTLR2. +%endif %if %{with python} %package -n python2-%{name} @@ -127,11 +132,13 @@ rm antlr.jar rm doc/{Makefile,Makefile.in} chmod 0644 doc/* +%if %{with doxygen} # generate doxygen docs for C++ bindings pushd lib/cpp doxygen doxygen.cfg find gen_doc -type f -exec chmod 0644 {} \; popd +%endif %if %{with python} # build python @@ -176,9 +183,11 @@ cd ../.. %{_libdir}/libantlr.a %{_bindir}/antlr-config +%if %{with doxygen} %files C++-doc %license LICENSE.txt %doc lib/cpp/gen_doc/html/ +%endif %files manual %license LICENSE.txt @@ -195,6 +204,9 @@ cd ../.. %endif %changelog +* Sat Sep 23 2017 Mikolaj Izdebski - 0:2.7.7-51 +- Conditionally allow building without C++ docs + * Wed Aug 02 2017 Fedora Release Engineering - 0:2.7.7-50 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild