mirror of
https://abf.rosa.ru/djam/graphviz.git
synced 2025-02-22 15:22:59 +00:00
578 lines
14 KiB
RPMSpec
578 lines
14 KiB
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
|
|
# disable madness
|
|
%define _unpackaged_subdirs_terminate_build 0
|
|
|
|
%define _disable_ld_no_undefined 1
|
|
%bcond_without static
|
|
%bcond_with libr
|
|
%define make_build 1
|
|
%define cmake_build 0
|
|
|
|
# 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 gamut_major 1
|
|
%define gvc_major 6
|
|
%define gvpr_major 2
|
|
%define pathplan_major 4
|
|
%define xdot_major 4
|
|
|
|
%define lib_cdt %mklibname cdt %{cdt_major}
|
|
%define lib_cgraph %mklibname cgraph %{cgraph_major}
|
|
%define lib_gamut %mklibname lab_gamut %{gamut_major}
|
|
%define lib_gvc %mklibname gvc %{gvc_major}
|
|
%define lib_gvpr %mklibname gvpr %{gvpr_major}
|
|
%define lib_pathplan %mklibname pathplan %{pathplan_major}
|
|
%define lib_xdot %mklibname xdot %{xdot_major}
|
|
%define devname %mklibname graphviz -d
|
|
%define staticname %mklibname graphviz -d -s
|
|
|
|
%if %{_use_internal_dependency_generator}
|
|
%define __noautoreq '/usr/bin/lua'
|
|
%endif
|
|
|
|
%define with_php 0
|
|
%define with_py2 0
|
|
%define with_gamut 0
|
|
%define with_ocaml 0
|
|
|
|
Summary: Graph visualization tools
|
|
Name: graphviz
|
|
Version: 11.0.0
|
|
Release: 1
|
|
License: Common Public License
|
|
Group: Graphics
|
|
URL: https://graphviz.org
|
|
#Source0: http://www.graphviz.org/pub/graphviz/ARCHIVE/%{name}-%{version}.tar.gz
|
|
#Source0: https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/%{version}/%{name}-%{version}.tar.gz
|
|
Source0: https://gitlab.com/graphviz/graphviz/-/archive/%{version}/%{name}-%{version}.tar.gz
|
|
Source1000: %{name}.rpmlintrc
|
|
Patch0: graphviz-2.40.1-link.patch
|
|
Patch1: graphviz-2.40.1-CVE-2018-10196.patch
|
|
BuildRequires: cmake
|
|
BuildRequires: bison
|
|
BuildRequires: autoconf
|
|
BuildRequires: flex
|
|
BuildRequires: libtool
|
|
BuildRequires: swig
|
|
BuildRequires: go
|
|
BuildRequires: tar
|
|
BuildRequires: qmake5
|
|
BuildRequires: gd-devel
|
|
BuildRequires: %{_lib}gs-devel
|
|
BuildRequires: glade
|
|
BuildRequires: gettext-devel
|
|
# jpeg: No (only required by internal libgd)
|
|
#BuildRequires: jpeg-devel
|
|
BuildRequires: %{_lib}ltdl-devel
|
|
BuildRequires: pkgconfig(expat)
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
BuildRequires: pkgconfig(freetype2)
|
|
BuildRequires: pkgconfig(glut)
|
|
BuildRequires: pkgconfig(gtk+-2.0)
|
|
BuildRequires: pkgconfig(gtkglext-1.0)
|
|
BuildRequires: pkgconfig(gtkgl-2.0)
|
|
BuildRequires: pkgconfig(libcurl)
|
|
BuildRequires: pkgconfig(libpng)
|
|
BuildRequires: pkgconfig(librsvg-2.0)
|
|
BuildRequires: pkgconfig(pango)
|
|
BuildRequires: pkgconfig(pangocairo)
|
|
BuildRequires: pkgconfig(x11)
|
|
BuildRequires: pkgconfig(xaw7)
|
|
BuildRequires: pkgconfig(xmu)
|
|
BuildRequires: pkgconfig(xt)
|
|
BuildRequires: pkgconfig(zlib)
|
|
Buildrequires: pkgconfig(gts)
|
|
BuildRequires: pkgconfig(python-3.8)
|
|
BuildRequires: pkgconfig(libwebp)
|
|
BuildRequires: pkgconfig(poppler-glib)
|
|
#BuildRequires: pkgconfig(lasi)
|
|
BuildRequires: llvm17
|
|
#BuildRequires: qt515
|
|
BuildRequires: stdc++-gcc10-devel
|
|
|
|
|
|
Conflicts: %{mklibname graphviz 4} < 2.20.3-3
|
|
|
|
%description
|
|
A collection of tools for the manipulation and layout
|
|
of graphs (as in nodes and edges, not as in barcharts).
|
|
|
|
%files
|
|
%dir %{_libdir}/%{name}
|
|
%{_bindir}/*
|
|
%{_mandir}/man?/*
|
|
%{_datadir}/graphviz
|
|
%{_libdir}/graphviz/*.so.*
|
|
|
|
%post
|
|
%{_bindir}/dot -c
|
|
|
|
%postun
|
|
if ! test -x %{_bindir}/dot; then rm -f %{_libdir}/%{name}/config; fi
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package doc
|
|
Summary: %{name} documentation
|
|
Group: Books/Computer books
|
|
|
|
%description doc
|
|
The %{name} documentation.
|
|
|
|
%files doc
|
|
%{_datadir}/doc/%{name}
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{lib_cdt}
|
|
Summary: Shared library for %{name}
|
|
Group: System/Libraries
|
|
Conflicts: %{_lib}graphviz4 < 2.26
|
|
|
|
%description -n %{lib_cdt}
|
|
This package provides the cdt shared library for %{name}.
|
|
|
|
%files -n %{lib_cdt}
|
|
%{_libdir}/libcdt.so.%{cdt_major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{lib_cgraph}
|
|
Summary: Shared library for %{name}
|
|
Group: System/Libraries
|
|
Conflicts: %{_lib}graphviz4 < 2.26
|
|
|
|
%description -n %{lib_cgraph}
|
|
This package provides the cgraph shared library for %{name}.
|
|
|
|
%files -n %{lib_cgraph}
|
|
%{_libdir}/libcgraph.so.%{cgraph_major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%if %{with_gamut}
|
|
|
|
%package -n %{lib_gamut}
|
|
Group: System/Libraries
|
|
Summary: Shared library for %{name}
|
|
|
|
%description -n %{lib_gamut}
|
|
This package provides the lib_gamut shared library for %{name}.
|
|
|
|
%files -n %{lib_gamut}
|
|
%{_libdir}/liblab_gamut.so.%{gamut_major}*
|
|
|
|
%endif
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{lib_gvc}
|
|
Summary: Shared library for %{name}
|
|
Group: System/Libraries
|
|
Conflicts: %{_lib}graphviz4 < 2.26
|
|
|
|
%description -n %{lib_gvc}
|
|
This package provides the gvc shared library for %{name}.
|
|
|
|
%files -n %{lib_gvc}
|
|
%{_libdir}/libgvc.so.%{gvc_major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{lib_gvpr}
|
|
Summary: Shared library for %{name}
|
|
Group: System/Libraries
|
|
|
|
%description -n %{lib_gvpr}
|
|
This package provides the gvpr shared library for %{name}.
|
|
|
|
%files -n %{lib_gvpr}
|
|
%{_libdir}/libgvpr.so.%{gvpr_major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{lib_pathplan}
|
|
Summary: Shared library for %{name}
|
|
Group: System/Libraries
|
|
Conflicts: %{_lib}graphviz4 < 2.26
|
|
|
|
%description -n %{lib_pathplan}
|
|
This package provides the pathplan shared library for %{name}.
|
|
|
|
%files -n %{lib_pathplan}
|
|
%{_libdir}/libpathplan.so.%{pathplan_major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{lib_xdot}
|
|
Summary: Shared library for %{name}
|
|
Group: System/Libraries
|
|
|
|
%description -n %{lib_xdot}
|
|
This package provides the xdot shared library for %{name}.
|
|
|
|
%files -n %{lib_xdot}
|
|
%{_libdir}/libxdot.so.%{xdot_major}*
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%define lua_version %(if [ -x /usr/bin/lua ]; then lua -v 2>&1| awk '{print $2}' | awk -F. '{print $1 "." $2}'; fi)
|
|
|
|
%package -n lua-graphviz
|
|
Summary: Graphviz bindings for lua
|
|
Group: System/Libraries
|
|
BuildRequires: pkgconfig(lua)
|
|
|
|
%description -n lua-graphviz
|
|
This package provides the Lua extension for %{name}.
|
|
|
|
%files -n lua-graphviz
|
|
%{_libdir}/graphviz/lua
|
|
%{_libdir}/lua/%{lua_version}/gv.so
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%if %{with_php}
|
|
|
|
%package -n php-graphviz
|
|
Summary: Graphviz bindings for php
|
|
Group: System/Libraries
|
|
BuildRequires: php-devel
|
|
BuildRequires: php-cli
|
|
Obsoletes: %{mklibname graphvizphp 0} < 2.28.0-4
|
|
|
|
%description -n php-graphviz
|
|
This package provides the PHP extension for %{name}.
|
|
|
|
%files -n php-graphviz
|
|
%{_libdir}/graphviz/php
|
|
%{_libdir}/php/modules/gv.so
|
|
%{_datadir}/php/gv.php
|
|
|
|
%endif
|
|
#-------------------------------------------------------------------------
|
|
|
|
%if %{with_py2}
|
|
|
|
%package -n python-graphviz
|
|
Summary: Graphviz bindings for python
|
|
Group: System/Libraries
|
|
Obsoletes: %{mklibname graphvizpython 0} < 2.28.0-4
|
|
BuildRequires: pkgconfig(python)
|
|
|
|
%description -n python-graphviz
|
|
This package provides the Python extension for %{name}.
|
|
|
|
%files -n python-graphviz
|
|
%{_libdir}/graphviz/python
|
|
%{py_platsitedir}/*
|
|
|
|
%endif
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%if %{with ruby}
|
|
|
|
%package -n ruby-graphviz
|
|
Summary: Graphviz bindings for ruby
|
|
Group: System/Libraries
|
|
BuildRequires: ruby-devel
|
|
Obsoletes: %{mklibname graphvizruby 0} < 2.28.0-4
|
|
|
|
%description -n ruby-graphviz
|
|
This package provides the Ruby extension for %{name}.
|
|
|
|
%files -n ruby-graphviz
|
|
%{_libdir}/graphviz/ruby
|
|
%{_prefix}/lib/ruby
|
|
|
|
%endif
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n perl-graphviz
|
|
Summary: Graphviz bindings for perl
|
|
Group: System/Libraries
|
|
BuildRequires: perl-devel
|
|
Obsoletes: %{mklibname graphvizperl 0} < 2.28.0-4
|
|
|
|
%description -n perl-graphviz
|
|
This package provides the Perl extension for %{name}.
|
|
|
|
%files -n perl-graphviz
|
|
%{perl_vendorarch}/*
|
|
%{_libdir}/graphviz/perl
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n tcl-graphviz
|
|
Summary: Graphviz bindings for tcl
|
|
Group: System/Libraries
|
|
BuildRequires: tcl-devel >= 8.3.0
|
|
BuildRequires: tk-devel >= 8.3.0
|
|
BuildRequires: tk >= 8.3.0
|
|
Obsoletes: %{mklibname graphviztcl 7 -d} < 2.28.0-4
|
|
Obsoletes: %{mklibname graphviztcl 0} < 2.28.0-4
|
|
|
|
%description -n tcl-graphviz
|
|
This package provides the Tcl extension for %{name}.
|
|
|
|
%files -n tcl-graphviz
|
|
%{_libdir}/tcl*
|
|
%{_libdir}/graphviz/tcl
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%define jdk_path %{_prefix}/lib/jvm/java
|
|
|
|
%package -n java-graphviz
|
|
Summary: Graphviz bindings for java
|
|
Group: System/Libraries
|
|
BuildRequires: java-devel
|
|
Obsoletes: %{mklibname graphvizjava 0} < 2.28.0-4
|
|
|
|
%description -n java-graphviz
|
|
This package provides the Java extension for %{name}.
|
|
|
|
%files -n java-graphviz
|
|
%{_libdir}/graphviz/java
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%if %{with libr}
|
|
|
|
%package -n r-graphviz
|
|
Summary: Graphviz bindings for R
|
|
Group: System/Libraries
|
|
BuildRequires: pkgconfig(libRmath)
|
|
Obsoletes: %{mklibname graphvizr 0} < 2.28.0-4
|
|
|
|
%description -n r-graphviz
|
|
This package provides the R extension for %{name}.
|
|
|
|
%files -n r-graphviz
|
|
%{_libdir}/graphviz/R
|
|
|
|
%endif
|
|
|
|
#-------------------------------------------------------------------------
|
|
%if %{with_ocaml}
|
|
|
|
%package -n ocaml-graphviz
|
|
Summary: Graphviz bindings for OCaml
|
|
Group: Development/OCaml
|
|
BuildRequires: ocaml
|
|
Obsoletes: %{mklibname graphvizocaml 0} < 2.28.0-4
|
|
|
|
%description -n ocaml-graphviz
|
|
This package provides the OCaml extension for %{name}.
|
|
|
|
%files -n ocaml-graphviz
|
|
%{_libdir}/graphviz/ocaml
|
|
|
|
%endif
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n go-graphviz
|
|
Summary: Graphviz bindings for Go
|
|
Group: Development/Other
|
|
BuildRequires: ocaml
|
|
Obsoletes: %{mklibname graphvizgo 0} < 2.28.0-4
|
|
|
|
%description -n go-graphviz
|
|
This package provides the Go extension for %{name}.
|
|
|
|
%files -n go-graphviz
|
|
%{_libdir}/graphviz/go
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n python3-graphviz
|
|
Summary: Graphviz bindings for Python3
|
|
Group: Development/Python
|
|
BuildRequires: ocaml
|
|
Obsoletes: %{mklibname graphvizpython 0} < 2.28.0-4
|
|
|
|
%description -n python3-graphviz
|
|
This package provides the Python3 extension for %{name}.
|
|
|
|
%files -n python3-graphviz
|
|
%{_libdir}/graphviz/python3
|
|
%{python38_sitearch}
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Group: Development/Other
|
|
Summary: Development package for %{name}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
Obsoletes: %{mklibname graphviz -d 7} < 2.28.0-4
|
|
Obsoletes: %{mklibname tcl -d 7} < 2.28.0-4
|
|
Obsoletes: %{mklibname -d graphviz 3} < 2.28.0-4
|
|
Requires: %{lib_cdt} = %{EVRD}
|
|
Requires: %{lib_cgraph} = %{EVRD}
|
|
Requires: %{lib_gvc} = %{EVRD}
|
|
Requires: %{lib_gvpr} = %{EVRD}
|
|
Requires: %{lib_pathplan} = %{EVRD}
|
|
Requires: %{lib_xdot} = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
Development package for %{name}.
|
|
|
|
%files -n %{devname}
|
|
%{_libdir}/pkgconfig/*
|
|
%{_libdir}/graphviz/*.so
|
|
%{_libdir}/*.so
|
|
%{_includedir}/graphviz
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%if ! %{without static}
|
|
%package -n %{staticname}
|
|
Group: Development/Other
|
|
Summary: Static development package for %{name}
|
|
Requires: %{devname} = %{EVRD}
|
|
Provides: %{name}-static-devel = %{EVRD}
|
|
Obsoletes: %{mklibname -d -s graphviz 3} < 2.28.0-4
|
|
|
|
%description -n %{staticname}
|
|
Static development package for %{name}.
|
|
|
|
%files -n %{staticname}
|
|
%{_libdir}/graphviz/*.a
|
|
%{_libdir}/*.a
|
|
%endif
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
#patch0 -p1 -b .link~
|
|
#patch1 -p1 -b .cve~
|
|
|
|
%build
|
|
/usr/libexec/python3.8 -m venv .
|
|
. ./bin/activate
|
|
|
|
export CC=/opt/llvm17/bin/clang
|
|
export CXX=/opt/llvm17/bin/clang++
|
|
|
|
export LDFLAGS="-lstdc++-gcc10"
|
|
export CFLAGS="-I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host}"
|
|
export CXXFLAGS="-I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host}"
|
|
|
|
%if %{cmake_build}
|
|
%cmake \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DGTK2_GLADE_LIBRARY=%{_libdir} \
|
|
-DGTK2_GLADE_INCLUDE_DIR=%{_includedir}
|
|
-Dwith_gvedit=OFF \
|
|
-Dwith-x=ON \
|
|
%if %{with static}
|
|
-Denable-static=ON \
|
|
%else
|
|
-Denable-static=OFF \
|
|
%endif
|
|
%if %{with libr}
|
|
-Denable-r=ON \
|
|
%else
|
|
-Denable-r=OFF \
|
|
%endif
|
|
-Denable-ocaml=ON \
|
|
-Denable-perl=ON \
|
|
%if %{with_php}
|
|
-Denable-php=ON \
|
|
%else
|
|
-Denable-php=OFF \
|
|
%endif
|
|
-Denable-python=yes \
|
|
-Ddisable-guile=yes \
|
|
-Ddisable-sharp=yes \
|
|
-Dwith-pangocairo=yes \
|
|
-Dwith-gtk=yes \
|
|
-Dwith-libgd=yes \
|
|
-Ddisable-io=yes \
|
|
%if %{with ruby}
|
|
-Denable-ruby=yes \
|
|
%else
|
|
-Denable-ruby=no \
|
|
%endif
|
|
-Ddisable-dependency-tracking=ON
|
|
%make
|
|
%endif
|
|
|
|
%if %{make_build}
|
|
#autoreconf -fi
|
|
export PYTHONPATH=%{python38_sitelib}
|
|
export PYTHON3=/usr/libexec/python3.8
|
|
|
|
./autogen.sh
|
|
|
|
#configure2_5x --help
|
|
#exit 1
|
|
|
|
%configure2_5x \
|
|
--prefix=%{_prefix} \
|
|
--bindir=%{_bindir} \
|
|
--libdir=%{_libdir} \
|
|
--includedir=%{_includedir} \
|
|
--datadir=%{_datadir} \
|
|
--mandir=%{_mandir} \
|
|
--pdfdir='$(docdir)/pdf' \
|
|
--htmldir='$(docdir)/html' \
|
|
--disable-static \
|
|
--disable-dependency-tracking \
|
|
--with-x \
|
|
%if %{without static}
|
|
--disable-static \
|
|
%else
|
|
--enable-static \
|
|
%endif
|
|
%if %{with libr}
|
|
--enable-r \
|
|
%else
|
|
--disable-r \
|
|
%endif
|
|
--enable-ocaml \
|
|
--enable-perl \
|
|
%if %{with_php}
|
|
--enable-php=yes \
|
|
%else
|
|
--enable-php=no \
|
|
%endif
|
|
%if ! %{with_py2}
|
|
--enable-python=no \
|
|
%endif
|
|
--enable-python3=yes \
|
|
--disable-guile \
|
|
--disable-sharp \
|
|
--with-pangocairo \
|
|
--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"
|
|
%endif
|
|
|
|
%install
|
|
%makeinstall_std
|
|
|
|
# fix documentation
|
|
#install -d -m 755 %{buildroot}%{_docdir}
|
|
#mv %{buildroot}%{_datadir}/%{name}/doc %{buildroot}%{_docdir}/%{name}
|
|
#mv %{buildroot}%{_datadir}/%{name}/demo %{buildroot}%{_docdir}/%{name}
|
|
|
|
# fix
|
|
mkdir -p %{buildroot}%{_libdir}/lua/%{lua_version}
|
|
mv %{buildroot}/lua/gv.so %{buildroot}%{_libdir}/lua/%{lua_version}/gv.so
|