Fully disable gtk2 in RHEL 10+

smyrna also requires gtk2, and its additional dependencies were still
pulling it into the buildroot.  This resulted in the gtk backend not
being packaged but -devel still requiring it in ELN.
This commit is contained in:
Yaakov Selkowitz 2023-03-03 10:45:05 -05:00
parent 7513cdf248
commit 1a59651039

View File

@ -57,6 +57,12 @@
%global LASI 0 %global LASI 0
%endif %endif
%if %{GTS} && %{with gtk2}
%global SMYRNA 1
%else
%global SMYRNA 0
%endif
%if %{with php} %if %{with php}
%global PHP 1 %global PHP 1
%else %else
@ -181,8 +187,10 @@ BuildRequires: libgs-devel
BuildRequires: make BuildRequires: make
BuildRequires: poppler-glib-devel BuildRequires: poppler-glib-devel
BuildRequires: freeglut-devel BuildRequires: freeglut-devel
%if %{SMYRNA}
BuildRequires: libglade2-devel BuildRequires: libglade2-devel
BuildRequires: gtkglext-devel BuildRequires: gtkglext-devel
%endif
%if %{without bootstrap} %if %{without bootstrap}
BuildRequires: doxygen BuildRequires: doxygen
%endif %endif
@ -234,7 +242,7 @@ Summary: PDF and HTML documents for graphviz
%description doc %description doc
Provides some additional PDF and HTML documentation for graphviz. Provides some additional PDF and HTML documentation for graphviz.
%if %{GTS} %if %{SMYRNA}
%package smyrna %package smyrna
Summary: Graphviz interactive graph viewer Summary: Graphviz interactive graph viewer
@ -427,9 +435,18 @@ export CPPFLAGS=-I`ruby -e "puts File.join(RbConfig::CONFIG['includedir'], RbCon
%if ! %{LASI} %if ! %{LASI}
--without-lasi \ --without-lasi \
%endif %endif
%if %{without gtk2}
--without-gtk \
--without-gtkgl \
--without-gtkglext \
--without-glade \
%endif
%if ! %{GTS} %if ! %{GTS}
--without-gts \ --without-gts \
%endif %endif
%if ! %{SMYRNA}
--without-smyrna \
%endif
%if ! %{SHARP} %if ! %{SHARP}
--disable-sharp \ --disable-sharp \
%endif %endif
@ -599,7 +616,7 @@ php --no-php-ini \
%files %files
%doc %{_docdir}/%{name} %doc %{_docdir}/%{name}
%if %{GTS} %if %{SMYRNA}
%exclude %{_bindir}/smyrna %exclude %{_bindir}/smyrna
%exclude %{_mandir}/man1/smyrna.1* %exclude %{_mandir}/man1/smyrna.1*
%endif %endif
@ -623,8 +640,10 @@ php --no-php-ini \
%exclude %{_libdir}/graphviz/*/* %exclude %{_libdir}/graphviz/*/*
%exclude %{_libdir}/graphviz/libgvplugin_gd.* %exclude %{_libdir}/graphviz/libgvplugin_gd.*
%if %{with gtk2}
%exclude %{_libdir}/graphviz/libgvplugin_gtk.* %exclude %{_libdir}/graphviz/libgvplugin_gtk.*
%exclude %{_libdir}/graphviz/libgvplugin_gdk.* %exclude %{_libdir}/graphviz/libgvplugin_gdk.*
%endif
%if %{DEVIL} %if %{DEVIL}
%exclude %{_libdir}/graphviz/libgvplugin_devil.* %exclude %{_libdir}/graphviz/libgvplugin_devil.*
%endif %endif
@ -650,7 +669,7 @@ php --no-php-ini \
%doc %{_docdir}/%{name}/*.pdf %doc %{_docdir}/%{name}/*.pdf
%doc %{_docdir}/%{name}/demo %doc %{_docdir}/%{name}/demo
%if %{GTS} %if %{SMYRNA}
%files smyrna %files smyrna
%{_bindir}/smyrna %{_bindir}/smyrna
%{_datadir}/%{name}/smyrna %{_datadir}/%{name}/smyrna