Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:trenn
graphviz
graphviz.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File graphviz.spec of Package graphviz
# # spec file for package graphviz # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define mname graphviz %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" != "" %define psuffix -%{flavor} %else %define psuffix %{nil} %endif %global ARRRR 0 %global DEVIL 0 %global GOLANG 0 %global GTS 0 %global GUILE 0 %global JAVA 0 %global LASI 0 %global MING 0 %global OCAML 0 %global PHP 0 # Build with QT applications (currently only gvedit) %global QTAPPS 0 %global RUBY 0 %global SHARP 0 %global SMYRNA 0 %if "%{flavor}" == "addons" %global ARRRR 1 %global DEVIL 1 %global GOLANG 1 %global GTS 1 %global GUILE 1 %global JAVA 1 %global LASI 0 %global MING 1 # OCaml packages not built on i686 since OCaml 5 / Fedora 39. %ifnarch %{ix86} %global OCAML 1 %else %global OCAML 0 %endif %global PHP 1 %global RUBY 1 %global SHARP 1 %global SMYRNA 1 %elif "%{flavor}" == "qt" # Build with QT applications (currently only gvedit) %global QTAPPS 1 %endif # Plugins version %global pluginsver 6 %global php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4) # Fix for the 387 extended precision (rhbz#772637) %ifarch i386 i686 %global FFSTORE -ffloat-store %endif %bcond_without python2 Name: %{mname}%{psuffix} Version: 9.0.0.486.g881e38b3 Release: 0%{?dist} Summary: Graph Visualization Tools License: EPL-1.0 URL: http://www.graphviz.org/ Source0: %{mname}-%{version}.tar.xz #Source0: https://gitlab.com/api/v4/projects/%%{name}%%2F%%{name}/packages/generic/%%{name}-releases/%%{version}/%%{name}-%%{version}.tar.xz Patch0: graphviz-smyrna-link_against_glu.patch Patch1: graphviz-fix-pkgIndex.patch #PATCH-FIX-UPSTREAM Off-by-one bug Patch2: graphviz-array_overflow.patch Patch3: graphviz-2.20.2-interpreter_names.patch #PATCH-FIX-UPSTREAM Don't warn about harmless issues with swig generated code Patch4: graphviz-useless_warnings.patch Patch5: graphviz-no_strict_aliasing.patch Patch6: graphviz-no_php_extra_libs.patch # https://gitlab.com/graphviz/graphviz/-/issues/2303 Patch7: swig-4.1.0.patch # rhbz#1838679 Patch10: graphviz-4.0.0-gvpack-neato-static.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: cairo-devel >= 1.1.10 #BuildRequires: expat-devel BuildRequires: flex BuildRequires: fontconfig-devel BuildRequires: freeglut-devel BuildRequires: freetype-devel >= 2 BuildRequires: gcc-c++ BuildRequires: gd-devel # for ps2pdf BuildRequires: ghostscript BuildRequires: gmp-devel BuildRequires: ksh BuildRequires: libSM-devel BuildRequires: libXaw-devel BuildRequires: libXext-devel BuildRequires: libXmu-devel BuildRequires: libXt-devel #BuildRequires: libgs-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel # Temporary workaound for perl(Carp) not pulled #BuildRequires: perl-Carp #BuildRequires: perl-ExtUtils-Embed #BuildRequires: perl-devel #BuildRequires: perl-generators BuildRequires: libpoppler-glib-devel BuildRequires: librsvg2-devel BuildRequires: libtool BuildRequires: libtool-ltdl-devel BuildRequires: lua-devel BuildRequires: m4 BuildRequires: make BuildRequires: pango-devel BuildRequires: python3-devel BuildRequires: qpdf BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: sed BuildRequires: swig >= 1.3.33 BuildRequires: tcl-devel >= 8.3 BuildRequires: tk-devel #BuildRequires: urw-base35-fonts BuildRequires: zlib-devel # ISO8859-1 fonts are required by lefty Requires: urw-base35-fonts Requires: xorg-x11-fonts-ISO8859-1-100dpi Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %{perl_requires} %if %{GUILE} BuildRequires: guile-devel %endif %if %{with python2} BuildRequires: python2-devel %endif %if %{JAVA} BuildRequires: java-devel %endif %if %{with gtk2} BuildRequires: gtk2-devel %endif %if %{PHP} BuildRequires: php8-devel %endif %if %{SHARP} BuildRequires: mono-core %endif %if %{DEVIL} BuildRequires: DevIL-devel %endif %if %{ARRRR} BuildRequires: R-devel %endif %if %{OCAML} BuildRequires: ocaml %endif %if %{QTAPPS} BuildRequires: qt6-base-devel %endif %if %{GTS} BuildRequires: gts-devel %endif %if %{LASI} BuildRequires: libLASi-devel %endif %if %{SMYRNA} BuildRequires: gtkglext-devel BuildRequires: libGLU1 BuildRequires: libglade2-devel %endif %if %{GOLANG} BuildRequires: golang %endif %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). %package devel Summary: Development package for graphviz Requires: %{mname}-gd = %{version}-%{release} Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel A collection of tools for the manipulation and layout of graphs (as in nodes and edges, not as in barcharts). This package contains development files for graphviz. %if %{DEVIL} %package devil Summary: Graphviz plugin for renderers based on DevIL Requires: %{name} = %{version}-%{release} %description devil Graphviz plugin for renderers based on DevIL. (Unless you absolutely have to use BMP, TIF, or TGA, you are recommended to use the PNG format instead supported directly by the cairo+pango based renderer in the base graphviz rpm.) %endif %package doc Summary: PDF and HTML documents for graphviz %description doc Provides some additional PDF and HTML documentation for graphviz. %if %{SMYRNA} %package smyrna Summary: Graphviz interactive graph viewer %description smyrna Smyrna is a viewer for graphs in the DOT format. %endif %package gd Summary: Graphviz plugin for renderers based on gd Requires: %{name} = %{version}-%{release} Requires(post): %{_bindir}/dot Requires(post): /sbin/ldconfig Requires(postun): %{_bindir}/dot Requires(postun): /sbin/ldconfig %description gd Graphviz plugin for renderers based on gd. (Unless you absolutely have to use GIF, you are recommended to use the PNG format instead because of the better quality anti-aliased lines provided by the cairo+pango based renderer.) %if %{with gtk2} %package gtk2 Summary: Graphviz plugin for renderers based on gtk2 Requires: %{name} = %{version}-%{release} Requires(post): %{_bindir}/dot Requires(post): /sbin/ldconfig Requires(postun): %{_bindir}/dot Requires(postun): /sbin/ldconfig %description gtk2 Graphviz plugin for renderers based on gtk2. %endif %package graphs Summary: Demo graphs for graphviz %description graphs Some demo graphs for graphviz. %if %{GUILE} %package guile Summary: Guile extension for graphviz Requires: %{name} = %{version}-%{release} %description guile 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 Requires: %{name} = %{version}-%{release} Requires: lua %description lua Lua extension for graphviz. %if %{MING} %package ming Summary: Graphviz plugin for flash renderer based on ming Requires: %{name} = %{version}-%{release} %description ming Graphviz plugin for -Tswf (flash) renderer based on ming. %endif %if %{OCAML} %package ocaml Summary: Ocaml extension for graphviz Requires: %{name} = %{version}-%{release} Requires: ocaml %description ocaml Ocaml extension for graphviz. %endif %package perl Summary: Perl extension for graphviz Requires: %{name} = %{version}-%{release} %description perl Perl extension for graphviz. %if %{PHP} %package php Summary: PHP extension for graphviz Requires: %{name} = %{version}-%{release} Requires: php(api) = %{?php_core_api}%{?!php_core_api:UNDEFINED} Requires: php(zend-abi) = %{?php_zend_api}%{?!php_zend_api:UNDEFINED} %description php PHP extension for graphviz. %endif %if %{with python2} %package python2 Summary: Python extension for graphviz Requires: %{name} = %{version}-%{release} # Manually add provides that would be generated automatically if .egg-info was present Provides: python2dist(gv) = %{version} Provides: python%{python2_version}dist(gv) = %{version} # Remove before F30 Provides: %{mname}-python = %{version}-%{release} Provides: %{mname}-python%{?_isa} = %{version}-%{release} Obsoletes: %{mname}-python < 2.40.1-25 Obsoletes: python2-%{mname} < 2.40.1-25 %description python2 Python extension for graphviz. %endif %package python3 Summary: Python 3 extension for graphviz Requires: %{name} = %{version}-%{release} # Manually add provides that would be generated automatically if .egg-info was present Provides: python3dist(gv) = %{version} Provides: python%{python3_version}dist(gv) = %{version} %description python3 Python 3 extension for graphviz. %if %{ARRRR} %package R Summary: R extension for graphviz Requires: %{name} = %{version}-%{release} Requires: R-core %description R R extension for graphviz. %endif %if %{RUBY} %package ruby Summary: Ruby extension for graphviz Requires: %{name} = %{version}-%{release} Requires: ruby %description ruby Ruby extension for graphviz. %endif %if %{SHARP} %package sharp Summary: C# extension for graphviz Requires: %{name} = %{version}-%{release} Requires: mono-core %description sharp C# extension for graphviz. %endif %package tcl Summary: Tcl extension & tools for graphviz Requires: %{name} = %{version}-%{release} Requires: tcl >= 8.3 Requires: tk %description tcl Various tcl packages (extensions) for the graphviz tools. %if %{GOLANG} %package go Summary: Go extension for graphviz Requires: %{name} = %{version}-%{release} Requires: golang %description go Go extension for graphviz. %endif %prep %setup -q -n %{mname}-%{version} %autopatch -p1 # Attempt to fix rpmlint warnings about executable sources 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 %if %{RUBY} # 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 # get the path to search for ruby/config.h to CPPFLAGS, so that configure can find it export CPPFLAGS=-I`ruby -e "puts File.join(RbConfig::CONFIG['includedir'], RbConfig::CONFIG['sitearch'])" || echo /dev/null` %endif %configure --with-x --disable-static --disable-dependency-tracking \ %if ! %{JAVA} --enable-java=no \ %endif --without-mylibgd --with-ipsepcola --with-pangocairo \ --with-gdk-pixbuf --with-visio --disable-silent-rules --enable-lefty \ %if ! %{LASI} --without-lasi \ %endif %if %{without gtk2} --without-gtk \ --without-gtkgl \ --without-gtkglext \ --without-glade \ %endif %if ! %{GTS} --without-gts \ %endif %if ! %{SMYRNA} --without-smyrna \ %endif %if ! %{SHARP} --disable-sharp \ %endif %if ! %{OCAML} --disable-ocaml \ %endif %if ! %{MING} --without-ming \ %endif %if ! %{ARRRR} --disable-r \ %endif %if ! %{DEVIL} --without-devil \ %endif %if ! %{QTAPPS} --without-qt \ %endif %if %{GUILE} --enable-guile=yes \ %else --enable-guile=no \ %endif %if %{GOLANG} --enable-go=yes \ %else --enable-go=no \ %endif %if %{RUBY} --enable-ruby=yes RUBY_VER=%{ruby_version} %else --enable-ruby=no %endif # drop rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %make_build CFLAGS="%{optflags} -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" \ CXXFLAGS="%{optflags} -fno-strict-aliasing -fno-strict-overflow %{?FFSTORE}" %install %make_install docdir=%{_docdir}/%{name} \ pkgconfigdir=%{_libdir}/pkgconfig find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' # Install README install -m0644 README %{buildroot}%{_docdir}/%{mname} %if %{PHP} # PHP configuration file mkdir -p %{buildroot}%{_sysconfdir}/php.d cat << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{ini_name} ; Enable %{name} extension module extension=gv.so __EOF__ %endif # Remove executable modes from demos find %{buildroot}%{_datadir}/%{mname}/demo -type f -exec chmod a-x {} ';' # Move demos to doc mv %{buildroot}%{_datadir}/%{mname}/demo %{buildroot}%{_docdir}/%{mname}/ # Rename python demos to prevent byte compilation find %{buildroot}%{_docdir}/%{mname}/demo -type f -name "*.py" -exec mv {} {}.demo ';' # Remove dot_builtins, on demand loading should be sufficient rm -f %{buildroot}%{_bindir}/dot_builtins # Remove metadata from generated PDFs pushd %{buildroot}%{_docdir}/%{mname} for f in prune gvgen.1 gc.1 dot.1 cluster.1 do if [ -f $f.pdf ] then # ugly, but there is probably no better solution qpdf --empty --static-id --pages $f.pdf -- $f.pdf.$$ mv -f $f.pdf.$$ $f.pdf fi done popd %if %{with python2} install -pD tclpkg/gv/.libs/libgv_python2.so %{buildroot}%{python2_sitearch}/_gv.so install -p tclpkg/gv/gv.py %{buildroot}%{python2_sitearch}/gv.py %endif # python 3 install -pD tclpkg/gv/.libs/libgv_python3.so %{buildroot}%{python3_sitearch}/_gv.so install -p tclpkg/gv/gv.py %{buildroot}%{python3_sitearch}/gv.py # Ghost plugins config touch %{buildroot}%{_libdir}/graphviz/config%{pluginsver} # Fix lua file placement for flatpak if [ "%{_prefix}" != "%{_prefix}" ]; then cp -ru %{buildroot}%{_prefix}/* %{buildroot}%{_prefix}/ rm -rf %{buildroot}%{_prefix}/* fi # Explicitly create examples directory to always have it. # At the moment there are only examples dependant on smyrna. I.e. if smyrna is not # built this directory is empty. mkdir -p %{buildroot}%{_datadir}/%{mname}/examples %check %if %{PHP} # Minimal load test of php extension LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ php --no-php-ini \ --define extension_dir=%{buildroot}%{_libdir}/graphviz/php/ \ --define extension=libgv_php.so \ --modules | grep gv %endif # upstream test suite # testsuite seems broken, disabling it for now # cd rtest # make rtest %post %{?ldconfig} %{_bindir}/dot -c 2>/dev/null || : %ldconfig_postun %if %{DEVIL} # run "dot -c" to generate plugin config in %%{_libdir}/graphviz/config* %post devil %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %postun devil %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %endif # run "dot -c" to generate plugin config in %%{_libdir}/graphviz/config* %post gd %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %postun gd %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %if %{with gtk2} %post gtk2 %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %postun gtk2 %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %endif %if %{MING} # run "dot -c" to generate plugin config in %%{_libdir}/graphviz/config* %post ming %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %postun ming %{_bindir}/dot -c 2>/dev/null || : %{?ldconfig} %endif %files %doc %{_docdir}/%{mname} %if %{SMYRNA} %exclude %{_bindir}/smyrna %exclude %{_mandir}/man1/smyrna.1* %endif %{_bindir}/* %dir %{_libdir}/graphviz %{_libdir}/*.so.* %{_libdir}/graphviz/*.so.* %{_mandir}/man1/*.1* %{_mandir}/man7/*.7* %dir %{_datadir}/%{mname} %exclude %{_docdir}/%{mname}/*.html %exclude %{_docdir}/%{mname}/*.pdf %exclude %{_docdir}/%{mname}/demo %{_datadir}/%{mname}/gvpr %{_datadir}/%{mname}/examples %ghost %{_libdir}/%{mname}/config%{pluginsver} %if %{QTAPPS} %{_datadir}/%{mname}/gvedit %endif %exclude %{_libdir}/graphviz/*/* %exclude %{_libdir}/graphviz/libgvplugin_gd.* %if %{with gtk2} %exclude %{_libdir}/graphviz/libgvplugin_gtk.* %exclude %{_libdir}/graphviz/libgvplugin_gdk.* %endif %if %{DEVIL} %exclude %{_libdir}/graphviz/libgvplugin_devil.* %endif %if %{MING} %exclude %{_libdir}/graphviz/libgvplugin_ming.* %exclude %{_libdir}/graphviz/*fdb %endif %files devel %{_includedir}/graphviz %{_libdir}/*.so %{_libdir}/graphviz/*.so %{_libdir}/pkgconfig/*.pc %{_mandir}/man3/*.3.* %if %{DEVIL} %files devil %{_libdir}/graphviz/libgvplugin_devil.so.* %endif %files doc %doc %{_docdir}/%{mname}/*.html %doc %{_docdir}/%{mname}/*.pdf %doc %{_docdir}/%{mname}/demo %if %{SMYRNA} %files smyrna %{_bindir}/smyrna %{_datadir}/%{mname}/smyrna %{_mandir}/man1/smyrna.1* %endif %files gd %{_libdir}/graphviz/libgvplugin_gd.so.* %if %{with gtk2} %files gtk2 %{_libdir}/graphviz/libgvplugin_gtk.so.* %{_libdir}/graphviz/libgvplugin_gdk.so.* %endif %files graphs %dir %{_datadir}/graphviz %{_datadir}/graphviz/graphs %if %{GUILE} %files guile %{_libdir}/graphviz/guile/ %{_mandir}/man3/gv.3guile* %endif %if %{JAVA} %files java %{_libdir}/graphviz/java/ %{_mandir}/man3/gv.3java* %endif %files lua %{_libdir}/graphviz/lua/ %{_libdir}/lua*/* %{_mandir}/man3/gv.3lua* %if %{MING} %files ming %{_libdir}/graphviz/libgvplugin_ming.so.* %{_libdir}/graphviz/*fdb %endif %if %{OCAML} %files ocaml %{_libdir}/graphviz/ocaml/ %{_mandir}/man3/gv.3ocaml* %endif %files perl %{_libdir}/graphviz/perl/ %{_prefix}/lib/perl*/* %{_mandir}/man3/gv.3perl* %if %{PHP} %files php %config(noreplace) %{_sysconfdir}/php.d/%{ini_name} %{_libdir}/graphviz/php/ %{php_extdir}/gv.so %{_datadir}/php*/* %{_mandir}/man3/gv.3php* %endif %if %{with python2} %files python2 %{python2_sitearch}/* %{_mandir}/man3/gv.3python* %endif %files python3 %{python3_sitearch}/* %{_mandir}/man3/gv.3python* %if %{ARRRR} %files R %{_libdir}/graphviz/R/ %{_mandir}/man3/gv.3r.* %endif %if %{RUBY} %files ruby %{_libdir}/graphviz/ruby/ %{_prefix}/lib/*ruby*/* %{_mandir}/man3/gv.3ruby* %endif %if %{SHARP} %files sharp %{_libdir}/graphviz/sharp/ %{_mandir}/man3/gv.3sharp* %endif %files tcl %{_libdir}/graphviz/tcl/ %dir %{_libdir}/tcl* %{_libdir}/tcl*/* # hack to include gv.3tcl only if available # always includes tcldot.3tcl, gdtclft.3tcl %{_mandir}/man3/*.3tcl* %if %{GOLANG} %files go %{_libdir}/graphviz/go/ %{_mandir}/man3/gv.3go.* %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor