File graphviz.spec of Package graphviz-plugins

# spec file for package graphviz (Version 2.20.2)
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

Name:           graphviz
BuildRequires:  fdupes libexpat-devel libjpeg-devel libpng-devel zlib-devel
BuildRequires:  freetype2-devel >= 2 gcc-c++ ksh libstdc++-devel
BuildRequires:  bison flex glib2-devel xorg-x11-devel
BuildRequires:  xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libXpm-devel
BuildRequires:  xorg-x11-libX11-devel xorg-x11-libXext-devel xorg-x11-libXmu-devel xorg-x11-libXt-devel
PreReq:         /bin/rm
Version:        2.20.2
Release:        43
AutoReqProv:    on
Summary:        Graph Visualization Tools
Group:          Productivity/Graphics/Visualization/Graph
Source2:        graphviz-rpmlintrc
Patch0:         graphviz-fix-pkgIndex.patch
Patch3:         graphviz-neato_splines.patch
Patch11:        graphviz-%{version}-interpreter_names.patch
Patch13:        graphviz-stddefs.patch
#Any version after 2.20.2 will contain the following patch
Patch14:        graphviz-fix_gstack_overflow.patch
License:        IBM Public License
Prefix:         /usr
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         /bin/cat
Recommends:     graphviz-gnome = %{version}
Recommends:     graphviz-gd = %{version}

A collection of tools and tcl packages for the manipulation and layout
of graphs (as in nodes and edges, not as in bar charts).

    David Dobkin <>
    John Ellson  <>
    Emden Gansner <>
    Eleftherios Koutsofios <>
    Stephen North <>
    Kiem-Phong Vo <>
    Gordon Woodhull <>

%package devel
License:        IBM Public License
Group:          Development/Libraries/C and C++
Summary:        Graphiviz development package
Requires:       %{name} = %{version}
Requires:       glibc-devel tcl-devel fontconfig-devel expat freetype2-devel 
Requires:       libjpeg-devel libpng-devel zlib-devel libtool perl 
Requires:       libstdc++-devel tk-devel

%description devel
The graphviz-devel package contains all that's necessary for developing
programs that use the graphviz libraries including man3 pages.

    David Dobkin <>
    John Ellson  <>
    Emden Gansner <>
    Eleftherios Koutsofios <>
    Stephen North <>
    Kiem-Phong Vo <>
    Gordon Woodhull <>

%setup -q
# Fix path in generated man pages
sed -e 's$@LIB_DIR@$%{_libdir}$g' tclpkg/gv/gv_doc_langs.tcl >tclpkg/gv/ && mv tclpkg/gv/ tclpkg/gv/gv_doc_langs.tcl
# remove broken macros
rm m4/iconv.m4 m4/lib-*.m4
cp /usr/share/gettext/config.rpath config

touch tclpkg/gv/gv.i
WARN_FLAGS="-W -Wall -Wno-unused-parameter -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith"
%ifarch %ix86 x86_64
CFLAGS="$CFLAGS -ffast-math"
export CC RANLIB
export CPPFLAGS="%optflags"
./configure \
      --prefix=%{_prefix} \
      --bindir=%{_bindir} \
      --libdir=%{_libdir} \
      --includedir=%{_includedir} \
      --datadir=%{_datadir} \
      --mandir=%{_mandir} \
      --with-x \
      --with-mylibgd \
      --disable-static \
      --disable-dependency-tracking \
      --enable-ltdl-install=no \
      --with-ipsepcola \
      --without-ming \
make DESTDIR=%buildroot

make install \
	DESTDIR=%{buildroot} \
	docdir=%{buildroot}%{_docdir}/%{name} \
