From 1e4347627b38ada0ad2b3e07310949ef6c84b7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 12 Apr 2022 18:42:58 +0200 Subject: [PATCH] Drop -java subpackage on i386 See https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs --- graphviz.spec | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/graphviz.spec b/graphviz.spec index 4a711e1..7cf4c4e 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -30,6 +30,12 @@ # Not in Fedora yet. %global MING 0 +%ifarch %{java_arches} +%global JAVA 1 +%else +%global JAVA 0 +%endif + %if 0%{?rhel} %global SHARP 0 %global ARRRR 0 @@ -103,7 +109,9 @@ BuildRequires: python3-devel BuildRequires: libXaw-devel BuildRequires: libSM-devel BuildRequires: libXext-devel +%if %{JAVA} BuildRequires: java-devel +%endif BuildRequires: cairo-devel >= 1.1.10 BuildRequires: pango-devel BuildRequires: gmp-devel @@ -158,6 +166,10 @@ Requires(postun): /sbin/ldconfig # rhbz#1838679 Patch0: graphviz-2.49.3-gvpack-neato-static.patch +%if ! %{JAVA} +Obsoletes: graphviz-java < %{version}-%{release} +%endif + %description A collection of tools for the manipulation and layout of graphs (as in nodes and edges, not as in barcharts). @@ -224,12 +236,14 @@ Requires: %{name} = %{version}-%{release} Guile extension for graphviz. %endif +%if %{JAVA} %package java Summary: Java extension for graphviz Requires: %{name} = %{version}-%{release} %description java Java extension for graphviz. +%endif %package lua Summary: Lua extension for graphviz @@ -342,9 +356,11 @@ find -type f -regex '.*\.\(c\|h\)$' -exec chmod a-x {} ';' %build ./autogen.sh +%if %{JAVA} # Hack in the java includes we need sed -i '/JavaVM.framework/!s/JAVA_INCLUDES=/JAVA_INCLUDES=\"_MY_JAVA_INCLUDES_\"/g' configure sed -i 's|_MY_JAVA_INCLUDES_|-I%{java_home}/include/ -I%{java_home}/include/linux/|g' configure +%endif # Rewrite config_ruby.rb to work with Ruby 2.2 sed -i 's|expand(|expand(RbConfig::|' config/config_ruby.rb sed -i 's|sitearchdir|vendorarchdir|' config/config_ruby.rb @@ -457,6 +473,8 @@ if [ "%{_prefix}" != "/usr" ]; then rm -rf %{buildroot}/usr/* fi +rm -v %{buildroot}%{_mandir}/man3/gv.3java* + %check %if %{PHP} # Minimal load test of php extension @@ -583,9 +601,11 @@ php --no-php-ini \ %{_mandir}/man3/gv.3guile* %endif +%if %{JAVA} %files java %{_libdir}/graphviz/java/ %{_mandir}/man3/gv.3java* +%endif %files lua %{_libdir}/graphviz/lua/