From 8f7778822eaaeb1781be2866c7ae348067741eb6 Mon Sep 17 00:00:00 2001 From: Pavel Cahyna Date: Tue, 9 Feb 2021 11:35:29 +0100 Subject: [PATCH] Make gnuplot build dependency optional No changes to the build process are needed. Gnuplot is used only for several tests, which will get skipped automatically if gnuplot is not present. Allows to reduce dependencies, esp. on RHEL. --- leptonica.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/leptonica.spec b/leptonica.spec index 737ac66..3bff9ff 100644 --- a/leptonica.spec +++ b/leptonica.spec @@ -1,3 +1,9 @@ +%if 0%{?rhel} >= 9 +%bcond_with gnuplot +%else +%bcond_without gnuplot +%endif + Name: leptonica Version: 1.80.0 Release: 2%{?dist} @@ -18,8 +24,10 @@ BuildRequires: libtiff-devel BuildRequires: libwebp-devel BuildRequires: zlib-devel -# Needed for baseline_reg test +# Needed for several tests +%if %{with gnuplot} BuildRequires: gnuplot +%endif BuildRequires: make