find %{buildroot} -type f -name "*.la" -print0 | xargs -0 rm -f
mkdir -p %{buildroot}/%{_docdir}
mkdir -p %{buildroot}%{_datadir}/%{name}
rm -f %buildroot/%{_libdir}/%{name}/pkgIndex.tcl
chmod -x %{buildroot}%{_datadir}/%{name}/lefty/*
cp -a %{buildroot}%{_datadir}/%{name}/doc __doc
rm -rf %{buildroot}%{_datadir}/%{name}/doc
mkdir -p %{buildroot}%{_libdir}/graphviz
touch %{buildroot}%{_libdir}/graphviz/config
mkdir -p %{buildroot}/etc/
cat <<EOF >%{buildroot}/etc/{name}.conf
#Correct the path to the shared library
for manfile in $(find %{buildroot} -name \*.man); do
    sed -e 's$/usr/lib/graphviz$%{_libdir}/%{name}$g' $manfile > ${manfile}.new && mv ${manfile}.new ${manfile}
rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_gd.*
rm -f %{_libdir}/graphviz/libgvplugin_pango*
rm -f %{_libdir}/graphviz/libgvplugin_gdk_pixbuf*
rm -f %{_libdir}/graphviz/libgvplugin_gtk*
#rm -rf %buildroot

# run "dot -c" to generate plugin config %_libdir/graphviz/config
dot -c
test -s %{_libdir}/graphviz/config || echo "%{_libdir}/graphviz/config doesn't exist! Check installation."

if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/config; fi

%attr(755,root,root) %{_bindir}/*
%dir %{_datadir}/%{name}
%doc %{_mandir}/man1/*.1*
%doc %{_mandir}/man7/*.7*
%dir %{_libdir}/%{name}
%ghost %{_libdir}/graphviz/config
#%exclude %{_libdir}/graphviz/libgvplugin_pango*
#%exclude %{_libdir}/graphviz/libgvplugin_gdk_pixbuf*
#%exclude %{_libdir}/graphviz/libgvplugin_gtk*

%files devel

* Fri Oct 24 2008
- fix build with newer libtool
- fix requires of debug package
* Mon Oct 13 2008
- Fix vulnerability that allowed overflowing gstack (bnc#433747)
* Thu Jul 10 2008
- Update to 2.20.2. Changes since 2.18:
  - Fix bug in HTML-like labels
  - Fix bug in ccomps related to conversion to cgraph
  - Fixed bugs (see for
    - 1315: Different/error output for *.os and *.pdf
    - 1317: Graphviz fails to open more than 512 files.
    - 1324: Graphviz crashes in atexit().
    - 1336: Plain format label delimiters change randomly.
    - 1343: Layouts other than 'dot' seem broken in tcldot due to
  documentation error.
    - 1364: Dot fails with failed assertion.
  - Add new "folder" shape for nodes.
  - Migration of gvpr tools to libcgraph.
  - New output format -Teps  (encapsulated postscript)
  - Various NetBSD and SuSE fixes incorporated
  - ./configure now provides a summary
* Sun Apr 27 2008
- fix build
* Tue Apr 22 2008
- Move all GTK/GNOME related stuff to plugins package.
* Tue Apr 15 2008
- Readd plugins left out by accident.
- Add upstream patch that makes 'dot -c' completely verifiy all
  cross-plugin dependencies. In case of a failed dependency
  it comments out the failed plugin in the config that it writes.
* Mon Apr 07 2008
- Fix paths for lua and php in examples
* Fri Mar 28 2008
- Update to 2.18. Changes since 2.12:
  - Lots of bugs fixed, see ChangeLog for detailed list.
  - in -Tps use a new number formatter that suppresses trailing 0.
  - support tcl/tk-8.5
  - support gcc-4.3
  - support for node usershapes/images in svg format
  - install: perl, php, python, ruby, tcl, bindings in
  language-specified directories
  - add arrowhead scaling with edge penwidth
  - add "folder" node shape
  - add "smyna" large graph view (thanks Arif) (not yet included
  in binary distros)
  * 2.16.1
  - Improvements to PHP binding
  - Improvements to OCAML binding
  - Make regression tests run from the build tree, rather than require
  - Repair freetype detection on RedHat-7 (Yes, people still use it!!)
  - Fix zoom-at-mouse-location in -Txlib and -Tgtk
  - Fix some dotty regressions
  * 2.15
  - new regression test suite
  - new cgraph library (will eventually replace graph and agraph)
  - add "image" and "imagescale" for simpler support for images in nodes
  - add "tab" "box3d" and "component" shapes.  - Diomidis Spinellis
  - replace arith.h in distro
  - add functions to access version info to avoid need for gvcint.h
  - Fix problem with irregular character spacing at 96dpi in pango/cairo
  output formats.
  - Add gdk_pixbuf plugin providing: .bmp .ico .jpg .png .tif
  - Add DevIL plugin providing: .bmp .jpg .png .tif .tga
  - Extend GD plugin to provide a backend to cairo for: .gif .jpg .png .gd
  .gd2 .wbmp  <- gifs are now antialiased
  - Rework plugin framework to separate device from renderer, and to
  autoload load dependendent plugins
  - show defaults in output from: ./configure --help
  - add more info to dot -v  and dot -v2 debug outputs
  - various issues with CR/LF in windows, but not in binary outputs.
  * 2.14.1
  - Add xdot parsing library to source distros
  - graphviz.spec fixes for rpm distros from Gareth Armstrong
  - moved language binding man pages to mann
  (gv_php.n, gv_ocaml.n, etc.)
  - New access functions for version info in GVC_t - permits
  gvcint.h to be private.
  * 2.14:
  - Using system version of libgd if gd-2.0.34 or later.
  internal copy of gd updated to gd-2.0.35.
  - Updated GVGUI viewer for Windows
  - Added support for selection of edge routing types:
  line, polyline, orthogonal, spline
  - Added -Tvml support
- Adapt the patch to allow ^LT_(CURRENT|REVISION|AGE)$ in
  configure script and reenable the use of these variables.
* Thu Mar 13 2008
- Allow ^LT_(CURRENT|REVISION|AGE)$ in configure script.
- Remove broken autoconf macros.
* Fri Oct 26 2007
- Add missing includes.
* Mon Aug 13 2007
- lib/sfio/sfhdr.h(SFSETLOCALE): fix test for null pointer.
- use -fno-strict-aliasing for gv_php
* Fri May 11 2007
- added to sync rel-number between
  graphviz and graphviz-plugins
* Thu May 10 2007
- split off plugins to separate specfile to break build cycles
* Tue May 08 2007
- Update to 2.12
  - PostScript output had an extraneous '%%' character on the first line,
  which would cause printing to fail.
  - Text handling, during both sizing and layout, incorrectly handled
  empty lines such as label="\nabc".
  - HTML-like tables had been changed to use too much vertical space,
  to possibly use the wrong font in calculating the height of a line,
  and to use the wrong offset when moving the baseline from one line to
  the next.
  - dot - New pango+cairo renderer plugin (was in separate graphviz-cairo tree).
      -- -Tpng now uses cairo   (-Tpng:gd for old gd based renderer)
      -- -Tpdf now available
      -- -Tps:cairo now available (-Tps is a direct ps renderer not based on
      -- -Tsvg:cairo now available (-Tsvg is a direct svg renderer not based
  on cairo)
      -- -Txlib now available -- "dot -Tx11"  watches with
  inotify and updates
      -- -Tgtk now available -- eventually to provide a graph editing capability
          - not fully working
      -- -Tswf "Flash" now available using the ming library. Currently has
  incomplete font support and not yet in Fedora rpms because ming not
  yet available as rpm.
  - remove hard gd dependencies from dot.  gd renderers now provided
  as optional plugin.   Deprecated, but required for -Tjpg, -Tgif and -Tvrml.
  - gvpr - Add kindOf function, plus functions to set and get default values
  - dot - Implement esep attribute to allow graph to specify room
  around nodes for spline routing.
  - neato - add vpsc library and DIGCOLA
  - neato - add IPSEPCOLA additions from Tim Dwyer
  - move: -Tps, -Tfig, -Tsvg, -Timap/ismap/cmap/cmapx, -Tdot/xdot,
  from codegens to a "core" plugin.
  - dot - new usershape plugin mechanism potentially supporting
  a wider range of input shape format -> output format combinations.
  display on changes
  - dot - new -O switch to automatically generate output file
  names based on the input filename and the -T value.
  e.g.  "dot -Tpng -O *.dot"
  Also works for case of multiple graphs in a single input file.
  - add support for "Brewer" color nameset
  - move reusable .so libraries to $PREFIX/lib per frequent request
  from Debian community.   Plugin .so's remain in $PREFIX/lib/graphviz.
  - (POTENTIAL INCOMPATIBILITY) The default input scaling, in the
  absence of a "-s" switch, has been changed from inches to points.
  The new behavior of "neato" is equivalent to "neato -s72".
  The old behavior can be restored with "neato -s1".
  The purpose of this change is to avoid a Frequently-Made-Mistake
  when using "neato -n" to process a previously generated layout.
  Previously it was necessary to use "neato -n -s72", but with this
  change the default matches dot's output and the "-s72" is not required.
  - Added pseudo layout engines: "dot -Knop" and dot -Knop1" equivalent
  to "neato -n"
  - Added pseodo layout engine: "dot -Knop2" equivalent to "neato -n2"
  - Add support for color namespaces; add Brewer color data
  - Add support for simulated duplex edges using parallel edges:
  head arrow takes first color, tail arrow takes second color.
  - Add a small pad region around graph renderings to allow for finite
  penwidths at the drawing edges
  - Add protonode(g) and E=protoedge(g) functions to simplify language
  - Add special purpose code to deal with html labels from language
- Split off language support into subpackages.
- build php,ruby,C#,python,guile and java support in addition to tcl
- swig >= 1.3.21 differentiates between php4 and php5, so adapt
  configure test.
- Don't move tcl libraries to _libdir but instead add the graphviz
  sublibrary paths via /etc/
- Use SONAMEs to generate pkgIndex.tcl. That way tcl can actually
  load the libraries via 'package require'
- Don't compare pointer with string literal.
* Thu May 03 2007
- changed expat to libexpat-devel in [Build]Requires
* Thu Mar 29 2007
- Add bison to BuildRequires.
* Fri Aug 11 2006
- Adapt to new X11 paths.
* Mon Apr 03 2006
- add pkgconfig files to devel package
* Sun Feb 19 2006
- Reduce BuildRequires.
* Thu Feb 09 2006
- Fix segfault in neato when using splines (#144275)
* Fri Feb 03 2006
- Fix swig template to include declaration.
- Fix BuildRequires
- Fix dependencies for -devel package
* Thu Nov 24 2005
- Add missing plugin config file.
- Fix gcc aliasing bugs.
* Mon Aug 29 2005
- Update to version 2.6: numerous bugfixes.
* Tue Aug 09 2005
- fix-pkgIndex.diff: Fix tcl library search for "package require
  Tkspline" and similar statements by (a) moving the tcl/tk
  libraries from _libdir/graphviz/ to _libdir/, and removing
  path names from library names in pkgIndex.tcl so that 32bit
  and 64bit libraries are searched as appropriate.
* Tue Aug 02 2005
- move pkgIndex.tcl to /usr/share
* Thu Feb 10 2005
- Update to version 2.2.
- Drop graphviz-graphs subpackage.
* Sun Aug 29 2004
- Drop EULA notification message.
* Sat Mar 27 2004
- update to graphviz-1.12
  * general
    - rename bcc -> bcomps to avoid name conflict with
  "Bruce's C Compiler" on Redhat distributions.
    - all build without X11 (fix problem in lefty tree)
    - remove from distribution:
  dag, fdp, geo, grid, incr, shape, tcldgr, tcldgl
  * dotneato
    - fix "brown-bag" problem resulting in PNG and JPEG errors on
  RH8 and RH9.
- removed hunks for dag, fdp, grid, tcldgl from codecleanup patch;
  directories were dropped upstream (see 1.12 changelog above)
- no need to rename bcc any longer (see 1.12 changelog above)
- removed libtcldgl/libtcldgr (see 1.12 changelog above)
* Tue Mar 09 2004
- Rename bcc to bcc-graphviz due to conflict with bcc from dev86.
* Mon Mar 01 2004
- Update to graphviz-1.11:
  * Drop lots of patches (merged upstream) ;-)
  * dotneato: add -Gviewport, fix memleak in gdft, clean up calc
  of whitespace around labels
* Wed Feb 25 2004
- Update to graphviz-1.10:
  * enhanced gpr: string matching, lock primitive to save graphs
  * zoomable 2 1/2 D graph viewer (Java)
  * neato -gpack
* Fri Jan 16 2004
- Change freetype detection to new one, so the internal libGD is build
  against it again.
* Sat Jan 10 2004
- build as user
* Mon Oct 06 2003
- Remove curl (source code does not use it) and lynx from
* Mon Jul 28 2003
- updated neededforbuild
* Tue May 13 2003
- Add hacks to work around problems with libtool 1.5.
* Mon Apr 14 2003
- Get rid of nearly all compiler warnings.
* Mon Apr 07 2003
- Use posix-2001 conforming syntax for sort.
* Fri Feb 07 2003
- Update to 1.9
- Split off subpackages devel, graphs and tcl like
  it's done in the specfile included with graphviz.
- remove obsolete patches
* Wed Jan 29 2003
- fix png library detection in configure
- removed perl-GD and blt from neededforbuild
* Thu Jan 09 2003
- fixed
* Thu Nov 14 2002
- fixed for new bison: end rules with semicolons
* Tue Aug 20 2002
- Correct PreReq
* Sat Aug 10 2002
- Fix typo in license.
* Fri Jul 05 2002
- Use %%ix86 macro
* Tue Jul 02 2002
- Update to 1.8.6:
  * FPU handling fix got included
  * arch independent stuff in /usr/share/graphviz now
  * arrow fixes and improvements and more arrow types
  * new pack option to neato
  * bugfixes
- Change licensor from SuSE GmbH to SuSE Linux AG
* Wed May 22 2002
- Add prune binary and man page to file list.
* Fri May 10 2002
- Fix FPU excpetion handling. (Use feenableexcept() rather than
  _FPU_GETCW(), if available.)
* Wed May 08 2002
- Update to graphviz-1.8.5:
  * fixed various Win and MacOSX probs
  * minimal Type1 font support
  * webdot.cgi perl script accepts same args as webgot.tcl now
  * various SVG enhancements and fixes
  * various portability/64bit fixes
  * various bug fixes
* Fri May 03 2002
- %%_lib fixes (to find and
* Fri Feb 01 2002
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Mon Jan 28 2002
- Some more missing decls found and fixed.
* Mon Jan 28 2002
- Added patch to fix lots of warnings (and potential bugs on 64bit
* Mon Jan 28 2002
- Pass TK_DEFS to gcc for tkspline (which uses tkInt.h)
* Mon Jan 28 2002
- Update to 1.7.16:
  * Various bug fixes
  * Support for xfig, svgz,
  * Text output improvements
  * New twopi tool
- Drop patches that have been included in official source ball.
* Wed May 23 2001
- Fix cast warnings on 64bit archs and add missing includes
  where necessary.
* Wed May 09 2001
- Cleanup patches.
* Tue May 08 2001
- bzip2 sources
* Mon Apr 30 2001
- Update to release 1.7.6 with lots of bugfixes:
  * Lots of font related fixes
  * Fix various bugs WRT labels
  * UTF-8 fixes
  * cluster and neato layout fixes
  * -Timap (mouse sensitive graphs for web pages) fixes
  * PNG by default does white background now instead of transp.
- New features in 1.7.6:
  * New graph processing tools: acyclic, ccomps, colorize, gc,
  gpr, nop, sccmap, tred, unflatten (See ChangeLog for details)
- Spec file: Consistently use %%{prefix}
* Thu Mar 22 2001
- changed neededforbuild to freetype2
- updated to 1.7.5 for freetype2
* Mon Feb 26 2001
- fixed for new glibc
* Fri Jan 19 2001
- Assorted patches from Stephen C. North to
  * fix runtime error in graphs having multiple nodes in the min
  or max rank set
  * fix layout thinko (mincross)
* Sat Dec 16 2000
- Update to 1.7.4:
  * various fixes
  * support various linestyles
  * Remove Tcldot dependence on libgdtclft
  * support for long label strings (fixing a reported crash)
* Tue Dec 12 2000
- Specfile cleanups.
* Tue Dec 12 2000
- Update to 1.7.3:
  * Better font drawing support
  * Bugfixes
- Removed most explicit Requires: from spec, as AutoReqProv works
  just fine.
- Split off webdot.
* Wed Nov 29 2000
- changed neededforbuild <tcld> to <tcl-devel>
* Wed Nov 08 2000
- fixed neededforbuild gd -> perl-GD
* Wed Nov 01 2000
- Use %%{?suse_update_config} -> support for S/390 added
* Tue Oct 31 2000
- Update to 1.7: * dot/neato again separate binaries
  * 64 bit patches integrated
  * Some bugfixes and feature enhancements
* Wed Oct 18 2000
- Change the wording of the license notification to match the
  wording from the letter from AT&T.
* Tue Sep 19 2000
- Cleanups for 64 bit archs.
* Mon Sep 18 2000
- Add a notification for the sysadmin, that (s)he and the users
  need to agree with the license termn in MINTERMS.txt. According
  to "Stephen C. North" <>, this is all that
  needs to be done to fulfill the license requirements.
* Wed Sep 06 2000
- LICENSOR is SuSE: Filled in MINTERMS.txt
* Tue Sep 05 2000
- Creation of package graphviz-1.6
- Fix lneato Makefile to install into $DESTDIR