From 9dc80cd9571b58ea237275ef08039c41c431348e Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Thu, 29 Jan 2015 21:25:23 +1000 Subject: [PATCH] Make Ruby build conditional --- graphviz.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/graphviz.spec b/graphviz.spec index 7dcefa0..2f93eda 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -5,6 +5,9 @@ %bcond_without static %bcond_with libr +# Distro-specific default value should be defined in branding-configs package +%{?build_ruby}%{?!build_ruby:%bcond_without ruby} + %define cdt_major 5 %define cgraph_major 6 %define gvc_major 6 @@ -28,7 +31,7 @@ Summary: Graph visualization tools Name: graphviz Version: 2.38.0 -Release: 3 +Release: 4 License: Common Public License Group: Graphics Url: http://www.graphviz.org @@ -219,6 +222,7 @@ This package provides the Python extension for %{name}. #------------------------------------------------------------------------- +%if %{with ruby} %package -n ruby-graphviz Summary: Graphviz bindings for ruby Group: System/Libraries @@ -231,6 +235,7 @@ This package provides the Ruby extension for %{name}. %files -n ruby-graphviz %{_libdir}/graphviz/ruby %{_prefix}/lib/ruby +%endif #------------------------------------------------------------------------- @@ -386,6 +391,11 @@ autoreconf -fi --with-gtk \ --with-libgd \ --disable-io \ +%if %{with ruby} + --enable-ruby=yes \ +%else + --enable-ruby=no \ +%endif --disable-dependency-tracking %make TK_LIB_SPEC="-ltcl -ltk" LIBS="-lX11"