From dbdb3a4e0ef6b90ebc2740804ebab34977fcbe0c Mon Sep 17 00:00:00 2001 From: John Ellson Date: Mon, 2 Jul 2012 12:19:55 -0400 Subject: [PATCH] drop unused libgraph from binary distro --- configure.ac | 5 ++++- graphviz.spec.in | 9 ++++++++- lib/cgraph/Makefile.am | 2 ++ lib/graph/Makefile.am | 3 +++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 115dcf2bc..c8cc406ff 100644 --- a/configure.ac +++ b/configure.ac @@ -2865,9 +2865,11 @@ AC_ARG_WITH(cgraph, [], [with_cgraph=yes]) if test "x$with_cgraph" != "xyes"; then - use_cgraph="No (disabled by)" + use_cgraph="No (disabled)" + use_graph="Yes" else use_cgraph="Yes" + use_graph="No (disabled deprecated)" AC_DEFINE_UNQUOTED(WITH_CGRAPH,1,[Define if you want CGRAPH]) fi AM_CONDITIONAL(WITH_CGRAPH, [test "x$use_cgraph" = "xYes"]) @@ -3230,6 +3232,7 @@ echo "" echo "graphviz-$VERSION will be compiled with the following:" echo "" echo "options:" +echo " graph: $use_graph" echo " cgraph: $use_cgraph" echo " digcola: $use_digcola" echo " expat: $use_expat" diff --git a/graphviz.spec.in b/graphviz.spec.in index ba30a531b..4178f3e47 100644 --- a/graphviz.spec.in +++ b/graphviz.spec.in @@ -35,7 +35,7 @@ Prefix: /usr # Available features are: # SHARP GHOSTSCRIPT GUILE _IO JAVA LUA OCAML ORTHO PERL PHP # PYTHON RUBY R_LANG TCL IPSEPCOLA MYLIBGD PANGOCAIRO RSVG -# GTK GLITZ SMYRNA DEVIL MING GDK_PIXBUF _QT WEBP +# GTK GLITZ SMYRNA DEVIL MING GDK_PIXBUF _QT WEBP CGRAPH # SuSE uses a different mechanism to generate BuildRequires # norootforbuild @@ -49,6 +49,7 @@ BuildRequires: /bin/ksh bison m4 flex swig tk tcl >= 8.3 freetype-devel >= 2 #-- Red Hat Enterprise Linux (also Centos) specific Build Requirements -------------------- %if 0%{?rhel} %if %rhel == 4 +%define CGRAPH 1 %define __X 1 BuildRequires: xorg-x11-devel %endif @@ -103,6 +104,7 @@ BuildRequires: ghostscript-devel #-- Fedora specific Build Requirements -------------------------------------- %if 0%{?fedora} %if %fedora >= 9 +%define CGRAPH 1 %define __X 1 BuildRequires: libXaw-devel libSM-devel libICE-devel libXpm-devel libXt-devel libXmu-devel libXext-devel libX11-devel BuildRequires: fontconfig-devel @@ -269,8 +271,12 @@ fi %{_mandir}/man1/unflatten.1* %{_mandir}/man7/graphviz.7* %{_libdir}/libcdt.so.* +%if 0%{?CGRAPH} %{_libdir}/libcgraph.so.* +%endif +%if ! 0%{?CGRAPH} %{_libdir}/libgraph.so.* +%endif %{_libdir}/libgvc.so.* %{_libdir}/libgvpr.so.* %{_libdir}/libpathplan.so.* @@ -753,6 +759,7 @@ CFLAGS="$RPM_OPT_FLAGS" \ --enable-r%{!?R_LANG:=no} \ --enable-ruby%{!?RUBY:=no} \ --enable-tcl%{!?TCL:=no} \ + --with%{!?CGRAPH:out}-cgraph \ --with%{!?DEVIL:out}-devil \ --with%{!?WEBP:out}-webp \ --with%{!?GDK_PIXBUF:out}-gdk-pixbuf \ diff --git a/lib/cgraph/Makefile.am b/lib/cgraph/Makefile.am index 542330a86..544bc1829 100644 --- a/lib/cgraph/Makefile.am +++ b/lib/cgraph/Makefile.am @@ -10,6 +10,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/cdt +if WITH_CGRAPH pkginclude_HEADERS = cgraph.h noinst_HEADERS = agxbuf.h cghdr.h malloc.h vmstub.h noinst_LTLIBRARIES = libcgraph_C.la @@ -17,6 +18,7 @@ lib_LTLIBRARIES = libcgraph.la pkgconfig_DATA = libcgraph.pc man_MANS = cgraph.3 pdf_DATA = cgraph.3.pdf +endif libcgraph_C_la_SOURCES = agerror.c agxbuf.c apply.c attr.c edge.c \ flatten.c graph.c grammar.y id.c imap.c io.c mem.c node.c \ diff --git a/lib/graph/Makefile.am b/lib/graph/Makefile.am index 707deb240..4e9779ee3 100644 --- a/lib/graph/Makefile.am +++ b/lib/graph/Makefile.am @@ -10,6 +10,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/cdt +if WITH_CGRAPH +else pkginclude_HEADERS = graph.h noinst_HEADERS = libgraph.h triefa.h parser.h agxbuf.h noinst_LTLIBRARIES = libgraph_C.la @@ -17,6 +19,7 @@ lib_LTLIBRARIES = libgraph.la pkgconfig_DATA = libgraph.pc man_MANS = graph.3 pdf_DATA = graph.3.pdf +endif libgraph_C_la_SOURCES = \ attribs.c agxbuf.c edge.c graph.c graphio.c lexer.c \ -- 2.50.1