diff --git a/graphviz-dot_verify_plugins.patch b/graphviz-dot_verify_plugins.patch new file mode 100644 index 0000000..44b11ba --- /dev/null +++ b/graphviz-dot_verify_plugins.patch @@ -0,0 +1,111 @@ +--- lib/gvc/gvconfig.c 14 Apr 2008 16:35:16 -0000 1.83 ++++ lib/gvc/gvconfig.c 16 Apr 2008 17:35:52 -0000 1.84 +@@ -248,14 +248,9 @@ + for (apis = library->apis; (types = apis->types); apis++) { + fprintf(f, "\t%s {\n", gvplugin_api_name(apis->api)); + for (i = 0; types[i].type; i++) { +-#if 0 +-/* this was a good idea, but fails because we need a config to load +- * by plugin name, and were still generating the config. +- */ + /* verify that dependencies are available */ + if (! (gvplugin_load(gvc, apis->api, types[i].type))) + fprintf(f, "#FAILS"); +-#endif + fprintf(f, "\t\t%s %d\n", types[i].type, types[i].quality); + } + fputs ("\t}\n", f); +@@ -408,6 +403,15 @@ + library = gvplugin_library_load(gvc, globbuf.gl_pathv[i]); + if (library) { + gvconfig_plugin_install_from_library(gvc, globbuf.gl_pathv[i], library); ++ } ++ } ++ } ++ /* rescan with all libs loaded to check cross dependencies */ ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ re_status = regexec(&re, globbuf.gl_pathv[i], (size_t) 0, NULL, 0); ++ if (re_status == 0) { ++ library = gvplugin_library_load(gvc, globbuf.gl_pathv[i]); ++ if (library) { + path = strrchr(globbuf.gl_pathv[i],DIRSEP[0]); + if (path) + path++; +@@ -492,8 +496,8 @@ + libdir = gvconfig_libdir(); + rc = stat(libdir, &libdir_st); + if (rc == -1) { +- /* if we fail to stat it then it probably doesn't exist so just fail silently */ +- return; ++ /* if we fail to stat it then it probably doesn't exist so just fail silently */ ++ return; + } + + if (! gvc->config_path) { +@@ -504,42 +508,43 @@ + } + + if (rescan) { +- config_rescan(gvc, gvc->config_path); +- gvc->config_found = TRUE; +- return; ++ config_rescan(gvc, gvc->config_path); ++ gvc->config_found = TRUE; ++ return; + } + + /* load in the cached plugin library data */ + + rc = stat(gvc->config_path, &config_st); + if (rc == -1) { +- /* silently return without setting gvc->config_found = TRUE */ +- return; ++ /* silently return without setting gvc->config_found = TRUE */ ++ return; + } + else if (config_st.st_size > MAX_SZ_CONFIG) { +- agerr(AGERR,"%s is bigger than I can handle.\n", gvc->config_path); ++ agerr(AGERR,"%s is bigger than I can handle.\n", gvc->config_path); + } + else { +- f = fopen(gvc->config_path,"r"); +- if (!f) { +- agerr (AGERR,"failed to open %s for read.\n", gvc->config_path); +- } +- else { +- config_text = gmalloc(config_st.st_size + 1); +- sz = fread(config_text, 1, config_st.st_size, f); +- if (sz == 0) { +- agerr(AGERR,"%s is zero sized, or other read error.\n", gvc->config_path); +- free(config_text); ++ f = fopen(gvc->config_path,"r"); ++ if (!f) { ++ agerr (AGERR,"failed to open %s for read.\n", gvc->config_path); + } + else { +- gvc->config_found = TRUE; +- config_text[sz] = '\0'; /* make input into a null terminated string */ +- rc = gvconfig_plugin_install_from_config(gvc, config_text); +- /* NB. config_text not freed because we retain char* into it */ ++ config_text = gmalloc(config_st.st_size + 1); ++ sz = fread(config_text, 1, config_st.st_size, f); ++ if (sz == 0) { ++ agerr(AGERR,"%s is zero sized, or other read error.\n", gvc->config_path); ++ free(config_text); ++ } ++ else { ++ gvc->config_found = TRUE; ++ config_text[sz] = '\0'; /* make input into a null terminated string */ ++ rc = gvconfig_plugin_install_from_config(gvc, config_text); ++ /* NB. config_text not freed because we retain char* into it */ ++ } + } +- } +- if (f) +- fclose(f); ++ if (f) { ++ fclose(f); ++ } + } + } + #endif diff --git a/graphviz-no_strict_aliasing.patch b/graphviz-no_strict_aliasing.patch new file mode 100644 index 0000000..f861f5b --- /dev/null +++ b/graphviz-no_strict_aliasing.patch @@ -0,0 +1,38 @@ +Switch off strict-aliasing until swig is fixed to produce code that doesn't +break the rules. + +================================================================================ +--- tclpkg/gv/Makefile.am ++++ tclpkg/gv/Makefile.am +@@ -66,6 +66,7 @@ + libgv_lua_la_SOURCES = $(BASESOURCES) gv_dummy_init.cpp + libgv_lua_la_LIBADD = $(BASELIBS) @LUA_LIBS@ + libgv_lua_la_LDFLAGS = -module -avoid-version ++libgv_lua_la_CXXFLAGS = -fno-strict-aliasing + $(LUA_data): gv_lua.cpp + gv_lua.cpp: gv.i + $(SWIG) -c++ -lua -o gv_lua.cpp $(srcdir)/gv.i +@@ -78,6 +79,7 @@ + nodist_libgv_ocaml_la_SOURCES = gv_ocaml.cpp $(OCAML_data) + libgv_ocaml_la_SOURCES = $(BASESOURCES) gv_dummy_init.cpp + libgv_ocaml_la_LIBADD = $(BASELIBS) @OCAML_LIBS@ ++libgv_ocaml_la_CXXFLAGS = -fno-strict-aliasing + libgv_ocaml_la_LDFLAGS = -module -avoid-version + gv.ml gv.mli: gv_ocaml.cpp + gv_ocaml.cpp: gv.i +@@ -106,6 +108,7 @@ + PERL_data = gv.pm + nodist_libgv_perl_la_SOURCES = gv_perl.cpp $(PERL_data) + libgv_perl_la_SOURCES = $(BASESOURCES) gv_dummy_init.cpp ++libgv_perl_la_CXXFLAGS = -fno-strict-aliasing + libgv_perl_la_LIBADD = $(BASELIBS) @PERL_LIBS@ + libgv_perl_la_LDFLAGS = -module -avoid-version + $(PERL_data): gv_perl.cpp +@@ -117,6 +120,7 @@ + nodist_libgv_php_la_SOURCES = gv_php.cpp php_gv.h + libgv_php_la_SOURCES = $(BASESOURCES) gv_php_init.cpp + libgv_php_la_LIBADD = $(BASELIBS) @PHP_LIBS@ ++libgv_php_la_CXXFLAGS = -fno-strict-aliasing + libgv_php_la_LDFLAGS = -module -avoid-version + gv.php: gv_php.cpp + php_gv.h: gv_php.cpp diff --git a/graphviz-plugins.changes b/graphviz-plugins.changes index cb9a2f7..3a8ac80 100644 --- a/graphviz-plugins.changes +++ b/graphviz-plugins.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 17 13:08:40 CEST 2008 - pth@suse.de + +- Switch off strict aliasing until swig produces code that plays + by the rules. + ------------------------------------------------------------------- Mon Apr 7 13:32:38 CEST 2008 - pth@suse.de diff --git a/graphviz-plugins.spec b/graphviz-plugins.spec index 1f710e6..212350b 100644 --- a/graphviz-plugins.spec +++ b/graphviz-plugins.spec @@ -13,7 +13,7 @@ %define mname graphviz Name: graphviz-plugins -BuildRequires: libexpat-devel libjpeg-devel libpng-devel zlib-devel +BuildRequires: libexpat-devel libjpeg-devel libpng-devel swig zlib-devel BuildRequires: freetype2-devel >= 2 gcc-c++ ksh libstdc++-devel BuildRequires: bison flex glib2-devel m4 perl python-devel swig tk-devel >= 8.3 xorg-x11-devel BuildRequires: php5-devel ruby-devel xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libXpm-devel @@ -24,7 +24,7 @@ BuildRequires: graphviz libgnomeui-devel BuildRequires: fdupes %endif Version: 2.18 -Release: 4 +Release: 5 AutoReqProv: on Summary: Graph Visualization Tools Group: Productivity/Graphics/Visualization/Graph @@ -41,9 +41,12 @@ Patch8: graphviz-missing_includes.patch Patch9: graphviz-configure_grok_vars.patch Patch10: graphviz-2.18-duplicate_decls.patch Patch11: graphviz-%{version}-interpreter_names.patch +#Patch from CVS, will be obsolete with next release after 2.18 +Patch12: graphviz-dot_verify_plugins.patch #Patches above 100 are graphviz-plugins specific. Patch100: graphviz-plugins-fix_install_dirs.patch Patch101: graphviz-plugins-tcl_install_dir.patch +Patch102: graphviz-no_strict_aliasing.patch Url: http://www.graphviz.org/ License: IBM Public License Prefix: /usr @@ -345,8 +348,10 @@ Authors: %patch9 %patch10 %patch11 +%patch12 %patch100 %patch101 +%patch102 # Fix path in generated man pages sed -e 's$@LIB_DIR@$%{_libdir}$g' tclpkg/gv/gv_doc_langs.tcl >tclpkg/gv/gv_doc_langs.tcl.new && mv tclpkg/gv/gv_doc_langs.tcl.new tclpkg/gv/gv_doc_langs.tcl # remove broken macros @@ -394,18 +399,17 @@ mkdir -p %{buildroot}%{_datadir}/tcl/%{mname} chmod -x %{buildroot}%{_datadir}/%{mname}/lefty/* cp -a %{buildroot}%{_datadir}/%{mname}/doc __doc rm -rf %{buildroot}%{_datadir}/%{mname}/doc -mkdir -p %{buildroot}/usr/lib/graphviz -touch %{buildroot}/usr/lib/graphviz/config +mkdir -p %{buildroot}%{_libdir}/graphviz +touch %{buildroot}%{_libdir}/graphviz/config #Correct the path to the shared library for manfile in $(find %{buildroot} -name \*.man); do sed -e 's$/usr/lib/graphviz$%{_libdir}/%{mname}$g' $manfile > ${manfile}.new && mv ${manfile}.new ${manfile} done rm -f %{buildroot}/usr/bin/* rm -rf %{buildroot}/usr/include/graphviz -rm -f %{buildroot}/usr/lib/graphviz/config +rm -f %{buildroot}%{_libdir}/graphviz/config rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_core* rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_dot_layout* -rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_gd.so rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_gtk* rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_neato_layout* rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_pango* @@ -413,8 +417,8 @@ rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_xlib* rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_gdk_pixbuf* rm -f %{buildroot}%{_libdir}/lib* rm -rf %{buildroot}%{_libdir}/pkgconfig -rm -rf %{buildroot}/usr/share/graphviz/graphs -rm -rf %{buildroot}/usr/share/graphviz/lefty +rm -rf %{buildroot}%{_datadir}/graphviz/graphs +rm -rf %{buildroot}%{_datadir}/graphviz/lefty rm -rf %{buildroot}%{_mandir}/man1 rm -f %{buildroot}%{_mandir}/man3/*.3.gz rm -f %{buildroot}%{_mandir}/man3/*.3 @@ -426,19 +430,17 @@ done %if 0%{?suse_version} > 1020 %fdupes -s %{buildroot}%{_docdir} %endif - -%clean -rm -rf %{buildroot} +#%clean +#rm -rf %{buildroot} %files -n graphviz-gd %defattr(-,root,root) -%{_libdir}/graphviz/libgvplugin_gd.so.* +%{_libdir}/graphviz/libgvplugin_gd.so* -%post -n graphviz-gd -%{_bindir}/dot -c +%post -n graphviz-gd -p "%{_bindir}/dot -c" %postun -n graphviz-gd -if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/config; fi +%{_bindir}/dot -c %post -n graphviz-tcl -p /sbin/ldconfig @@ -535,6 +537,9 @@ if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_li %doc __doc/* %changelog +* Thu Apr 17 2008 pth@suse.de +- Switch off strict aliasing until swig produces code that plays + by the rules. * Mon Apr 07 2008 pth@suse.de - Fix paths for lua and php interpreter in examples. * Thu Apr 03 2008 pth@suse.de diff --git a/graphviz.changes b/graphviz.changes index a191d5d..221fbd6 100644 --- a/graphviz.changes +++ b/graphviz.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 15 16:02:22 CEST 2008 - pth@suse.de + +- 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 7 13:32:38 CEST 2008 - pth@suse.de diff --git a/graphviz.spec b/graphviz.spec index 3dc8e3f..e1e22ec 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -16,9 +16,10 @@ 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 +BuildRequires: cairo-devel libgnomeui-devel pango-devel PreReq: /bin/rm Version: 2.18 -Release: 8 +Release: 10 AutoReqProv: on Summary: Graph Visualization Tools Group: Productivity/Graphics/Visualization/Graph @@ -35,6 +36,8 @@ Patch8: graphviz-missing_includes.patch Patch9: graphviz-configure_grok_vars.patch Patch10: graphviz-2.18-duplicate_decls.patch Patch11: graphviz-%{version}-interpreter_names.patch +#Patch obsolete with the next release after 2.18 +Patch12: graphviz-dot_verify_plugins.patch Url: http://www.graphviz.org/ License: IBM Public License Prefix: /usr @@ -91,12 +94,12 @@ Authors: %patch3 %patch4 %patch5 -#%patch6 %patch7 %patch8 %patch9 %patch10 %patch11 +%patch12 # Fix path in generated man pages sed -e 's$@LIB_DIR@$%{_libdir}$g' tclpkg/gv/gv_doc_langs.tcl >tclpkg/gv/gv_doc_langs.tcl.new && mv tclpkg/gv/gv_doc_langs.tcl.new tclpkg/gv/gv_doc_langs.tcl # remove broken macros @@ -144,8 +147,8 @@ 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}/usr/lib/graphviz -touch %{buildroot}/usr/lib/graphviz/config +mkdir -p %{buildroot}%{_libdir}/graphviz +touch %{buildroot}%{_libdir}/graphviz/config mkdir -p %{buildroot}/etc/ld.so.conf.d/ cat <%{buildroot}/etc/ld.so.conf.d/%{name}.conf %{_libdir}/%{name} @@ -164,14 +167,13 @@ EOF for manfile in $(find %{buildroot} -name \*.man); do sed -e 's$/usr/lib/graphviz$%{_libdir}/%{name}$g' $manfile > ${manfile}.new && mv ${manfile}.new ${manfile} done -#find %{buildroot}%{_libdir}/graphviz -type d | xargs rm -rf - -%clean -rm -rf %buildroot +rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_gd.* +#%clean +#rm -rf %buildroot %post /sbin/ldconfig -# run "dot -c" to generate plugin config in %{_libdir}/graphviz/config +# 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." @@ -181,7 +183,6 @@ if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_li %files %defattr(-,root,root) -#%doc %{_docdir}/graphviz/ %doc doc/FAQ.html AUTHORS COPYING README NEWS ChangeLog %attr(755,root,root) %{_bindir}/* %dir %{_datadir}/%{name} @@ -190,15 +191,17 @@ if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_li %doc %{_mandir}/man1/*.1* %doc %{_mandir}/man7/*.7* %dir %{_libdir}/%{name} -%dir %{_prefix}/lib/%{name} %{_libdir}/*.so.* %{_libdir}/graphviz/*.so.* -%{_libdir}/graphviz/libgvplugin_core.so -%{_libdir}/graphviz/libgvplugin_*_layout.so +%{_libdir}/graphviz/libgvplugin_core* +%{_libdir}/graphviz/libgvplugin_dot_layout* +%{_libdir}/graphviz/libgvplugin_gtk* +%{_libdir}/graphviz/libgvplugin_neato_layout* +%{_libdir}/graphviz/libgvplugin_pango* +%{_libdir}/graphviz/libgvplugin_xlib* +%{_libdir}/graphviz/libgvplugin_gdk_pixbuf* /etc/ld.so.conf.d/graphviz.conf -%ghost /usr/lib/graphviz/config -#%exclude %{_libdir}/graphviz/*/* -%exclude %{_libdir}/graphviz/libgvplugin_gd.* +%ghost %{_libdir}/graphviz/config %files devel %defattr(-,root,root) @@ -206,11 +209,13 @@ if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_li %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %{_mandir}/man3/*.3.gz -#%exclude %{_libdir}/graphviz/*/* -#%exclude %{_libdir}/graphviz/libgvplugin* -#%exclude %{_libdir}/graphviz/*.so %changelog +* Tue Apr 15 2008 pth@suse.de +- 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 pth@suse.de - Fix paths for lua and php in examples * Fri Mar 28 2008 pth@suse.de