diff --git a/.gitignore b/.gitignore index e69de29..6bdd0f6 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/man-1.6g.tar.gz +/man2html_1.6g-6.debian.tar.gz diff --git a/man2html-BR-empty-line.patch b/man2html-BR-empty-line.patch new file mode 100644 index 0000000..189d263 --- /dev/null +++ b/man2html-BR-empty-line.patch @@ -0,0 +1,17 @@ +Ignore font change requests that are note followed by any words (closes: #489181). + +diff -ruN -x '*.rej' -x '*.orig' man-1.6f-old/man2html/man2html.c man-1.6f/man2html/man2html.c +--- man-1.6f-old/man2html/man2html.c 2008-09-07 10:56:00.000000000 +0200 ++++ man-1.6f/man2html/man2html.c 2008-09-07 10:56:54.000000000 +0200 +@@ -2131,7 +2131,10 @@ + char font[2]; + font[0] = c[0]; font[1] = c[1]; + c = c+j; +- if (*c == '\n') c++; ++ if (*c == '\n') { ++ c++; ++ break; ++ } + sl = fill_words(c, wordlist, SIZE(wordlist), &words, '\n'); + c = sl+1; + /* .BR name (section) diff --git a/man2html-all-args.patch b/man2html-all-args.patch new file mode 100644 index 0000000..638e199 --- /dev/null +++ b/man2html-all-args.patch @@ -0,0 +1,50 @@ +Handle \$* and \$@ escapes. + +diff -ruN -x '*.rej' -x '*.orig' man-1.6e-old/man2html/man2html.c man-1.6e/man2html/man2html.c +--- man-1.6e-old/man2html/man2html.c 2007-04-17 00:34:40.000000000 +0200 ++++ man-1.6e/man2html/man2html.c 2007-04-17 00:29:47.000000000 +0200 +@@ -615,6 +615,7 @@ + static char * + scan_escape(char *c) { + char *h=NULL; ++ char *tmp = NULL; + char b[10]; + INTDEF *intd; + int exoutputp,exskipescape; +@@ -630,8 +631,26 @@ + case '$': + if (argument) { + c++; +- i=(*c -'1'); +- if (!(h=argument[i])) h=""; ++ if (*c == '*' || *c == '@') { ++ int len = 0; ++ int quote = (*c == '@') ? 2 : 0; ++ ++ for (i = 0; ((h = argument[i])); i++) ++ len += strlen(h) + 1 + quote; ++ tmp = (char*) xmalloc(len + 1); ++ *tmp = 0; ++ ++ for (i = 0; ((h = argument[i])); i++) { ++ sprintf(tmp, "%s %s%s%s", tmp, ++ quote ? "\"" : "", ++ h, ++ quote ? "\"" : ""); ++ }; ++ h = tmp + 1; ++ } else { ++ i=(*c -'1'); ++ if (!(h=argument[i])) h=""; ++ } + } + break; + case 'z': +@@ -791,6 +810,7 @@ + } + c++; + if (!skip_escape) out_html(h); ++ if (tmp) free(tmp); + return c; + } + diff --git a/man2html-cgi.patch b/man2html-cgi.patch new file mode 100644 index 0000000..f4c9db6 --- /dev/null +++ b/man2html-cgi.patch @@ -0,0 +1,92 @@ +Only in ./debian/patches: man2html-double-quotes.patch +diff -ur ../man2html-deb.orig/debian/sources/Makefile ./debian/sources/Makefile +--- ../man2html-deb.orig/debian/sources/Makefile 2011-11-02 12:45:37.000000000 -0700 ++++ ./debian/sources/Makefile 2011-12-15 05:31:23.702465064 -0700 +@@ -2,15 +2,15 @@ + # $Id: Makefile 241 2011-01-09 20:55:40Z robert $ + # + CC = gcc +-CGI_DIR = $(PREFIX)/usr/lib/cgi-bin/man ++CGI_DIR = $(PREFIX)/usr/lib/man2html/cgi-bin/man + SHARE_DIR = $(PREFIX)/usr/share/man2html +-DOC_DIR = $(PREFIX)/usr/share/doc/man2html-base ++DOC_DIR = $(PREFIX)/usr/share/doc/man2html + +-CGIBASE = /cgi-bin/man +-MAN_CONFIG = /etc/manpath.config ++CGIBASE = /man ++MAN_CONFIG = /etc/man_db.conf + + DEFINES = -DMAN_CONFIG='"$(MAN_CONFIG)"' +-CFLAGS = -pipe -g -Wall -Wextra $(DEFINES) $(DEBIAN_CFLAGS) ++CFLAGS += -pipe -g -Wall -Wextra $(DEFINES) + + # + # Installer program: +@@ -32,13 +32,12 @@ + $(CC) $(CFLAGS) $^ -o $@ + + install: targets ++ mkdir -p $(CGI_DIR) ++ mkdir -p $(SHARE_DIR) ++ mkdir -p $(DOC_DIR) + $(INSTALL) -p -m 0755 man2html.cgi $(CGI_DIR)/man2html +- $(INSTALL) -p -m 0755 mansearch $(CGI_DIR) + $(INSTALL) -p -m 0755 manwhatis $(CGI_DIR) + ln $(CGI_DIR)/manwhatis $(CGI_DIR)/mansec +- $(INSTALL) -p -m0644 swish++.conf $(SHARE_DIR) +- $(INSTALL) -p -m0644 man.html $(DOC_DIR)/html +- + + clean: + rm -f *.o *~ core manwhatis mansec man2html.cgi +Only in ./debian/sources: Makefile~ +diff -ur ../man2html-deb.orig/debian/sources/man2html.cgi.c ./debian/sources/man2html.cgi.c +--- ../man2html-deb.orig/debian/sources/man2html.cgi.c 2011-11-02 12:45:37.000000000 -0700 ++++ ./debian/sources/man2html.cgi.c 2011-12-15 05:23:34.806269725 -0700 +@@ -41,11 +41,11 @@ + #endif + + #ifndef CGIBASE +-#define CGIBASE "/cgi-bin/man" ++#define CGIBASE "/man" + #endif + + #ifndef LYNXCGIBASE +-#define LYNXCGIBASE "lynxcgi:/usr/lib/cgi-bin/man" ++#define LYNXCGIBASE "lynxcgi:/usr/lib/man2html/cgi-bin/man" + #endif + + +diff -ur ../man2html-deb.orig/debian/sources/man.html ./debian/sources/man.html +--- ../man2html-deb.orig/debian/sources/man.html 2011-11-02 12:45:37.000000000 -0700 ++++ ./debian/sources/man.html 2011-12-15 05:13:46.492823889 -0700 +@@ -13,12 +13,10 @@ + Depending on how you are accessing this file you are now reading, at least one of + the following URL should work: +
+-Please see the /usr/share/doc/man2html/README.Debian file for more details. +