From 116d6557cde502ab7efe97f4cd542ca96ccf2aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 12 Jul 2013 15:48:21 +0200 Subject: [PATCH] Various man and built-in help fixes --- graphviz-2.30.1-gv2gml-options-fix.patch | 12 ++ graphviz-2.30.1-lefty-help.patch | 82 +++++++++++ graphviz-2.30.1-man-fix.patch | 172 +++++++++++++++++++++++ graphviz-2.30.1-prune-help.patch | 45 ++++++ graphviz-2.30.1-smyrna-doc-opt.patch | 17 +++ graphviz.spec | 20 ++- 6 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 graphviz-2.30.1-gv2gml-options-fix.patch create mode 100644 graphviz-2.30.1-lefty-help.patch create mode 100644 graphviz-2.30.1-man-fix.patch create mode 100644 graphviz-2.30.1-prune-help.patch create mode 100644 graphviz-2.30.1-smyrna-doc-opt.patch diff --git a/graphviz-2.30.1-gv2gml-options-fix.patch b/graphviz-2.30.1-gv2gml-options-fix.patch new file mode 100644 index 0000000..37c3f1a --- /dev/null +++ b/graphviz-2.30.1-gv2gml-options-fix.patch @@ -0,0 +1,12 @@ +diff -up graphviz-2.30.1/cmd/tools/gv2gml.c.orig5 graphviz-2.30.1/cmd/tools/gv2gml.c +--- graphviz-2.30.1/cmd/tools/gv2gml.c.orig5 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/tools/gv2gml.c 2013-07-11 13:54:56.661096922 +0200 +@@ -712,7 +712,7 @@ static void initargs(int argc, char **ar + + CmdName = cmdName(argv[0]); + opterr = 0; +- while ((c = getopt(argc, argv, ":io:")) != -1) { ++ while ((c = getopt(argc, argv, "o:")) != -1) { + switch (c) { + case 'o': + outFile = openFile(optarg, "w"); diff --git a/graphviz-2.30.1-lefty-help.patch b/graphviz-2.30.1-lefty-help.patch new file mode 100644 index 0000000..94426fe --- /dev/null +++ b/graphviz-2.30.1-lefty-help.patch @@ -0,0 +1,82 @@ +diff -up graphviz-2.30.1/cmd/lefty/lefty.c.orig8 graphviz-2.30.1/cmd/lefty/lefty.c +--- graphviz-2.30.1/cmd/lefty/lefty.c.orig8 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/lefty/lefty.c 2013-07-12 12:46:23.730664708 +0200 +@@ -86,6 +86,8 @@ static void processargs (int, char **); + static void processstr (char *); + static void printusage (void); + ++static char *cmd; ++ + #if defined(FEATURE_X11) || defined(FEATURE_NONE) + + int main (int argc, char **argv) { +@@ -100,6 +102,8 @@ int main (int argc, char **argv) { + stime = time (NULL); + #endif + ++ cmd = argv[0]; ++ + idlerunmode = 0; + exprstr = NULL; + fp = NULL; +@@ -393,6 +397,25 @@ static int processinput (int waitflag) { + return rtn; + } + ++static char* usestr = ++" acceptable options are:\n\ ++ -x - exit after processing the input file.\n\ ++ -e E - parse and execute expression E.\n\ ++ -el N - set error reporting level. (0)\n\ ++ -sd N - how much of the stack to show if error is printed. (2)\n\ ++ -sb N - how much of each function in the stack show if error is printed. (2)\n\ ++ -df S - set default font.\n\ ++ -ps F - specify a default file name for postscript files.\n\ ++ -? - show help.\n\ ++ -V - print version.\n"; ++ ++static void usage(char *cmd, int eval) ++{ ++ fprintf (stderr, "Usage: %s [options] [file]\n", cmd); ++ fputs (usestr, stderr); ++ exit (eval); ++} ++ + static void processstr (char *buf) { + char *words[100]; + char *s, *s1; +@@ -441,11 +466,19 @@ static void processargs (int argc, char + fprintf (stderr, "lefty version %s\n", LEFTYVERSION); + fprintf (stderr, "graphviz version %s (%s)\n", VERSION, BUILDDATE); + } ++ else if (strcmp (argv[0], "-?") == 0) ++ usage(cmd, 0); + else if (strcmp (argv[0], "-") == 0) + fp = stdin; ++ else if (argv[0][0] == '-') { ++ fprintf (stderr, "option %s unrecognized - ignored\n", argv[0]); ++ usage (cmd, 1); ++ } + else { +- if ((fp = fopen (argv[0], "r")) == NULL) +- panic1 (POS, "main", "cannot open input file: %s", argv[0]); ++ if ((fp = fopen (argv[0], "r")) == NULL) { ++ fprintf (stderr, "cannot open input file: %s", argv[0]); ++ exit(2); ++ } + } + argv++, argc--; + } +diff -up graphviz-2.30.1/cmd/lefty/lefty.1.orig8 graphviz-2.30.1/cmd/lefty/lefty.1 +--- graphviz-2.30.1/cmd/lefty/lefty.1.orig8 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/lefty/lefty.1 2013-07-12 12:48:37.829553144 +0200 +@@ -115,6 +115,9 @@ call. The default file name is + .TP + .B -V + Prints the version. ++.TP ++.B -? ++Prints the usage and exits. + .SH SEE ALSO + .I lefty + user guide. diff --git a/graphviz-2.30.1-man-fix.patch b/graphviz-2.30.1-man-fix.patch new file mode 100644 index 0000000..c741fb4 --- /dev/null +++ b/graphviz-2.30.1-man-fix.patch @@ -0,0 +1,172 @@ +diff -up graphviz-2.30.1/cmd/dot/dot.1.orig2 graphviz-2.30.1/cmd/dot/dot.1 +--- graphviz-2.30.1/cmd/dot/dot.1.orig2 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/dot/dot.1 2013-07-09 14:34:22.000000000 +0200 +@@ -22,6 +22,17 @@ sfdp \- filter for drawing large undirec + [\fB\-P\fR] + [\fB\-v\fR] + [\fB\-V\fR] ++[\fB\-Lg\fR] ++[\fB\-LO\fR] ++[\fB\-Ln\fIiter\fR] ++[\fB\-LU\fIfuns\fR] ++[\fB\-LC\fIfover\fR] ++[\fB\-LT\fR[\fB*\fR]\fIftemp\fR] ++[\fB\-c\fR] ++[\fB\-m\fR] ++[\fB\-q\fIlevel\fR] ++[\fB\-s\fIfscale\fR] ++[\fB\-y\fR] + [files] + .br + \fBneato\fR +@@ -645,6 +656,28 @@ As usual, edge layout is guided by the \ + .PP + \fB\-v\fP (verbose) prints various information useful for debugging. + .PP ++\fB\-Lg\fP do not use grid. ++.PP ++\fB\-LO\fP use old attractive force. ++.PP ++\fB\-Ln\fP\fIiter\fP set number of iterations to \fIiter\fP. ++.PP ++\fB\-LU\fP\fIfuns\fP set unscaled factor to \fIfuns\fP. ++.PP ++\fB\-LC\fP\fIfover\fP set overlap expansion factor to \fIfover\fP. ++.PP ++\fB\-LT\fP[\fB*\fP]\fIftemp\fP set temperature factor to \fIftemp\fP. ++.PP ++\fB\-c\fP configure plugins (write $prefix/lib/graphviz/config). ++.PP ++\fB\-m\fP memory test (observe no growth with top, kill when done). ++.PP ++\fB\-q\fIlevel\fP set level of message suppression, the default is 1. ++.PP ++\fB\-s\fIfscale\fP scale input by \fIfscale\fP, the default is 72. ++.PP ++\fB\-y\fR invert y coordinate in output. ++.PP + \fB\-V\fP (version) prints version information and exits. + .PP + \fB\-?\fP prints the usage and exits. +diff -up graphviz-2.30.1/cmd/dotty/dotty.1.orig3 graphviz-2.30.1/cmd/dotty/dotty.1 +--- graphviz-2.30.1/cmd/dotty/dotty.1.orig3 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/dotty/dotty.1 2013-07-11 10:47:53.050605825 +0200 +@@ -6,6 +6,10 @@ dotty \- A Customizable Graph Editor + [ + .B -V + ] [ ++.BI -lm mode ++] [ ++.BI -el lev ++] [ + .I file + ] + .SH DESCRIPTION +@@ -48,6 +54,12 @@ window. + .TP + .B -V + Prints the version. ++.TP ++.BI -lm mode ++Sets the layout mode. The \fImode\fP can be \fBsync\fP or \fBasync\fP. The default is \fBasync\fP. ++.TP ++.BI -el lev ++Sets the mesage level. The \fIlev\fP can be \fB0\fP or \fB1\fP. The default is \fB0\fP. + .SH BUGS + The lefty parser does not accept anonymous graphs. + .SH SEE ALSO +diff -up graphviz-2.30.1/cmd/gvmap/cluster.1.orig2 graphviz-2.30.1/cmd/gvmap/cluster.1 +--- graphviz-2.30.1/cmd/gvmap/cluster.1.orig2 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/gvmap/cluster.1 2013-07-11 10:20:14.181466011 +0200 +@@ -13,6 +13,9 @@ cluster \- find clusters in a graph and + .BI \-C k + ] + [ ++.BI \-c k ++] ++[ + .B \-o + .I outfile + ] +@@ -37,6 +40,10 @@ specifies a targeted number of clusters + The specified number \fIk\fP is only a suggestion and may not be realisable. + If \fIk == 0\fP, the default, the number of clusters that approximately optimizes the modularity is returned. + .TP ++.BI \-c k ++specifies clustering method. ++If \fIk == 0\fP, the default, the modularity will be used. If \fIk == 1\fP modularity quality will be used. ++.TP + .BI \-o outfile + Specifies that output should go into the file \fIoutfile\fP. By default, + \fIstdout\fP is used. +diff -up graphviz-2.30.1/cmd/tools/gc.1.orig4 graphviz-2.30.1/cmd/tools/gc.1 +--- graphviz-2.30.1/cmd/tools/gc.1.orig4 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/tools/gc.1 2013-07-11 13:36:14.847815612 +0200 +@@ -4,7 +4,7 @@ gc \- count graph components + .SH SYNOPSIS + .B gc + [ +-.B \-necCaDUrs? ++.B \-necCaDUrsv? + ] + [ + .I files +@@ -50,6 +50,9 @@ Only analyze directed graphs. + .B \-U + Only analyze undirected graphs. + .TP ++.B \-v ++Verbose output. ++.TP + .B \-? + Print usage information. + .LP +diff -up graphviz-2.30.1/cmd/tools/gvgen.1.orig6 graphviz-2.30.1/cmd/tools/gvgen.1 +--- graphviz-2.30.1/cmd/tools/gvgen.1.orig6 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/tools/gvgen.1 2013-07-11 14:58:56.599050271 +0200 +@@ -4,7 +4,7 @@ gvgen \- generate graphs + .SH SYNOPSIS + .B gvgen + [ +-.B \-d? ++.B \-dV? + ] + [ + .BI -i n +@@ -198,6 +198,9 @@ Otherwise, the graph is written to stand + .B \-d + Make the generated graph directed. + .TP ++.B \-V ++Verbose output. ++.TP + .B \-? + Print usage information. + .SH "EXIT STATUS" +diff -up graphviz-2.30.1/cmd/lneato/lneato.1.orig9 graphviz-2.30.1/cmd/lneato/lneato.1 +--- graphviz-2.30.1/cmd/lneato/lneato.1.orig9 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/lneato/lneato.1 2013-07-12 13:24:46.817426092 +0200 +@@ -6,6 +6,10 @@ lneato \- A Customizable Graph Editor + [ + .B -V + ] [ ++.BI -lm mode ++] [ ++.BI -el lev ++] [ + .I file + ] + .SH DESCRIPTION +@@ -48,6 +52,12 @@ window. + .TP + .B -V + Prints the version. ++.TP ++.BI -lm mode ++Sets the layout mode. The \fImode\fP can be \fBsync\fP or \fBasync\fP. The default is \fBasync\fP. ++.TP ++.BI -el lev ++Sets the mesage level. The \fIlev\fP can be \fB0\fP or \fB1\fP. The default is \fB0\fP. + .SH SEE ALSO + neato(1), lefty(1), dotty(1), xdot(3), + .br diff --git a/graphviz-2.30.1-prune-help.patch b/graphviz-2.30.1-prune-help.patch new file mode 100644 index 0000000..3db1411 --- /dev/null +++ b/graphviz-2.30.1-prune-help.patch @@ -0,0 +1,45 @@ +diff -up graphviz-2.30.1/contrib/prune/prune.c.orig10 graphviz-2.30.1/contrib/prune/prune.c +--- graphviz-2.30.1/contrib/prune/prune.c.orig10 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/contrib/prune/prune.c 2013-07-12 13:35:44.315004975 +0200 +@@ -128,7 +128,11 @@ int main(int argc, char **argv) + break; + } + case '?': +- if (isprint(optopt)) { ++ if (optopt == '?') ++ { ++ help_message(progname); ++ exit(EXIT_SUCCESS); ++ } else if (isprint(optopt)) { + fprintf(stderr, "Unknown option `-%c'.\n", optopt); + } else { + fprintf(stderr, "Unknown option character `\\x%X'.\n", +diff -up graphviz-2.30.1/contrib/prune/prune.1.orig10 graphviz-2.30.1/contrib/prune/prune.1 +--- graphviz-2.30.1/contrib/prune/prune.1.orig10 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/contrib/prune/prune.1 2013-07-12 13:45:30.544918729 +0200 +@@ -20,6 +20,12 @@ prune \- Prune directed graphs + .BI \-N " attrspec" + ] + [ ++.B \-v ++] ++[ ++.BR \- ( h | ? ) ++] ++[ + .I files ... + ] + .SH DESCRIPTION +@@ -54,6 +60,12 @@ pruned node. + .I attrspec + is a string of the form + .IR attr "=" value. ++.TP ++.B \-v ++Verbose output. ++.TP ++.BR \-h " "\-? ++Prints the usage and exits. + + .SH EXAMPLES + An input graph diff --git a/graphviz-2.30.1-smyrna-doc-opt.patch b/graphviz-2.30.1-smyrna-doc-opt.patch new file mode 100644 index 0000000..b117167 --- /dev/null +++ b/graphviz-2.30.1-smyrna-doc-opt.patch @@ -0,0 +1,17 @@ +diff -up graphviz-2.30.1/cmd/smyrna/Makefile.am.orig2 graphviz-2.30.1/cmd/smyrna/Makefile.am +--- graphviz-2.30.1/cmd/smyrna/Makefile.am.orig2 2013-02-14 14:27:39.000000000 +0100 ++++ graphviz-2.30.1/cmd/smyrna/Makefile.am 2013-07-09 13:18:30.792483754 +0200 +@@ -2,10 +2,13 @@ + ## Process this file with automake to produce Makefile.in + + pdfdir = $(pkgdatadir)/doc/pdf ++ ++if WITH_SMYRNA + man = smyrna.1 + pdf = smyrna.1.pdf + man_MANS = $(man) + pdf_DATA = $(pdf) ++endif + + AM_CPPFLAGS = \ + -DSMYRNA_PATH=\""$(pkgdatadir)/smyrna"\" \ diff --git a/graphviz.spec b/graphviz.spec index e7680fb..79ea71c 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -51,7 +51,7 @@ Name: graphviz Summary: Graph Visualization Tools Version: 2.30.1 -Release: 9%{?dist} +Release: 10%{?dist} Group: Applications/Multimedia License: EPL URL: http://www.graphviz.org/ @@ -65,6 +65,16 @@ Patch4: graphviz-2.26.0-rtest-errout-fix.patch Patch5: graphviz-2.30.1-gvc.pc-no-libgraph.patch # Lua 5.2 Patch6: graphviz-2.30.1-lua-5.2.patch +# Accepted upstream, ticket #2302 +Patch7: graphviz-2.30.1-smyrna-doc-opt.patch +# Accepted upstream, ticket #2304 +Patch8: graphviz-2.30.1-gv2gml-options-fix.patch +# Sent upstream, ticket #2305 +Patch9: graphviz-2.30.1-lefty-help.patch +# Sent upstream, ticket #2306 +Patch10: graphviz-2.30.1-prune-help.patch +# Sent upstream, ticket #2307 +Patch11: graphviz-2.30.1-man-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, libpng-devel, libjpeg-devel, expat-devel, freetype-devel >= 2 BuildRequires: ksh, bison, m4, flex, tk-devel, tcl-devel >= 8.3, swig @@ -267,6 +277,11 @@ Various tcl packages (extensions) for the graphviz tools. %patch4 -p1 -b .rtest-errout-fix %patch5 -p1 -b .cgraph %patch6 -p1 -b .lua-52 +%patch7 -p1 -b .smyrna-doc-opt +%patch8 -p1 -b .gv2gml-options-fix +%patch9 -p1 -b .lefty-help +%patch10 -p1 -b .prune-help +%patch11 -p1 -b .man-fix # Attempt to fix rpmlint warnings about executable sources find -type f -regex '.*\.\(c\|h\)$' -exec chmod a-x {} ';' @@ -543,6 +558,9 @@ rm -rf %{buildroot} %changelog +* Fri Jul 12 2013 Jaroslav Škarvada - 2.30.1-10 +- Various man and built-in help fixes + * Tue Jun 25 2013 Jaroslav Škarvada - 2.30.1-9 - Fixed handling of the libdir/graphviz directory