diff --git a/SuSEconfig.groff b/SuSEconfig.groff index e3ca080..772d357 100644 --- a/SuSEconfig.groff +++ b/SuSEconfig.groff @@ -25,6 +25,11 @@ test -f /lib/YaST/SuSEconfig.functions || { } . /lib/YaST/SuSEconfig.functions +test -n "$UPDATE_GROFF_CONF" -a "$UPDATE_GROFF_CONF" = "no" && { + echo "Warning: UPDATE_GROFF_CONF is deprecated and might be removed in future" + echo "SuSEconfig.groff no longer rewrites user modified /etc/papersize" +} + test -n "$UPDATE_GROFF_CONF" -a "$UPDATE_GROFF_CONF" = "yes" || exit 0 function get_paper () { @@ -43,6 +48,9 @@ PAPER_SIZE=$(get_paper) # if GROFF_PAGESIZE is set, it overrides the locale information: if [ -n "$GROFF_PAGESIZE" ] ; then + echo "Warning: GROFF_PAGESIZE is deprecated and might be removed in future" + echo "Use RC_LANG or RC_LC_PAPER in /etc/sysconfig/language" + echo "or write the value to /etc/papersize, it will not be overwritten" # make GROFF_PAGESIZE lower case only: GROFF_PAGESIZE=$( echo $GROFF_PAGESIZE | tr '[:upper:]' '[:lower:]' ) case $GROFF_PAGESIZE in @@ -56,6 +64,7 @@ if [ -n "$GROFF_PAGESIZE" ] ; then esac fi -echo "$PAPER_SIZE" > /etc/papersize +echo "$PAPER_SIZE" > /etc/papersize.SuSEconfig +check_md5_and_move /etc/papersize exit 0 diff --git a/bnc446710.patch b/bnc446710.patch deleted file mode 100644 index 2761602..0000000 --- a/bnc446710.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -ru groff-1.18.1.1.orig//font/devutf8/R.proto groff-1.18.1.1/font/devutf8/R.proto ---- groff-1.18.1.1.orig//font/devutf8/R.proto 2002-07-19 09:58:45.000000000 +0200 -+++ groff-1.18.1.1/font/devutf8/R.proto 2008-11-25 14:58:19.000000000 +0100 -@@ -285,13 +285,13 @@ - +h 24 0 0x03D1 - +f 24 0 0x03D5 - +p 24 0 0x03D6 --- 24 0 0x2010 -+- 24 0 0x002D - hy " - en 24 0 0x2013 - em 24 0 0x2014 --` 24 0 0x2018 -+` 24 0 0x0060 - oq " --' 24 0 0x2019 -+' 24 0 0x0027 - cq " - bq 24 0 0x201A - lq 24 0 0x201C -@@ -334,7 +334,7 @@ - st 24 0 0x220B - product 24 0 0x220F - sum 24 0 0x2211 --\- 24 0 0x2212 -+\- 24 0 0x002D - mi " - ** 24 0 0x2217 - sr 24 0 0x221A diff --git a/bugzilla-217106-too-few-arguments-in-function-call.patch b/bugzilla-217106-too-few-arguments-in-function-call.patch deleted file mode 100644 index 3ad4b69..0000000 --- a/bugzilla-217106-too-few-arguments-in-function-call.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -ru groff-1.18.1.1.orig/src/xditview/draw.c groff-1.18.1.1/src/xditview/draw.c ---- groff-1.18.1.1.orig/src/xditview/draw.c 2007-01-17 13:30:09.000000000 +0100 -+++ groff-1.18.1.1/src/xditview/draw.c 2007-01-17 14:31:16.000000000 +0100 -@@ -417,19 +417,21 @@ - || !device_code_width (dw->dvi.device_font, - dw->dvi.state->font_size, c, &wid)) - return; -- if (dw->dvi.native) { -- DoCharacter (dw, c, wid); -- return; -- } -+ - map = QueryFontMap (dw, dw->dvi.state->font_number); - if (!map) - return; -+ -+ if (dw->dvi.native) { -+ DoCharacter (dw, c, wid, map->char2XChar2b); -+ return; -+ } - for (name = device_name_for_code (dw->dvi.device_font, c); - name; - name = device_name_for_code ((DeviceFont *)0, c)) { - int code = DviCharIndex (map, name); - if (code >= 0) { -- DoCharacter (dw, code, wid); -+ DoCharacter (dw, code, wid, map->char2XChar2b); - break; - } - if (FakeCharacter (dw, name, wid)) diff --git a/bugzilla-292412-special-encoding-handling-also-for-chinese.patch b/bugzilla-292412-special-encoding-handling-also-for-chinese.patch deleted file mode 100644 index b859c59..0000000 --- a/bugzilla-292412-special-encoding-handling-also-for-chinese.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: groff-1.18.1.1/src/libs/libgroff/encoding.cc -=================================================================== ---- groff-1.18.1.1.orig/src/libs/libgroff/encoding.cc -+++ groff-1.18.1.1/src/libs/libgroff/encoding.cc -@@ -392,7 +392,7 @@ init_encoding_handler() - else - charset = ""; - #endif -- if (strncmp(locale, "ja", 2) == 0) { -+ if (strncmp(locale, "ja", 2) == 0||strncmp(locale,"zh" ,2) == 0) { - select_input_encoding_handler(charset); - select_output_encoding_handler(charset); - } else if ((!device || strcmp(device, "ascii8") == 0)) { diff --git a/debian-fix.patch b/debian-fix.patch deleted file mode 100644 index 97bc852..0000000 --- a/debian-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru groff-1.18.1.1.orig/src/xditview/lex.c groff-1.18.1.1/src/xditview/lex.c ---- groff-1.18.1.1.orig/src/xditview/lex.c 2004-07-13 17:16:27.036918000 +0200 -+++ groff-1.18.1.1/src/xditview/lex.c 2004-07-13 17:19:37.526695651 +0200 -@@ -155,6 +155,7 @@ - return i; - } - /* NOT REACHED */ -+ return 0; - } - - int - diff --git a/double-free.patch b/double-free.patch deleted file mode 100644 index d74d23e..0000000 --- a/double-free.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/preproc/grn/hdb.cc -+++ src/preproc/grn/hdb.cc -@@ -115,7 +115,6 @@ - type = DBGetType(string); /* interpret element type */ - if (type < 0) { /* no more data */ - done = TRUE; -- (void) fclose(file); - } else { - #ifdef UW_FASTSCAN - (void) xscanf(file, &x, &y); /* always one point */ diff --git a/fgets-overflow.patch b/fgets-overflow.patch deleted file mode 100644 index 0d24226..0000000 --- a/fgets-overflow.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- src/devices/grops/ps.cc -+++ src/devices/grops/ps.cc -@@ -740,8 +740,8 @@ - if (fp == 0) - fatal("can't open encoding file `%1'", encoding); - int lineno = 1; -- char buf[256]; -- while (fgets(buf, 512, fp) != 0) { -+ char buf[512]; -+ while (fgets(buf, sizeof(buf), fp) != 0) { - char *p = buf; - while (csspace(*p)) - p++; diff --git a/gcc4.patch b/gcc4.patch deleted file mode 100644 index 1a6016c..0000000 --- a/gcc4.patch +++ /dev/null @@ -1,138 +0,0 @@ -diff -prN groff-1.18.1.1-orig/src/preproc/eqn/box.cc groff-1.18.1.1/src/preproc/eqn/box.cc -*** groff-1.18.1.1-orig/src/preproc/eqn/box.cc Thu Apr 4 16:04:45 2002 ---- groff-1.18.1.1/src/preproc/eqn/box.cc Wed Sep 15 23:28:05 2004 -*************** int matrix_side_sep = 17; // = thin spac -*** 80,86 **** - - int nroff = 0; // should we grok ndefine or tdefine? - -! struct { - const char *name; - int *ptr; - } param_table[] = { ---- 80,86 ---- - - int nroff = 0; // should we grok ndefine or tdefine? - -! struct param { - const char *name; - int *ptr; - } param_table[] = { -diff -prN groff-1.18.1.1-orig/src/preproc/grn/hgraph.cc groff-1.18.1.1/src/preproc/grn/hgraph.cc -*** groff-1.18.1.1-orig/src/preproc/grn/hgraph.cc Mon Oct 7 06:49:03 2002 ---- groff-1.18.1.1/src/preproc/grn/hgraph.cc Wed Sep 15 23:28:36 2004 -*************** extern int ytop; -*** 43,49 **** - extern int ybottom; - extern int xleft; - extern int xright; -! extern enum { - OUTLINE, FILL, BOTH - } polyfill; - ---- 43,49 ---- - extern int ybottom; - extern int xleft; - extern int xright; -! extern enum filltype { - OUTLINE, FILL, BOTH - } polyfill; - -diff -prN groff-1.18.1.1-orig/src/preproc/grn/main.cc groff-1.18.1.1/src/preproc/grn/main.cc -*** groff-1.18.1.1-orig/src/preproc/grn/main.cc Sun Feb 10 02:22:12 2002 ---- groff-1.18.1.1/src/preproc/grn/main.cc Wed Sep 15 23:29:04 2004 -*************** int style[STYLES] = -*** 160,166 **** - double scale = 1.0; /* no scaling, default */ - int defpoint = 0; /* flag for pointsize scaling */ - char *defstipple = (char *) 0; -! enum { - OUTLINE, FILL, BOTH - } polyfill; - ---- 160,166 ---- - double scale = 1.0; /* no scaling, default */ - int defpoint = 0; /* flag for pointsize scaling */ - char *defstipple = (char *) 0; -! enum filltype { - OUTLINE, FILL, BOTH - } polyfill; - -diff -prN groff-1.18.1.1-orig/src/preproc/refer/command.cc groff-1.18.1.1/src/preproc/refer/command.cc -*** groff-1.18.1.1-orig/src/preproc/refer/command.cc Sun Feb 10 02:22:12 2002 ---- groff-1.18.1.1/src/preproc/refer/command.cc Wed Sep 15 23:29:34 2004 -*************** a single field, -*** 632,638 **** - ? means that the previous argument is optional, * means that the - previous argument can occur any number of times. */ - -! struct { - const char *name; - command_t func; - const char *arg_types; ---- 632,638 ---- - ? means that the previous argument is optional, * means that the - previous argument can occur any number of times. */ - -! struct command { - const char *name; - command_t func; - const char *arg_types; -diff -prN groff-1.18.1.1-orig/src/utils/tfmtodit/tfmtodit.cc groff-1.18.1.1/src/utils/tfmtodit/tfmtodit.cc -*** groff-1.18.1.1-orig/src/utils/tfmtodit/tfmtodit.cc Sun Aug 19 23:32:41 2001 ---- groff-1.18.1.1/src/utils/tfmtodit/tfmtodit.cc Wed Sep 15 23:30:09 2004 -*************** lig_chars table. `ch' gives the full-nam -*** 650,656 **** - gives the groff name of the character, `i' gives its index in - the encoding, which is filled in later (-1 if it does not appear). */ - -! struct { - const char *ch; - int i; - } lig_chars[] = { ---- 650,656 ---- - gives the groff name of the character, `i' gives its index in - the encoding, which is filled in later (-1 if it does not appear). */ - -! struct lig_char { - const char *ch; - int i; - } lig_chars[] = { -*************** enum { CH_f, CH_i, CH_l, CH_ff, CH_fi, C -*** 670,676 **** - - // Each possible ligature appears in this table. - -! struct { - unsigned char c1, c2, res; - const char *ch; - } lig_table[] = { ---- 670,676 ---- - - // Each possible ligature appears in this table. - -! struct lig { - unsigned char c1, c2, res; - const char *ch; - } lig_table[] = { - ---- groff-1.18.1.1/src/xditview/xtotroff.c.xx 2005-09-17 21:05:23.000000000 +0200 -+++ groff-1.18.1.1/src/xditview/xtotroff.c 2005-09-17 21:06:12.000000000 +0200 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - #include "config.h" - #include "XFontName.h" - #include "DviChar.h" ---- groff-1.18.1.1/src/xditview/DviChar.c.xx 2005-09-17 21:05:37.000000000 +0200 -+++ groff-1.18.1.1/src/xditview/DviChar.c 2005-09-17 21:06:03.000000000 +0200 -@@ -6,6 +6,7 @@ - */ - - #include -+#include - #include "config.h" - #include "DviChar.h" - #include "encoding.h" diff --git a/gcc43.patch b/gcc43.patch deleted file mode 100644 index 44d08aa..0000000 --- a/gcc43.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/devices/grolbp/lbp.cc -+++ src/devices/grolbp/lbp.cc -@@ -25,7 +25,6 @@ - - - Add X command to include bitmaps - */ --#define _GNU_SOURCE - - #include "driver.h" - #include "lbp.h" diff --git a/groff-1.17.2-gcc3.patch b/groff-1.17.2-gcc3.patch deleted file mode 100644 index e110e07..0000000 --- a/groff-1.17.2-gcc3.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- groff-1.17.2/Makefile.cpg.gcc3 Thu May 2 13:45:16 2002 -+++ groff-1.17.2/Makefile.cpg Thu May 2 13:44:53 2002 -@@ -9,7 +9,7 @@ - all: $(PROG) $(MANPAGES) - - $(PROG): $(OBJS) $(XLIBS) -- $(LINK.c) -o $@ $(OBJS) $(XLIBS) $(LIBS) $(MLIB) -+ $(LINK.cc) -o $@ $(OBJS) $(XLIBS) $(LIBS) $(MLIB) - - install_bin: install_prog - install_prog: $(PROG) diff --git a/groff-1.18.1.1-debian-538330.patch b/groff-1.18.1.1-debian-538330.patch deleted file mode 100644 index 23a08eb..0000000 --- a/groff-1.18.1.1-debian-538330.patch +++ /dev/null @@ -1,125 +0,0 @@ -Index: groff-1.18.1.1/contrib/eqn2graph/eqn2graph.sh -=================================================================== ---- groff-1.18.1.1.orig/contrib/eqn2graph/eqn2graph.sh 2009-10-12 13:47:56.000000000 +0200 -+++ groff-1.18.1.1/contrib/eqn2graph/eqn2graph.sh 2009-10-12 15:35:07.489407486 +0200 -@@ -58,17 +58,36 @@ - shift - done - -+# create temporary directory -+tmp= -+for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do -+ test -z "$d" && continue -+ -+ tmp=`(umask 077 && mktemp -d -q "$d/eqn2graph-XXXXXX") 2> /dev/null` \ -+ && test -n "$tmp" && test -d "$tmp" \ -+ && break -+ -+ tmp=$d/eqn2graph$$-$RANDOM -+ (umask 077 && mkdir $tmp) 2> /dev/null && break -+ -+ tmp= -+done; -+if test -z "$tmp"; then -+ echo "$0: cannot create temporary directory" >&2 -+ { (exit 1); exit 1; } -+fi -+ -+trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 -+ - # Here goes: - # 1. Add .EQ/.EN. - # 2. Process through eqn(1) to emit troff markup. - # 3. Process through groff(1) to emit Postscript. - # 4. Use convert(1) to crop the Postscript and turn it into a bitmap. --tmp=/tmp/eqn2graph-$$ --trap "rm ${tmp}.*" 0 2 15 - read equation - (echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \ -- groff -e $groff_opts -Tps >${tmp}.ps \ -- && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \ -- && cat ${tmp}.${format} -+ groff -e $groff_opts -Tps >${tmp}/eng2graph.ps \ -+ && convert -crop 0x0 $convert_opts ${tmp}/eng2graph.ps ${tmp}/eng2graph.${format} \ -+ && cat ${tmp}/eng2graph.${format} - - # End -Index: groff-1.18.1.1/contrib/groffer/groffer.sh -=================================================================== ---- groff-1.18.1.1.orig/contrib/groffer/groffer.sh 2009-10-12 13:47:57.000000000 +0200 -+++ groff-1.18.1.1/contrib/groffer/groffer.sh 2009-10-12 16:11:39.887806243 +0200 -@@ -2910,11 +2910,7 @@ - tmp_create() - { - func_check tmp_create '<=' 1 "$@"; -- local _tmp; -- # the output file does not have `,' as first character -- _tmp="${_TMP_DIR}/,$1"; -- echo -n >"${_tmp}"; -- echo -n "${_tmp}"; # output file name -+ mktemp "${_TMP_DIR}/,$1.XXXXXX" - eval "${return_ok}"; - } - -Index: groff-1.18.1.1/contrib/pic2graph/pic2graph.sh -=================================================================== ---- groff-1.18.1.1.orig/contrib/pic2graph/pic2graph.sh 2009-10-12 13:47:56.000000000 +0200 -+++ groff-1.18.1.1/contrib/pic2graph/pic2graph.sh 2009-10-12 16:24:13.815806026 +0200 -@@ -68,16 +68,35 @@ - eqndelim="delim $eqndelim" - fi - -+# create temporary directory -+tmp= -+for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do -+ test -z "$d" && continue -+ -+ tmp=`(umask 077 && mktemp -d -q "$d/pic2graph-XXXXXX") 2> /dev/null` \ -+ && test -n "$tmp" && test -d "$tmp" \ -+ && break -+ -+ tmp=$d/pic2graph$$-$RANDOM -+ (umask 077 && mkdir $tmp) 2> /dev/null && break -+ -+ tmp= -+done; -+if test -z "$tmp"; then -+ echo "$0: cannot create temporary directory" >&2 -+ { (exit 1); exit 1; } -+fi -+ -+trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 -+ - # Here goes: - # 1. Wrap the input in dummy .PS/PE macros (and add possibly null .EQ/.EN) - # 2. Process through eqn and pic to emit troff markup. - # 3. Process through groff to emit Postscript. - # 4. Use convert(1) to crop the PostScript and turn it into a bitmap. --tmp=/tmp/pic2graph-$$ --trap "rm ${tmp}.*" 0 2 15 - (echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \ -- groff -e -p $groffpic_opts -Tps >${tmp}.ps \ -- && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \ -- && cat ${tmp}.${format} -+ groff -e -p $groffpic_opts -Tps >${tmp}/pic2graph.ps \ -+ && convert -crop 0x0 $convert_opts ${tmp}/pic2graph.ps ${tmp}/pic2graph.${format} \ -+ && cat ${tmp}/pic2graph.${format} - - # End -Index: groff-1.18.1.1/doc/groff.texinfo -=================================================================== ---- groff-1.18.1.1.orig/doc/groff.texinfo 2002-10-02 18:45:19.000000000 +0200 -+++ groff-1.18.1.1/doc/groff.texinfo 2009-10-12 16:29:27.300306251 +0200 -@@ -11605,9 +11605,9 @@ - @pindex perl - @Example - .sy perl -e 'printf ".nr H %d\\n.nr M %d\\n.nr S %d\\n",\ -- (localtime(time))[2,1,0]' > /tmp/x\n[$$] --.so /tmp/x\n[$$] --.sy rm /tmp/x\n[$$] -+ (localtime(time))[2,1,0]' > timefile\n[$$] -+.so timefile\n[$$] -+.sy rm timefile\n[$$] - \nH:\nM:\nS - @endExample - diff --git a/groff-1.18.1.1-gcc41.patch b/groff-1.18.1.1-gcc41.patch deleted file mode 100644 index 899cecd..0000000 --- a/groff-1.18.1.1-gcc41.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- groff-1.18.1.1/src/devices/grohtml/post-html.cc.xx 2005-10-13 09:46:50.000000000 +0200 -+++ groff-1.18.1.1/src/devices/grohtml/post-html.cc 2005-10-13 09:47:05.000000000 +0200 -@@ -261,7 +261,7 @@ - char_block *next; - - char_block(); -- char_block::char_block(int length); -+ char_block(int length); - }; - - char_block::char_block() diff --git a/groff-1.18.1.1.tar.bz2 b/groff-1.18.1.1.tar.bz2 deleted file mode 100644 index 4a8c960..0000000 --- a/groff-1.18.1.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a72657207a7cd26df1f241d74020ca487f60e1e77e9e7d7ffd00dfa35386fc7 -size 1835934 diff --git a/groff-1.18.1.1-destbufferoverflow.patch b/groff-1.20.1-destbufferoverflow.patch similarity index 63% rename from groff-1.18.1.1-destbufferoverflow.patch rename to groff-1.20.1-destbufferoverflow.patch index 1718d91..670e2ef 100644 --- a/groff-1.18.1.1-destbufferoverflow.patch +++ b/groff-1.20.1-destbufferoverflow.patch @@ -1,8 +1,8 @@ -Index: src/devices/grops/ps.cc +Index: src/devices/grops/ps.cpp =================================================================== ---- src/devices/grops/ps.cc.orig 2002-06-19 23:07:33.000000000 +0200 -+++ src/devices/grops/ps.cc 2008-10-07 23:57:44.000000000 +0200 -@@ -739,7 +739,7 @@ void ps_printer::encode_fonts() +--- src/devices/grops/ps.cpp.orig 2009-01-09 15:25:52.000000000 +0100 ++++ src/devices/grops/ps.cpp 2010-08-23 15:29:15.848156800 +0200 +@@ -833,7 +833,7 @@ { if (next_encoding_index == 0) return; diff --git a/groff-1.20.1-groffer-libexecdir.patch b/groff-1.20.1-groffer-libexecdir.patch new file mode 100644 index 0000000..e8e5d91 --- /dev/null +++ b/groff-1.20.1-groffer-libexecdir.patch @@ -0,0 +1,63 @@ +Index: groff-1.20.1/contrib/groffer/Makefile.sub +=================================================================== +--- groff-1.20.1.orig/contrib/groffer/Makefile.sub 2009-01-09 15:25:52.000000000 +0100 ++++ groff-1.20.1/contrib/groffer/Makefile.sub 2010-08-27 11:46:36.946469881 +0200 +@@ -63,7 +63,7 @@ + GROFFER_PERL_=`echo $(GROFFER_PERL) | sed 's|$(srcdir)/perl/||g'` + GROFFER_SHELL_=`echo $(GROFFER_SHELL) | sed 's|$(srcdir)/shell||g'` + +-groffer_dir=$(libdir)/groff/groffer ++groffer_dir=$(libexecdir)/groff/groffer + + # TODO: Add perl check to configure script. + groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \ +@@ -74,7 +74,7 @@ + sed -f "$(SH_DEPS_SED_SCRIPT)" \ + -e "s|@g@|$(g)|g" \ + -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ +- -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ ++ -e "s|@libdir@|$(DESTDIR)$(libexecdir)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + -e "$(SH_SCRIPT_SED_CMD)" \ + $(srcdir)/perl/groffer.pl >$@; \ +@@ -88,7 +88,7 @@ + sed -f "$(SH_DEPS_SED_SCRIPT)" \ + -e "s|@g@|$(g)|g" \ + -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ +- -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ ++ -e "s|@libdir@|$(DESTDIR)$(libexecdir)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + -e "$(SH_SCRIPT_SED_CMD)" \ + $(srcdir)/shell/groffer.sh >$@; \ +@@ -137,7 +137,7 @@ + for f in $(GROFFER_PERL_) $(GROFFER_SHELL_) version.sh; do \ + $(RM) $(DESTDIR)$(groffer_dir)/$$f; \ + done +- -rmdir $(DESTDIR)$(libdir)/groff/groffer ++ -rmdir $(DESTDIR)$(libexecdir)/groff/groffer + + ######################################################################## + # Emacs settings +Index: groff-1.20.1/Makefile.in +=================================================================== +--- groff-1.20.1.orig/Makefile.in 2010-08-27 11:44:59.000000000 +0200 ++++ groff-1.20.1/Makefile.in 2010-08-27 12:38:22.358157037 +0200 +@@ -137,6 +137,9 @@ + libdir=@libdir@ + libprogramdir=$(libdir)/groff + ++# `libexecdir` says where to install script not intended to run as user ++libexecdir=@libexecdir@ ++ + # `datasubdir' says where to install platform-independent data files. + datadir=@datadir@ + dataprogramdir=$(datadir)/groff +@@ -732,7 +735,7 @@ + fi; \ + test -d $@ || $(mkinstalldirs) $@; \ + cd $@; \ +- $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \ ++ $(MAKE) $(MAKE_K_FLAG) $(MDEFINES) srcdir=$$srcdir libexecdir=$(libexecdir) VPATH=$$srcdir \ + -f $(top_srcdir)/Makefile.comm \ + -f $$srcdir/Makefile.sub \ + -f $(top_srcdir)/Makefile.man $(do) diff --git a/groff-1.20.1-nroff-empty-LANGUAGE.patch b/groff-1.20.1-nroff-empty-LANGUAGE.patch new file mode 100644 index 0000000..3251874 --- /dev/null +++ b/groff-1.20.1-nroff-empty-LANGUAGE.patch @@ -0,0 +1,13 @@ +Index: groff-1.20.1/src/roff/nroff/nroff.sh +=================================================================== +--- groff-1.20.1.orig/src/roff/nroff/nroff.sh 2010-08-23 15:04:18.000000000 +0200 ++++ groff-1.20.1/src/roff/nroff/nroff.sh 2010-08-23 15:46:28.313156532 +0200 +@@ -41,7 +41,7 @@ + IBM-1047) + Tloc=cp1047 ;; + *) +- case "${LC_ALL-${LC_CTYPE-${LANG}}}" in ++ case "${LC_ALL:-${LC_CTYPE:-${LANG}}}" in + *.UTF-8) + Tloc=utf8 ;; + iso_8859_1 | *.ISO-8859-1 | *.ISO8859-1 | \ diff --git a/groff-1.20.1.tar.bz2 b/groff-1.20.1.tar.bz2 new file mode 100644 index 0000000..472c672 --- /dev/null +++ b/groff-1.20.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ae1a46220aa94aaa229111057a56515293f1f3dfb471a29037b992025c11d9c +size 2842467 diff --git a/groff.changes b/groff.changes index 977b48e..aca24de 100644 --- a/groff.changes +++ b/groff.changes @@ -1,3 +1,38 @@ +------------------------------------------------------------------- +Thu Oct 7 09:33:18 UTC 2010 - mvyskocil@suse.cz + +- fix bnc#644467: SuSEconfig.groff overwrites /etc/papersize + use the check_md5_and_move to prevent it +- deprecation warning for GROFF* variables in /etc/sysconfig/suseconfig + +------------------------------------------------------------------- +Tue Oct 5 12:25:28 UTC 2010 - mvyskocil@suse.cz + +- fix bnc#633128: Update groff to 1.20.1 + this update obsoletes a big number of SUSE patches + * groff_1.18.1.1-1-debian.diff.bz2 - adds Japanese support, which is now + upstreamed. However new groff_1.20.1-10.debian.diff has been added + * suse.patch - not needed + * pic-html.patch - probably not needed + * gcc4.patch - already fixed by upstream + * groff-1.17.2-gcc3.patch - seems not needed + * utf8.patch - http://www.mail-archive.com/groff@gnu.org/msg05273.html says + iconv hack is no longer needed, new version uses preconv + * debian-fix.patch - already fixed by upstream + * double-free.patch - already fixed by upstream + * groffer-security.patch - in debian diff + * groff-1.18.1.1-gcc41.patch - already fixed by upstream + * bugzilla-217106-too-few-arguments-in-function-call.patch - makes sense + only with ENABLE_MULTIBYTE, which was added by old debian diff + * bugzilla-292412-special-encoding-handling-also-for-chinese.patch - seems not necessary + * gcc43.patch - already fixed by upstream + * fgets-overflow.patch - already fixed by upstream + * bnc446710.patch - seems not needed anymore + * groff-1.18.1.1-debian-538330.patch - part of debian diff +- fix bnc#643083 - groff: default /etc/papersize should be "a4" + no "papersize a4" without SuSEconfig anymore +- move docs and examples to groff-docs subpackage + ------------------------------------------------------------------- Wed Oct 14 13:48:20 UTC 2009 - mvyskocil@suse.cz diff --git a/groff.spec b/groff.spec index 5967d7e..5718b03 100644 --- a/groff.spec +++ b/groff.spec @@ -1,7 +1,7 @@ # -# spec file for package groff (Version 1.18.1.1) +# spec file for package groff (Version 1.20.1) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 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 @@ -19,44 +19,38 @@ Name: groff -BuildRequires: bison fdupes gcc-c++ -%define build_groff_docu 1 -# -License: BSD 3-clause (or similar) ; GPL v2 or later +License: BSD3c(or similar) ; GPLv2+ Group: Productivity/Publishing/Troff -Provides: normal-groff, jgroff -Obsoletes: jgroff -PreReq: %fillup_prereq %install_info_prereq -AutoReqProv: on -Version: 1.18.1.1 -Release: 171 +Version: 1.20.1 +Release: 1 Summary: GNU troff Document Formatting System Url: http://www.gnu.org/software/groff/groff.html -# cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/groff co groff -Source0: ftp://ftp.gnu.org/gnu/groff/groff-1.18.1.1.tar.bz2 +Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.bz2 Source1: SuSEconfig.groff Source2: sysconfig.suseconfig-groff Source3: zzz-groff.sh Source4: zzz-groff.csh -Patch0: groff_1.18.1.1-1-debian.diff.bz2 -Patch1: suse.patch -Patch2: pic-html.patch -Patch3: gcc4.patch -Patch4: groff-1.17.2-gcc3.patch -Patch5: utf8.patch -Patch6: debian-fix.patch -Patch7: double-free.patch -Patch8: groffer-security.patch -Patch9: groff-1.18.1.1-gcc41.patch -Patch10: bugzilla-217106-too-few-arguments-in-function-call.patch -Patch11: bugzilla-292412-special-encoding-handling-also-for-chinese.patch -Patch12: gcc43.patch -Patch13: fgets-overflow.patch -Patch14: groff-1.18.1.1-destbufferoverflow.patch -Patch446710: bnc446710.patch -Patch540600: nroff-empty-LANGUAGE-fix.diff -Patch15: groff-1.18.1.1-debian-538330.patch +# for file in `cat series | grep -v '^#' | grep '^[a-z]' ` do +# cat $file >> groff_1.20.1-10.debian.diff +# done +Patch0: groff_1.20.1-10.debian.diff +Patch1: groff-1.20.1-destbufferoverflow.patch +Patch2: groff-1.20.1-nroff-empty-LANGUAGE.patch +Patch3: groff-1.20.1-groffer-libexecdir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: gcc-c++ +BuildRequires: bison +BuildRequires: fdupes +Provides: normal-groff = %{version}-%{release} +Provides: jgroff = %{version}-%{release} +Obsoletes: jgroff < %{version} +Requires(pre): %fillup_prereq +Requires(pre): %install_info_prereq +AutoReqProv: on +# for pre-grohtml and pdfroff +Recommends: netpbm +Recommends: ghostscript-library +Recommends: pssutils %description The groff package provides compatible versions of troff, nroff, eqn, @@ -68,7 +62,24 @@ PostScript(tm) format for printing on a PostScript(tm) printer. Most programs store their man pages in either /usr/share/man/ or /usr/X11R6/man/. +Authors: +-------- + James Clark +%package doc +License: BSD3c(or similar) ; GPLv2+ +Group: Productivity/Publishing/Troff +Summary: HTML documentation and examples for groff + +%description doc +The groff package provides compatible versions of troff, nroff, eqn, +tbl, and other Unix text formatting utilities. + +Groff is used to "compile" man pages stored in groff or nroff format +for different output devices, for example, displaying to a screen or in +PostScript(tm) format for printing on a PostScript(tm) printer. Most +programs store their man pages in either /usr/share/man/ or +/usr/X11R6/man/. Authors: -------- @@ -77,28 +88,11 @@ Authors: %prep %setup -q -n groff-%{version} %patch0 -p1 -b .debian -%patch1 -p1 -b .suse -%patch2 -p1 -b .pic-html -%patch3 -p1 -b .gcc4 -%patch4 -p1 -b .gcc3 -%patch5 -p1 -b .utf-8 -%patch6 -p1 -b .debian-fix -%patch7 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p0 -%patch13 -p0 -%patch14 -%patch446710 -p1 -%patch540600 -p1 -%patch15 -p1 -b .debian-538330 +%patch1 +%patch2 -p1 -b .bnc540600 +%patch3 -p1 -b .groffer-libexecdir %build -# remove empty backups -rm -f ChangeLog.jp.debian README.jp.debian -# PATH=$PWD/src/roff/troff:$PWD/src/preproc/pic:$PWD/src/preproc/eqn:$PWD/src/preproc/tbl:$PWDsrc/preproc/refer:$PWD/src/preproc/soelim:$PATH PATH=$PWD/src/roff/grog:$PWD/src/roff/groff:$PWD/src/devices/grops:$PWD/src/devices/grotty:$PWD/src/devices/grodvi:$PWD/src/devices/grohtml:$PATH GROFF_COMMAND_PREFIX= @@ -108,53 +102,45 @@ export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH # #libtoolize --force #autoreconf --force --install -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" INSTALL_PROGRAM='${INSTALL}' -./configure --prefix=/usr --mandir=%{_mandir} --infodir=%{_infodir} --enable-multibyte -make -%if %{build_groff_docu} +export CFLAGS="-fno-strict-aliasing" +export CXXFLAGS="-fno-strict-aliasing" +%{configure} +%{__make} pushd doc - #echo "papersize a4" > /etc/papersize - make + %{__make} makeinfo groff.texinfo popd -%endif %install -if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then - install -d -m755 $RPM_BUILD_ROOT -fi -mkdir -p $RPM_BUILD_ROOT/usr/share -mkdir -p $RPM_BUILD_ROOT/etc -mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/groff -make install manroot=$RPM_BUILD_ROOT%{_mandir} prefix=$RPM_BUILD_ROOT/usr docdir=$RPM_BUILD_ROOT%{_defaultdocdir}/groff infodir=$RPM_BUILD_ROOT/usr/share/info -%if %{build_groff_docu} -install -c -m0444 doc/*.ps $RPM_BUILD_ROOT%{_defaultdocdir}/groff -#install -c -m0444 doc/*.html $RPM_BUILD_ROOT%{_defaultdocdir}/groff -install -c -m0444 doc/*.png $RPM_BUILD_ROOT%{_defaultdocdir}/groff -install -c -m0444 BUG* COPYING ChangeLog* INSTALL* MORE* NEWS PROBLEMS PROJECTS README* REVISION TODO VERSION $RPM_BUILD_ROOT%{_defaultdocdir}/groff -%endif -mkdir -p $RPM_BUILD_ROOT%{_infodir} -install -c -m 444 doc/groff doc/groff-[0-9]* $RPM_BUILD_ROOT%{_infodir} -ln -sf eqn $RPM_BUILD_ROOT/usr/bin/geqn -ln -sf tbl $RPM_BUILD_ROOT/usr/bin/gtbl -mkdir -p $RPM_BUILD_ROOT/sbin/conf.d -mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates -install -c -m0755 $RPM_SOURCE_DIR/SuSEconfig.groff $RPM_BUILD_ROOT/sbin/conf.d/ -install -c -m0644 $RPM_SOURCE_DIR/sysconfig.suseconfig-groff $RPM_BUILD_ROOT/var/adm/fillup-templates/ -echo "papersize a4" > $RPM_BUILD_ROOT/etc/papersize -chmod 0644 $RPM_BUILD_ROOT/etc/papersize +%{makeinstall} docdir=%{_defaultdocdir}/%{name} +%{__rm} -f %{buildroot}%{_infodir}/dir + +# documentation +%{__cp} -pr BUG-REPORT ChangeLog* COPYING FDL LICENSES MANIFEST MORE.STUFF NEWS PROBLEMS PROJECTS README README.MinGW REVISION VERSION doc/*ps \ + %{buildroot}/%{_defaultdocdir}/%{name}/ + +# compat symlinks +%{__ln_s} -f eqn %{buildroot}%{_bindir}/geqn +%{__ln_s} -f tbl %{buildroot}%{_bindir}/gtbl + +# SUSEconfig stuff +%{__install} -d -m 0755 %{buildroot}/sbin/conf.d +%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/adm/fillup-templates +%{__install} -m 0755 %{SOURCE1} %{buildroot}/sbin/conf.d/ +%{__install} -m 0644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/ + +%{__install} -d -m 0755 %{buildroot}%{_sysconfdir} +echo "a4" > %{buildroot}%{_sysconfdir}/papersize +%{__chmod} 0644 %{buildroot}%{_sysconfdir}/papersize + # install profiles to disable the use of ANSI colour sequences by default: -mkdir -p $RPM_BUILD_ROOT/etc/profile.d -install -m 644 $RPM_SOURCE_DIR/zzz-groff.sh $RPM_BUILD_ROOT/etc/profile.d -install -m 644 $RPM_SOURCE_DIR/zzz-groff.csh $RPM_BUILD_ROOT/etc/profile.d -pushd $RPM_BUILD_ROOT/usr/share/groff - test -d 1.18.1 || exit 1 - ln -s 1.18.1 current -popd -%fdupes $RPM_BUILD_ROOT +%{__install} -d -m 0755 %{buildroot}/%{_sysconfdir}/profile.d +%{__install} -m 644 %{SOURCE3} %{SOURCE4} %{buildroot}/%{_sysconfdir}/profile.d/ + +%fdupes -s %{buildroot} %clean -#[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; +rm -rf %{buildroot} %post %{fillup_only -an suseconfig} @@ -166,32 +152,25 @@ popd %files %defattr(-, root, root) %dir %{_defaultdocdir}/groff -%doc %{_defaultdocdir}/groff/* +%doc %{_defaultdocdir}/groff/ +%exclude %{_defaultdocdir}/groff/html +%exclude %{_defaultdocdir}/groff/examples %doc %{_infodir}/groff* -/usr/bin/* %doc %{_mandir}/man?/* -%config(noreplace) %verify(not md5 size mtime) /etc/papersize -%config /etc/profile.d/zzz-groff.*sh -%dir /usr/share/groff/ -%dir /usr/share/groff/site-tmac/ -/usr/share/groff/site-tmac/* -/usr/share/groff/current -%dir /usr/share/groff/1.18.1/ -/usr/share/groff/1.18.1/eign -%dir /usr/share/groff/1.18.1/font/ -/usr/share/groff/1.18.1/font/* -%dir /usr/share/groff/1.18.1/tmac/ -/usr/share/groff/1.18.1/tmac/*.tmac -/usr/share/groff/1.18.1/tmac/*rc* -/usr/share/groff/1.18.1/tmac/hyphen.us -%dir /usr/share/groff/1.18.1/tmac/mdoc/ -/usr/share/groff/1.18.1/tmac/mdoc/* -%dir /usr/share/groff/1.18.1/tmac/mm/ -/usr/share/groff/1.18.1/tmac/mm/*cov -/usr/share/groff/1.18.1/tmac/mm/*MT -%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/locale -%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/se_locale -/sbin/conf.d/SuSEconfig.groff -/var/adm/fillup-templates/sysconfig.suseconfig-groff +%{_bindir}/* +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/papersize +%config %{_sysconfdir}/profile.d/zzz-%{name}.*sh +%{_datadir}/%{name} +%{_libexecdir}/%{name} +#%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/locale +#%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/se_locale +/sbin/conf.d/SuSEconfig.%{name} +%{_localstatedir}/adm/fillup-templates/sysconfig.suseconfig-%{name} + +%files doc +%defattr(-, root, root) +%dir %{_defaultdocdir}/groff +%doc %{_defaultdocdir}/groff/html +%doc %{_defaultdocdir}/groff/examples %changelog diff --git a/groff_1.18.1.1-1-debian.diff.bz2 b/groff_1.18.1.1-1-debian.diff.bz2 deleted file mode 100644 index 1e3a491..0000000 --- a/groff_1.18.1.1-1-debian.diff.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79af1331031b9ce963413950d29626270d2deb1ae6a474b2b25bea801e691c2b -size 96274 diff --git a/groff_1.20.1-10.debian.diff b/groff_1.20.1-10.debian.diff new file mode 100644 index 0000000..bee9635 --- /dev/null +++ b/groff_1.20.1-10.debian.diff @@ -0,0 +1,1014 @@ +Description: Use mktemp in groffer to eliminate a race condition + This was forwarded in + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=278265#12 and addressed + differently, but it would still be much better to use mktemp if available. +Origin: vendor, https://bugzilla.redhat.com/show_bug.cgi?id=136313 +Author: Mark Cox +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/278265 +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/contrib/groffer/shell/groffer2.sh +=================================================================== +--- a/contrib/groffer/shell/groffer2.sh ++++ b/contrib/groffer/shell/groffer2.sh +@@ -5222,28 +5222,7 @@ + _TMP_DIR="${mi_dir}"'/'; + ;; + esac; +- _TMP_DIR="${_TMP_DIR}groffer${_PROCESS_ID}"; +- if obj _TMP_DIR rm_tree +- then +- : +- else +- mi_tdir_="${_TMP_DIR}"_; +- mi_n=1; +- mi_tdir_n="${mi_tdir_}${mi_n}"; +-### main_init() +- while obj mi_tdir_n is_existing +- do +- if obj mi_tdir_n rm_tree +- then +- # directory could not be removed +- mi_n="$(expr "${mi_n}" + 1)"; +- mi_tdir_n="${mi_tdir_}${mi_n}"; +- continue; +- fi; +- done; +- _TMP_DIR="${mi_tdir_n}"; +- fi; +- eval mkdir "${_TMP_DIR}"; ++ _TMP_DIR="$(mktemp -d "${_TMP_DIR}groffer.XXXXXX")"; + if is_not_equal "$?" 0 + then + obj _TMP_DIR rm_tree; +Description: Fix temporary file handling vulnerabilities in pdfroff +Origin: vendor, http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/groff/groff-1.20.1-owl-tmp.diff +Bug-Debian: http://bugs.debian.org/538330 +Forwarded: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538330#8 +Last-Update: 2010-03-01 + +Index: b/contrib/pdfmark/pdfroff.man +=================================================================== +--- a/contrib/pdfmark/pdfroff.man ++++ b/contrib/pdfmark/pdfroff.man +@@ -529,7 +529,7 @@ + .B GROFF_TMPDIR + Identifies the directory in which + .B pdfroff +-should create temporary files. ++should create a subdirectory for its temporary files. + If + .B \%GROFF_TMPDIR + is +@@ -541,7 +541,8 @@ + .B TEMP + are considered in turn, as possible temporary file repositories. + If none of these are set, then temporary files are created +-in the current directory. ++in a subdirectory of ++.BR /tmp . + . + .TP + .B GROFF_GHOSTSCRIPT_INTERPRETER +Index: b/contrib/pdfmark/pdfroff.sh +=================================================================== +--- a/contrib/pdfmark/pdfroff.sh ++++ b/contrib/pdfmark/pdfroff.sh +@@ -137,7 +137,15 @@ + # + # Set up temporary/intermediate file locations. + # +- WRKFILE=${GROFF_TMPDIR=${TMPDIR-${TMP-${TEMP-"."}}}}/pdf$$.tmp ++ MYTMPDIR=${GROFF_TMPDIR-${TMPDIR-${TMP-${TEMP-"/tmp"}}}} ++ WRKDIR="`unset TMPDIR && mktemp -dp "$MYTMPDIR" groff-pdfroff.XXXXXXXXXX`" || exit ++ ++ trap 'rm -rf -- "$WRKDIR"' EXIT ++ trap 'trap - EXIT; rm -rf -- "$WRKDIR"; exit 1' HUP INT QUIT PIPE TERM ++ ++ GROFF_TMPDIR=${WRKDIR} ++ ++ WRKFILE=${GROFF_TMPDIR}/pdf$$.tmp + # + REFCOPY=${GROFF_TMPDIR}/pdf$$.cmp + REFFILE=${GROFF_TMPDIR}/pdf$$.ref +@@ -146,11 +154,6 @@ + TC_DATA=${GROFF_TMPDIR}/pdf$$.tc + BD_DATA=${GROFF_TMPDIR}/pdf$$.ps + # +-# Set a trap, to delete temporary files on exit. +-# (FIXME: may want to include other signals, in released version). +-# +- trap "rm -f ${GROFF_TMPDIR}/pdf$$.*" 0 +-# + # Initialise 'groff' format control settings, + # to discriminate table of contents and document body formatting passes. + # +Description: Use -dSAFER when calling gs from pdfroff +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/538338 +Forwarded: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538338#8 +Last-Update: 2010-03-01 + +Index: b/contrib/pdfmark/pdfroff.man +=================================================================== +--- a/contrib/pdfmark/pdfroff.man ++++ b/contrib/pdfmark/pdfroff.man +@@ -521,7 +521,7 @@ + .IP + .I + .ad l +-.NH gs \-dBATCH \-dQUIET \-dNOPAUSE \-sDEVICE=pdfwrite \-sOutputFile=\- ++.NH gs \-dBATCH \-dQUIET \-dNOPAUSE \-dSAFER \-sDEVICE=pdfwrite \-sOutputFile=\- + .ad + .RE + . +Index: b/contrib/pdfmark/pdfroff.sh +=================================================================== +--- a/contrib/pdfmark/pdfroff.sh ++++ b/contrib/pdfmark/pdfroff.sh +@@ -600,7 +600,7 @@ + $SAY >&2 $n "Writing PDF output ..$c" + if test -z "$PDFROFF_POSTPROCESSOR_COMMAND" + then +- PDFROFF_POSTPROCESSOR_COMMAND="$GS -dQUIET -dBATCH -dNOPAUSE ++ PDFROFF_POSTPROCESSOR_COMMAND="$GS -dQUIET -dBATCH -dNOPAUSE -dSAFER + -sDEVICE=pdfwrite -sOutputFile="${PDF_OUTPUT-"-"} + + elif test -n "$PDF_OUTPUT" +Description: Remove unnecessary bashisms from gdiffmk +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/547750 +Forwarded: http://lists.gnu.org/archive/html/bug-groff/2009-09/msg00003.html +Last-Update: 2010-03-01 + +Index: b/contrib/gdiffmk/gdiffmk.sh +=================================================================== +--- a/contrib/gdiffmk/gdiffmk.sh ++++ b/contrib/gdiffmk/gdiffmk.sh +@@ -21,7 +21,7 @@ + + cmd=$( basename $0 ) + +-function Usage { ++Usage () { + if test "$#" -gt 0 + then + echo >&2 "${cmd}: $@" +@@ -60,7 +60,7 @@ + } + + +-function Exit { ++Exit () { + exitcode=$1 + shift + for arg +@@ -75,7 +75,7 @@ + # + # Check for existence and readability of given file name. + # If not found or not readable, print message and exit with EXIT_CODE. +-function FileRead { ++FileRead () { + case "$2" in + -) + return +@@ -97,7 +97,7 @@ + # + # Create the given filename if it doesn't exist. + # If unable to create or write, print message and exit with EXIT_CODE. +-function FileCreate { ++FileCreate () { + case "$2" in + -) + return +@@ -115,7 +115,7 @@ + fi + } + +-function WouldClobber { ++WouldClobber () { + case "$2" in + -) + return +@@ -136,7 +136,7 @@ + MARK1='[[' + MARK2=']]' + +-function RequiresArgument { ++RequiresArgument () { + # Process flags that take either concatenated or + # separated values. + case "$1" in +Description: Use POSIX-compliant 'trap' arguments +Author: David Weinehall +Author: Colin Watson +Forwarded: http://lists.gnu.org/archive/html/bug-groff/2010-02/msg00005.html +Last-Update: 2010-03-01 + +Index: b/contrib/eqn2graph/eqn2graph.sh +=================================================================== +--- a/contrib/eqn2graph/eqn2graph.sh ++++ b/contrib/eqn2graph/eqn2graph.sh +@@ -75,7 +75,7 @@ + { (exit 1); exit 1; } + fi + +-trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 ++trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' EXIT INT TERM + + # Here goes: + # 1. Add .EQ/.EN. +Index: b/contrib/grap2graph/grap2graph.sh +=================================================================== +--- a/contrib/grap2graph/grap2graph.sh ++++ b/contrib/grap2graph/grap2graph.sh +@@ -71,7 +71,7 @@ + { (exit 1); exit 1; } + fi + +-trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 ++trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' EXIT INT TERM + + # Here goes: + # 1. Add .G1/.G2. +Index: b/contrib/pic2graph/pic2graph.sh +=================================================================== +--- a/contrib/pic2graph/pic2graph.sh ++++ b/contrib/pic2graph/pic2graph.sh +@@ -86,7 +86,7 @@ + { (exit 1); exit 1; } + fi + +-trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 ++trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' EXIT INT TERM + + # Here goes: + # 1. Wrap the input in dummy .PS/PE macros (and add possibly null .EQ/.EN) +Description: The *2graph scripts use $RANDOM, which is bash-specific +Author: Colin Watson +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/contrib/eqn2graph/eqn2graph.sh +=================================================================== +--- a/contrib/eqn2graph/eqn2graph.sh ++++ b/contrib/eqn2graph/eqn2graph.sh +@@ -1,4 +1,4 @@ +-#! /bin/sh ++#! /bin/bash + # + # eqn2graph -- compile EQN equation descriptions to bitmap images + # +Index: b/contrib/grap2graph/grap2graph.sh +=================================================================== +--- a/contrib/grap2graph/grap2graph.sh ++++ b/contrib/grap2graph/grap2graph.sh +@@ -1,4 +1,4 @@ +-#! /bin/sh ++#! /bin/bash + # + # grap2graph -- compile graph description descriptions to bitmap images + # +Index: b/contrib/pic2graph/pic2graph.sh +=================================================================== +--- a/contrib/pic2graph/pic2graph.sh ++++ b/contrib/pic2graph/pic2graph.sh +@@ -1,4 +1,4 @@ +-#! /bin/sh ++#! /bin/bash + # + # pic2graph -- compile PIC image descriptions to bitmap images + # +Description: Avoid relying on awk in mdate.sh + The results were unpredictable on mips/mipsel. +Author: Florian Lohoff +Bug-Debian: http://bugs.debian.org/62554 +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/mdate.sh +=================================================================== +--- a/mdate.sh ++++ b/mdate.sh +@@ -20,41 +20,4 @@ + # + # Print the modification date of $1 `nicely'. + +-# Don't want foreign dates. +- +-LANGUAGE= +-LC_ALL=C; export LC_ALL +- +- +-(date; +-if ls -L /dev/null 1>/dev/null 2>&1; then ls -L -l $1; else ls -l $1; fi +-) | awk ' +-BEGIN { +- full["Jan"] = "January"; number["Jan"] = 1; +- full["Feb"] = "February"; number["Feb"] = 2; +- full["Mar"] = "March"; number["Mar"] = 3; +- full["Apr"] = "April"; number["Apr"] = 4; +- full["May"] = "May"; number["May"] = 5; +- full["Jun"] = "June"; number["Jun"] = 6; +- full["Jul"] = "July"; number["Jul"] = 7; +- full["Aug"] = "August"; number["Aug"] = 8; +- full["Sep"] = "September"; number["Sep"] = 9; +- full["Oct"] = "October"; number["Oct"] = 10; +- full["Nov"] = "November"; number["Nov"] = 11; +- full["Dec"] = "December"; number["Dec"] = 12; +-} +- +-NR == 1 { +- month = $2; +- year = $NF; +-} +- +-NR == 2 { +- if ($(NF-1) ~ /:/) { +- if (number[$(NF-3)] > number[month]) +- year--; +- } +- else +- year = $(NF-1); +- print $(NF-2), full[$(NF-3)], year +-}' ++perl -MPOSIX -le 'print strftime("%d %B %Y", localtime((stat $ARGV[0])[9]))' $1 +Description: Unset IFS at nroff startup + It's questionable whether we should forward this; as noted in the bug + trail, there's a decent argument that this is a dash bug. +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/541621 +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/src/roff/nroff/nroff.sh +=================================================================== +--- a/src/roff/nroff/nroff.sh ++++ b/src/roff/nroff/nroff.sh +@@ -22,6 +22,8 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + ++unset IFS ++ + prog="$0" + + # Default device. +Description: '+' isn't a regex metacharacter in sed by default + Why are we only doing this for devascii? Probably a bug one way or + another, but needs review before forwarding. +Author: Fumitoshi UKAI +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/font/devascii/Makefile.sub +=================================================================== +--- a/font/devascii/Makefile.sub ++++ b/font/devascii/Makefile.sub +@@ -12,8 +12,8 @@ + @-rm -f $@ + @(charwidth=`expr $(RES) / $(CPI)` ; \ + sed -e "s/^name [A-Z]*$$/name $@/" \ +- -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \ +- -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \ ++ -e "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \ ++ -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \ + -e "s/^internalname .*$$/internalname $@/" \ + -e "/^internalname/s/BI/3/" \ + -e "/^internalname/s/B/2/" \ +Description: Adjust #! line of font/devlj4/generate/special.awk + awk is in /usr/bin/awk on Debian, not /bin/awk. +Author: Colin Watson +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/font/devlj4/generate/special.awk +=================================================================== +--- a/font/devlj4/generate/special.awk ++++ b/font/devlj4/generate/special.awk +@@ -1,4 +1,4 @@ +-#! /bin/awk -f ++#! /usr/bin/awk -f + + # Correct Intellifont-based height metrics for several glyphs in + # special font for TrueType CG Times (LaserJet 4000 and later). +Description: Set appropriate papersize when calling gs from HTML preprocessor + This patch seems fishy. get_papersize was removed upstream in r335.1.348, + so should we even be applying this any more? Furthermore, we don't use + gsPaper anywhere, and looking at devps/DESC here is just nasty. Needs + review. +Author: Colin Watson +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/src/preproc/html/pre-html.cpp +=================================================================== +--- a/src/preproc/html/pre-html.cpp ++++ b/src/preproc/html/pre-html.cpp +@@ -152,6 +152,10 @@ + #define DEFAULT_IMAGE_RES 100 // number of pixels per inch resolution + #define IMAGE_BOARDER_PIXELS 0 + #define INLINE_LEADER_CHAR '\\' ++#define A4_LENGTH 841890 // taken from devps/Makefile.sub ++#define LETTER_LENGTH 792000 // taken from devps/Makefile.sub ++#define A4_OFFSET 0 ++#define LETTER_OFFSET 50 // 50/72 of an inch + + // Don't use colour names here! Otherwise there is a dependency on + // a file called `rgb.txt' which maps names to colours. +@@ -199,6 +203,7 @@ + // by -D + static int troff_arg = 0; // troff arg index + static char *image_dir = NULL; // user specified image directory ++static char *gsPaper = NULL; // the paper size that gs must use + static int textAlphaBits = MAX_ALPHA_BITS; + static int graphicAlphaBits = MAX_ALPHA_BITS; + static char *antiAlias = NULL; // antialias arguments we pass to gs +@@ -312,6 +317,54 @@ + } + + /* ++ * get_papersize - returns an integer determining the paper length from ++ * devps/DESC ++ */ ++ ++static int get_papersize (void) ++{ ++ char *pathp; ++ FILE *f; ++ int res; ++ f = font_path.open_file("devps/DESC", &pathp); ++ if (f == 0) ++ fatal("can't open devps/DESC"); ++ while (get_line(f)) { ++ int n = sscanf(linebuf, "paperlength %d", &res); ++ if (n >= 1) { ++ fclose(f); ++ return res; ++ } ++ if (!strncmp(linebuf, "papersize", 9)) { ++ double length; ++ char *p = linebuf + 9; ++ while (*p == ' ' || *p == '\t') ++ p++; ++ for (p = strtok(p, " \t"); p; p = strtok(0, " \t")) { ++ if (font::scan_papersize(p, 0, &length, 0)) { ++ fclose(f); ++ return int(length * postscriptRes + 0.5); ++ } ++ } ++ fatal("bad argument to `papersize' keyword in devps/DESC"); ++ } ++ } ++ fatal("can't find `papersize' or `paperlength' keyword in devps/DESC"); ++ return 0; ++} ++ ++/* ++ * determine_vertical_offset - works out the default vertical offset from ++ * the page length ++ */ ++ ++static void determine_vertical_offset (void) ++{ ++ vertical_offset = ((A4_LENGTH-get_papersize())*72)/postscriptRes; ++ gsPaper = "-sPAPERSIZE=a4"; ++} ++ ++/* + * html_system - A wrapper for system(). + */ + +@@ -1781,6 +1834,7 @@ + if (image_gen == NULL || (strcmp(image_gen, "") == 0)) + fatal("devhtml/DESC must set the image_generator field, exiting"); + postscriptRes = get_resolution(); ++ determine_vertical_offset(); + i = scanArguments(argc, argv); + setupAntiAlias(); + checkImageDir(); +Description: Call `ec' before mapping characters +Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/groff/main/revision/1822 +Forwarded: yes +Last-Update: 2010-03-01 + +Index: b/tmac/doc.tmac +=================================================================== +--- a/tmac/doc.tmac ++++ b/tmac/doc.tmac +@@ -6425,6 +6425,9 @@ + .blm doc-empty-line + . + . ++.ec ++. ++. + .\" For UTF-8, map some characters conservatively for the sake + .\" of easy cut and paste. + . +@@ -6438,9 +6441,6 @@ + .\} + . + . +-.ec +-. +-. + .\" load local modifications + .mso mdoc.local + . +Description: Update mdoc for newer FreeBSD and POSIX versions +Author: Colin Watson +Forwarded: http://lists.gnu.org/archive/html/bug-groff/2010-02/msg00007.html +Last-Update: 2010-03-01 + +Index: b/tmac/doc-common +=================================================================== +--- a/tmac/doc-common ++++ b/tmac/doc-common +@@ -504,6 +504,9 @@ + .ds doc-operating-system-FreeBSD-6.4 6.4 + .ds doc-operating-system-FreeBSD-7.0 7.0 + .ds doc-operating-system-FreeBSD-7.1 7.1 ++.ds doc-operating-system-FreeBSD-7.2 7.2 ++.ds doc-operating-system-FreeBSD-7.3 7.3 ++.ds doc-operating-system-FreeBSD-8.0 8.0 + . + .ds doc-operating-system-Darwin-8.0.0 8.0.0 + .ds doc-operating-system-Darwin-8.1.0 8.1.0 +Index: b/tmac/doc-syms +=================================================================== +--- a/tmac/doc-syms ++++ b/tmac/doc-syms +@@ -637,6 +637,8 @@ + .as doc-str-St--p1003.1-2001 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) + .ds doc-str-St--p1003.1-2004 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2004 + .as doc-str-St--p1003.1-2004 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) ++.ds doc-str-St--p1003.1-2008 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2008 ++.as doc-str-St--p1003.1-2008 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) + . + .\" POSIX Part 2: Shell and Utilities + .ds doc-str-St--p1003.2 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2 +Index: b/tmac/groff_mdoc.man +=================================================================== +--- a/tmac/groff_mdoc.man ++++ b/tmac/groff_mdoc.man +@@ -870,7 +870,7 @@ + 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1, + 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1, + 4.1.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.6.2, 4.7, 4.8, 4.9, 4.10, 4.11, 5.0, 5.1, +-5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1 ++5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1, 7.2, 7.3, 8.0 + .It DragonFly + 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0 + .It Darwin +@@ -1974,6 +1974,8 @@ + .St -p1003.1-2001 + .It Li \-p1003.1\-2004 + .St -p1003.1-2004 ++.It Li \-p1003.1\-2008 ++.St -p1003.1-2008 + .El + .Pp + . +Description: Add GFDL references to manual pages licensed under GFDL +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/292229 +Forwarded: not-needed +Last-Update: 2010-03-01 + +Index: b/contrib/mom/groff_mom.man +=================================================================== +--- a/contrib/mom/groff_mom.man ++++ b/contrib/mom/groff_mom.man +@@ -14,6 +14,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + .do nr groff_mom_C \n[.C] + .cp 0 +Index: b/man/ditroff.man +=================================================================== +--- a/man/ditroff.man ++++ b/man/ditroff.man +@@ -17,6 +17,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + . + .\" -------------------------------------------------------------------- +Index: b/man/groff.man +=================================================================== +--- a/man/groff.man ++++ b/man/groff.man +@@ -19,6 +19,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + .\" -------------------------------------------------------------------- + .\" Setup +Index: b/man/groff_char.man +=================================================================== +--- a/man/groff_char.man ++++ b/man/groff_char.man +@@ -32,6 +32,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + .\" -------------------------------------------------------------------- + .\" Setup Part 1 +Index: b/man/groff_diff.man +=================================================================== +--- a/man/groff_diff.man ++++ b/man/groff_diff.man +@@ -22,6 +22,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + . + .\" -------------------------------------------------------------------- +Index: b/man/groff_out.man +=================================================================== +--- a/man/groff_out.man ++++ b/man/groff_out.man +@@ -19,6 +19,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + .\" -------------------------------------------------------------------- + .\" Setup +Index: b/man/groff_tmac.man +=================================================================== +--- a/man/groff_tmac.man ++++ b/man/groff_tmac.man +@@ -19,6 +19,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + .ds Ellipsis \&.\|.\|.\&\" + . + .TH GROFF_TMAC @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@" +Index: b/man/roff.man +=================================================================== +--- a/man/roff.man ++++ b/man/roff.man +@@ -18,6 +18,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + . + .\" -------------------------------------------------------------------- +Index: b/src/roff/groff/groff.man +=================================================================== +--- a/src/roff/groff/groff.man ++++ b/src/roff/groff/groff.man +@@ -14,6 +14,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff-base/copyright. ++.. + . + . + .\" -------------------------------------------------------------------- +Index: b/src/roff/troff/troff.man +=================================================================== +--- a/src/roff/troff/troff.man ++++ b/src/roff/troff/troff.man +@@ -21,6 +21,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff-base/copyright. ++.. + . + .\" -------------------------------------------------------------------- + .\" Title +Index: b/tmac/groff_trace.man +=================================================================== +--- a/tmac/groff_trace.man ++++ b/tmac/groff_trace.man +@@ -21,6 +21,10 @@ + A copy of the Free Documentation License is included as a file called + FDL in the main directory of the groff source package. + .. ++.ig ++A copy of the GNU Free Documentation License is also available in this ++Debian package as /usr/share/doc/groff/copyright. ++.. + . + .ds Ellipsis .\|.\|.\&\" + . +Description: Adjust documentation references to account for compression +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/498356 +Forwarded: not-needed +Last-Update: 2010-03-01 + +Index: b/contrib/pdfmark/pdfroff.man +=================================================================== +--- a/contrib/pdfmark/pdfroff.man ++++ b/contrib/pdfmark/pdfroff.man +@@ -783,7 +783,7 @@ + in PDF format, in the reference guide + .BR "\*(lqPortable Document Format Publishing with GNU Troff\*(rq" , + included in the installed documentation set as +-.BR \%@PDFDOCDIR@/pdfmark.pdf . ++.BR \%@PDFDOCDIR@/pdfmark.pdf.gz . + . + . + .\" -------------------------------------------------------------------- +Index: b/src/preproc/pic/pic.man +=================================================================== +--- a/src/preproc/pic/pic.man ++++ b/src/preproc/pic/pic.man +@@ -227,7 +227,7 @@ + A complete documentation is available in the file + .LP + .RS +-.B @DOCDIR@/pic.ms ++.B @DOCDIR@/pic.ms.gz + .RE + . + .SS \*(tx mode +Description: Adjust default recursive make targets + This has been in the groff packaging since records began, and the reason + for it is unclear. Needs investigation. +Author: unknown +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -641,7 +641,7 @@ + fi + + do=all +-dodirs=$(ALLDIRS) dot ++dodirs=$(DISTDIRS) + # Default target for subdir_Makefile + subdir=src/roff/troff + +Description: Inhibit -wmac warnings due to pic and eqn + Define .PS and .PE to empty strings in pic output to inhibit -wmac + warnings; similarly, define .EQ and .EN to empty strings in eqn output. +Author: Colin Watson +Bug-Debian: http://bugs.debian.org/495713 +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/src/preproc/eqn/main.cpp +=================================================================== +--- a/src/preproc/eqn/main.cpp ++++ b/src/preproc/eqn/main.cpp +@@ -374,6 +374,8 @@ + } + init_table(device); + init_char_table(); ++ printf(".if !dEQ .ds EQ\n" ++ ".if !dEN .ds EN\n"); + if (output_format == troff) { + printf(".if !'\\*(.T'%s' " + ".if !'\\*(.T'html' " // the html device uses `-Tps' to render +Index: b/src/preproc/pic/main.cpp +=================================================================== +--- a/src/preproc/pic/main.cpp ++++ b/src/preproc/pic/main.cpp +@@ -612,7 +612,11 @@ + out = make_fig_output(); + else + #endif ++ { + out = make_troff_output(); ++ printf(".if !dPS .ds PS\n" ++ ".if !dPE .ds PE\n"); ++ } + #ifdef FIG_SUPPORT + if (whole_file_flag) { + if (optind >= argc) +Description: Handle ditroff command `Dt' without argument gracefully + Without this patch, grotty goes into an infinite loop if it tries to + process: + . + x T utf8 + x res 240 24 40 + x init + p1 + Dt +Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/groff/main/revision/1876 +Forwarded: yes +Last-Update: 2010-05-09 + +Index: b/src/libs/libdriver/input.cpp +=================================================================== +--- a/src/libs/libdriver/input.cpp ++++ b/src/libs/libdriver/input.cpp +@@ -3,13 +3,13 @@ + // /src/libs/libdriver/input.cpp + + /* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005, +- 2006, 2008, 2009 ++ 2006, 2008, 2009, 2010 + Free Software Foundation, Inc. + + Written by James Clark (jjc@jclark.com) + Major rewrite 2001 by Bernd Warken (bwarken@mayn.de) + +- Last update: 5 Jan 2009 ++ Last update: 9 May 2010 + + This file is part of groff, the GNU roff text processing system. + +@@ -790,7 +790,7 @@ + c = get_char(); + } + if (!isdigit((int) c)) +- error("integer argument expected"); ++ fatal("integer argument expected"); + while (isdigit((int) c)) { + buf.append(c); + c = get_char(); +@@ -879,6 +879,7 @@ + break; + default: + error("integer argument expected"); ++ done = true; + break; + } + } +@@ -946,7 +947,7 @@ + case '\n': + case EOF: + error("missing argument"); +- break; ++ return c; + default: // first essential character + return c; + } +Description: Allow adding a version-independent directory to the macro path + This allows us to put /usr/share/groff/tmac at the end of groff's macro + path in Debian. +Author: Colin Watson +Forwarded: no +Last-Update: 2010-03-01 + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -190,7 +190,11 @@ + # directory will be always added. + # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the + # current nor in the home directory. ++ifeq (,$(extratmacdirs)) + tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir) ++else ++tmacpath=$(systemtmacdir)$(RT_SEP)$(localtmacdir)$(RT_SEP)$(tmacdir)$(RT_SEP)$(extratmacdirs) ++endif + + # `sys_tmac_prefix' is prefix (if any) for system macro packages. + sys_tmac_prefix=@sys_tmac_prefix@ +Description: Use /etc/papersize in preference to configure-time selection +Author: Colin Watson +Forwarded: not-needed +Last-Update: 2010-03-01 + +Index: b/font/devdvi/Makefile.sub +=================================================================== +--- a/font/devdvi/Makefile.sub ++++ b/font/devdvi/Makefile.sub +@@ -16,8 +16,8 @@ + DESC: DESC.in + cat $(srcdir)/DESC.in >DESC + if test "$(PAGE)" = A4; then \ +- echo "papersize a4" >>DESC; \ ++ echo "papersize /etc/papersize a4" >>DESC; \ + else \ +- echo "papersize letter" >>DESC; \ ++ echo "papersize /etc/papersize letter" >>DESC; \ + fi + test -z '$(DVIPRINT)' || echo print '$(DVIPRINT)' >>DESC +Index: b/font/devlbp/Makefile.sub +=================================================================== +--- a/font/devlbp/Makefile.sub ++++ b/font/devlbp/Makefile.sub +@@ -13,9 +13,9 @@ + -rm -f DESC + cat $(srcdir)/DESC.in >>DESC + if test "$(PAGE)" = A4; then \ +- echo "papersize a4" >>DESC; \ ++ echo "papersize /etc/papersize a4" >>DESC; \ + else \ +- echo "papersize letter" >>DESC; \ ++ echo "papersize /etc/papersize letter" >>DESC; \ + fi + test -z '$(LBPPRINT)' || echo print '$(LBPPRINT)' >>DESC + +Index: b/font/devlj4/Makefile.sub +=================================================================== +--- a/font/devlj4/Makefile.sub ++++ b/font/devlj4/Makefile.sub +@@ -30,9 +30,9 @@ + echo "unitwidth `expr 7620000 / $(LJ4RES)`" >>DESC + cat $(srcdir)/DESC.in >>DESC + if test "$(PAGE)" = A4; then \ +- echo "papersize a4" >>DESC; \ ++ echo "papersize /etc/papersize a4" >>DESC; \ + else \ +- echo "papersize letter" >>DESC; \ ++ echo "papersize /etc/papersize letter" >>DESC; \ + fi + test -z '$(LJ4PRINT)' || echo print '$(LJ4PRINT)' >>DESC + +Index: b/font/devps/Makefile.sub +=================================================================== +--- a/font/devps/Makefile.sub ++++ b/font/devps/Makefile.sub +@@ -40,9 +40,9 @@ + cat $(srcdir)/DESC.in >DESC + echo broken $(BROKEN_SPOOLER_FLAGS) >>DESC + if test "$(PAGE)" = A4; then \ +- echo "papersize a4" >>DESC; \ ++ echo "papersize /etc/papersize a4" >>DESC; \ + else \ +- echo "papersize letter" >>DESC; \ ++ echo "papersize /etc/papersize letter" >>DESC; \ + fi + test -z '$(PSPRINT)' || echo print '$(PSPRINT)' >>DESC + +Description: Display more helpful output when failing to load a device + If the device is known to be one of the devices in the groff binary package + rather than groff-base, refer the user to that. +Author: Colin Watson +Forwarded: not-needed +Last-Update: 2010-03-01 + +Index: b/src/roff/groff/groff.cpp +=================================================================== +--- a/src/roff/groff/groff.cpp ++++ b/src/roff/groff/groff.cpp +@@ -323,8 +323,16 @@ + commands[PIC_INDEX].append_arg("-U"); + } + font::set_unknown_desc_command_handler(handle_unknown_desc_command); +- if (!font::load_desc()) +- fatal("invalid device `%1'", device); ++ if (!font::load_desc()) { ++ if (strcmp(device, "X100") == 0 || strcmp(device, "X100-12") == 0 || ++ strcmp(device, "X75") == 0 || strcmp(device, "X75-12") == 0 || ++ strcmp(device, "dvi") == 0 || strcmp(device, "html") == 0 || ++ strcmp(device, "lbp") == 0 || strcmp(device, "lj4") == 0) ++ fatal("invalid device `%1' (try installing the `groff' package?)", ++ device); ++ else ++ fatal("invalid device `%1'", device); ++ } + if (!postdriver) + fatal("no `postpro' command in DESC file for device `%1'", device); + if (predriver && !zflag) { diff --git a/groffer-security.patch b/groffer-security.patch deleted file mode 100644 index d8b17d1..0000000 --- a/groffer-security.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -ru groff-1.18.1.1/contrib/groffer/groffer.sh groff-1.18.1.1.new/contrib/groffer/groffer.sh ---- groff-1.18.1.1/contrib/groffer/groffer.sh 2004-06-15 03:44:50.000000000 +0200 -+++ groff-1.18.1.1.new/contrib/groffer/groffer.sh 2004-12-06 22:02:31.072260000 +0100 -@@ -3228,18 +3228,13 @@ - do - if is_not_empty "$d"; then - if obj d is_dir && obj d is_writable; then -- _TMP_DIR="${d}/${_PROGRAM_NAME}${_PROCESS_ID}"; -- if obj _TMP_DIR is_dir; then -- rm -f "${_TMP_DIR}"/*; -+ _TMP_DIR="`mktemp -d ${d}/${_PROGRAM_NAME}.XXXXXX`"; -+ if test $? = 0; then - break; - else -- mkdir "${_TMP_DIR}"; -- if obj _TMP_DIR is_not_dir; then -- _TMP_DIR=''; -- continue; -- fi; -- break; -- fi; -+ _TMP_DIR=''; -+ continue; -+ fi - fi; - if obj _TMP_DIR is_not_writable; then - _TMP_DIR=''; diff --git a/gxdview.changes b/gxditview.changes similarity index 79% rename from gxdview.changes rename to gxditview.changes index a137ef0..46ec906 100644 --- a/gxdview.changes +++ b/gxditview.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 6 12:41:24 UTC 2010 - mvyskocil@suse.cz + +- fix bnc#633128: Update groff to 1.20.1 +- rename to gxditview + ------------------------------------------------------------------- Sun Feb 11 12:01:27 CET 2007 - ro@suse.de diff --git a/gxditview.spec b/gxditview.spec new file mode 100644 index 0000000..102ce77 --- /dev/null +++ b/gxditview.spec @@ -0,0 +1,95 @@ +# +# spec file for package gxditview (Version 1.20.1) +# +# Copyright (c) 2010 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 http://bugs.opensuse.org/ +# + + + +Name: gxditview +License: MIT +Group: Productivity/Publishing/Troff +AutoReqProv: on +Version: 1.20.1 +Release: 1 +Summary: Ditroff Output Displayer for Groff +Url: http://www.gnu.org/software/groff/groff.html +Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.bz2 +Patch0: groff_1.20.1-10.debian.diff +Patch1: groff-1.20.1-destbufferoverflow.patch +Patch2: groff-1.20.1-nroff-empty-LANGUAGE.patch +Patch3: groff-1.20.1-groffer-libexecdir.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: gcc-c++ +BuildRequires: xorg-x11-devel +Requires: groff +Conflicts: jgxdview +Provides: gxdview = %{version}-%{release} +Obsoletes: gxdview < %{version} + +%description +This version of xditview is called gxditview and has some extensions +used by the groff command. gxditview is used by groff if called with +the -X option. + + + +Authors: +-------- + James Clark + +%prep +%setup -q -n groff-%{version} +%patch0 -p1 -b .debian +%patch1 -p0 -b .destbufferoverflow +%patch2 -p1 -b .bnc540600 +%patch3 -p1 -b .groffer-libexecdir + +%build +# remove empty backups +rm -f ChangeLog.jp.debian README.jp.debian +# +PATH=$PWD/src/roff/troff:$PWD/src/preproc/pic:$PWD/src/preproc/eqn:$PWD/src/preproc/tbl:$PWDsrc/preproc/refer:$PWD/src/preproc/soelim:$PATH +PATH=$PWD/src/roff/grog:$PWD/src/roff/groff:$PWD/src/devices/grops:$PWD/src/devices/grotty:$PWD/src/devices/grodvi:$PWD/src/devices/grohtml:$PATH +GROFF_COMMAND_PREFIX= +GROFF_FONT_PATH=$PWD +GROFF_TMAC_PATH=$PWD/tmac:$PWD/src/roff/troff +export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH +# +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" INSTALL_PROGRAM='${INSTALL}' +%{configure} +%{__make} + +%install +%{__install} -d -m 0755 %{buildroot}%{_bindir} +%{__install} -d -m 0755 %{buildroot}%{_datadir}/X11/app-defaults +%{__install} -d -m 0755 %{buildroot}%{_mandir}/man1/ + +pushd src/devices/xditview/ +%{__install} -m 0755 %{name} %{buildroot}%{_bindir} +%{__install} -m 0644 GXditview.ad %{buildroot}%{_datadir}/X11/app-defaults/GXditview +%{__install} -m 0644 %{name}.man %{buildroot}%{_mandir}/man1/%{name}.1 +popd + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root) +%doc src/devices/xditview/ChangeLog src/devices/xditview/README src/devices/xditview/TODO +%{_bindir}/%{name} +%doc %{_mandir}/man1/%{name}.1* +%config %{_datadir}/X11/app-defaults/GXditview + +%changelog diff --git a/gxdview.spec b/gxdview.spec deleted file mode 100644 index d662292..0000000 --- a/gxdview.spec +++ /dev/null @@ -1,119 +0,0 @@ -# -# spec file for package gxdview (Version 1.18.1.1) -# -# Copyright (c) 2009 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 http://bugs.opensuse.org/ -# - - - -Name: gxdview -BuildRequires: gcc-c++ xorg-x11-devel -License: GPL v2 or later -Group: Productivity/Publishing/Troff -AutoReqProv: on -Requires: groff -Conflicts: jgxdview -Version: 1.18.1.1 -Release: 212 -Summary: Ditroff Output Displayer for Groff -Url: http://www.gnu.org/software/groff/groff.html -Source0: ftp://ftp.gnu.org/gnu/groff/groff-1.18.1.1.tar.bz2 -Source1: SuSEconfig.groff -Source2: sysconfig.suseconfig-groff -Patch0: groff_1.18.1.1-1-debian.diff.bz2 -Patch1: suse.patch -Patch2: pic-html.patch -Patch3: gcc4.patch -Patch4: groff-1.17.2-gcc3.patch -Patch5: utf8.patch -Patch6: debian-fix.patch -Patch7: double-free.patch -Patch8: groffer-security.patch -Patch9: groff-1.18.1.1-gcc41.patch -Patch10: bugzilla-217106-too-few-arguments-in-function-call.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -%description -This version of xditview is called gxditview and has some extensions -used by the groff command. gxditview is used by groff if called with -the -X option. - - - -Authors: --------- - James Clark - -%prep -%setup -q -n groff-%{version} -%patch0 -p1 -b .debian -%patch1 -p1 -b .suse -%patch2 -p1 -b .pic-html -%patch3 -p1 -b .gcc4 -%patch4 -p1 -b .gcc3 -%patch5 -p1 -b .utf-8 -%patch6 -p1 -b .debian-fix -%patch7 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 - -%build -# remove empty backups -rm -f ChangeLog.jp.debian README.jp.debian -# -PATH=$PWD/src/roff/troff:$PWD/src/preproc/pic:$PWD/src/preproc/eqn:$PWD/src/preproc/tbl:$PWDsrc/preproc/refer:$PWD/src/preproc/soelim:$PATH -PATH=$PWD/src/roff/grog:$PWD/src/roff/groff:$PWD/src/devices/grops:$PWD/src/devices/grotty:$PWD/src/devices/grodvi:$PWD/src/devices/grohtml:$PATH -GROFF_COMMAND_PREFIX= -GROFF_FONT_PATH=$PWD -GROFF_TMAC_PATH=$PWD/tmac:$PWD/src/roff/troff -export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH -# -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" INSTALL_PROGRAM='${INSTALL}' -./configure --prefix=/usr --mandir=%{_mandir} --infodir=%{_infodir} --enable-multibyte -pushd src/xditview - xmkmf -a - make depend && make CDEBUGFLAGS="$RPM_OPT_FLAGS" NIPPONDEFINES="-DNIPPON" -popd - -%install -if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then - install -d -m755 $RPM_BUILD_ROOT -fi -mkdir -p $RPM_BUILD_ROOT/usr/share -mkdir -p $RPM_BUILD_ROOT/etc -mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/groff -mkdir -p $RPM_BUILD_ROOT%{_infodir} -make -C src/xditview install DESTDIR=$RPM_BUILD_ROOT -make -C src/xditview install.man MANSUFFIX=1 LIBMANSUFFIX=3 DESTDIR=$RPM_BUILD_ROOT - -%clean -#[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; - -%files -%defattr(-,root,root) -# -# Should we make a own package gxditview? -# ... but the new xditview is a good program for X11R6.3. -# If gxditview is required GXDITVIEW should be set -# in groff/groff.cc to "gxditview" -# -# Yes we should make a own package because groff uses -# some features of gxditview which xditview doesn't know. -# -%{_bindir}/gxditview -%doc %{_mandir}/man1/gxditview.1* -%config %{_datadir}/X11/app-defaults/GXditview - -%changelog diff --git a/nroff-empty-LANGUAGE-fix.diff b/nroff-empty-LANGUAGE-fix.diff deleted file mode 100644 index 27faceb..0000000 --- a/nroff-empty-LANGUAGE-fix.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- - src/roff/nroff/nroff.sh | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - ---- a/src/roff/nroff/nroff.sh -+++ b/src/roff/nroff/nroff.sh -@@ -203,10 +203,22 @@ - # mv $TMPDIR/input.new $TMPDIR/input - #fi - -+getlang () { -+ if [ -n "$LANGUAGE" ]; then -+ echo $LANGUAGE -+ elif [ -n "$LC_ALL" ]; then -+ echo $LC_ALL -+ elif [ -n "$LC_MESSAGES" ]; then -+ echo $LC_MESSAGES -+ else -+ echo $LANG -+ fi -+} -+ - ICONV="cat" - case "`locale charmap 2>/dev/null`" in - UTF-8) -- case "${LANGUAGE-${LC_ALL-${LC_MESSAGES-${LANG}}}}" in -+ case `getlang` in - ja*) - # Japanese man page in UTF-8 locale, special case! - # force the device 'nippon' to run groff in ja_JP.eucJP locale diff --git a/pic-html.patch b/pic-html.patch deleted file mode 100644 index 4fb529c..0000000 --- a/pic-html.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru groff-1.18.1.1.orig/doc/Makefile.in groff-1.18.1.1/doc/Makefile.in ---- groff-1.18.1.1.orig/doc/Makefile.in 2002-09-09 21:31:37.000000000 +0200 -+++ groff-1.18.1.1/doc/Makefile.in 2004-06-29 18:41:17.238451579 +0200 -@@ -87,7 +87,7 @@ - - .ms.html: - $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \ -- -P-D$(imagedir) -Thtml -ms >$@ -+ -P-D$(imagedir) -P-Ipic -Thtml -ms >$@ - .ms.txt: - $(GROFF) -Tascii -ms -mwww >$@ - .ms.ps: diff --git a/utf8.patch b/utf8.patch deleted file mode 100644 index f49ebd1..0000000 --- a/utf8.patch +++ /dev/null @@ -1,183 +0,0 @@ -diff -ru groff-1.18.1.1.orig//src/roff/nroff/nroff.sh groff-1.18.1.1/src/roff/nroff/nroff.sh ---- groff-1.18.1.1.orig//src/roff/nroff/nroff.sh 2009-02-02 18:44:00.000000000 +0100 -+++ groff-1.18.1.1/src/roff/nroff/nroff.sh 2009-02-02 18:44:40.000000000 +0100 -@@ -87,11 +87,177 @@ - shift - done - -+# special hacks to display Japanese, Chinese, ...man pages correctly in UTF-8 locale: -+ -+guess_legacy_encoding () { -+ # Guess the legacy encoding used by the language/country -+ # found in the current LC_CTYPE value. -+ -+ # First determine the LC_CTYPE locale category setting -+ ctype=${LC_ALL-${LC_CTYPE-${LANG-en_US}}} -+ -+ case $ctype in -+ zh_TW*) -+ LEGACY_ENCODING=Big5 -+ ;; -+ zh_HK*) -+ LEGACY_ENCODING=Big5HKSCS -+ ;; -+ zh*) -+ LEGACY_ENCODING=GB18030 -+ ;; -+ ja*) -+ LEGACY_ENCODING=EUC-JP -+ ;; -+ ko*) -+ LEGACY_ENCODING=EUC-KR -+ ;; -+ ru*) -+ LEGACY_ENCODING=KOI8-R -+ ;; -+ uk*) -+ LEGACY_ENCODING=KOI8-U -+ ;; -+ pl*|hr*|hu*|cs*|sk*|sl*) -+ LEGACY_ENCODING=ISO-8859-2 -+ ;; -+ eo*|mt*) -+ LEGACY_ENCODING=ISO-8859-3 -+ ;; -+ el*) -+ LEGACY_ENCODING=ISO-8859-7 -+ ;; -+ he*) -+ LEGACY_ENCODING=ISO-8859-8 -+ ;; -+ tr*) -+ LEGACY_ENCODING=ISO-8859-9 -+ ;; -+ th*) -+ LEGACY_ENCODING=TIS-620 # or ISO-8859-11 -+ ;; -+ lt*) -+ LEGACY_ENCODING=ISO-8859-13 -+ ;; -+ cy*) -+ LEGACY_ENCODING=ISO-8859-14 -+ ;; -+ ro*) -+ LEGACY_ENCODING=ISO-8859-14 # or ISO-8859-16 -+ ;; -+ am*|vi*) -+ LEGACY_ENCODING=UTF-8 -+ ;; -+ *) -+ LEGACY_ENCODING=ISO-8859-1 -+ ;; -+ esac -+} -+ -+guess_legacy_encoding; -+ -+TMPDIR=`mktemp -d /tmp/nroff.XXXXXX` -+if [ $? -ne 0 ]; then -+ echo "$0: Can't create temp directory, exiting..." -+ exit 1 -+fi -+trap "exec rm -rf $TMPDIR" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO -+ -+# parse groff options to find out whether a file was given as argument or whether the -+# input is read from stdin: -+OLDARGS="" -+TEMP=$(getopt --options "abcCd:eEf:F:gGhiI:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ" --longoptions help,version -- ${1+"$@"}) -+eval set -- "$TEMP" -+while true ; do -+ case "$1" in -+ --) -+ if [ -n "$2" ] ; then -+ INPUTFILE="$2" -+ shift 2 -+ else -+ INPUTFILE="" -+ shift 1 -+ fi -+ break -+ ;; -+ *) -+ OLDARGS="$OLDARGS $1" -+ echo $1 -+ shift 1 -+ ;; -+ esac -+done -+eval set -- "$OLDARGS" -+ -+if [ -n "$INPUTFILE" ] ; then -+ # input comes from a file -+ cat "$INPUTFILE" > $TMPDIR/input -+else -+ # input comes from stdin -+ cat > $TMPDIR/input -+fi -+ -+#iconv -s -c -f utf-8 -t utf-8 < $TMPDIR/input > /dev/null -+#if [ $? -eq 0 ]; then -+# iconv -s -c -f utf-8 -t $LEGACY_ENCODING < $TMPDIR/input > $TMPDIR/input.new -+# mv $TMPDIR/input.new $TMPDIR/input -+#fi -+ -+ICONV="cat" -+case "`locale charmap 2>/dev/null`" in -+ UTF-8) -+ case "${LANGUAGE-${LC_ALL-${LC_MESSAGES-${LANG}}}}" in -+ ja*) -+ # Japanese man page in UTF-8 locale, special case! -+ # force the device 'nippon' to run groff in ja_JP.eucJP locale -+ # and convert the result to UTF-8 using iconv: -+ T=-Tnippon -+ export LC_ALL=ja_JP.eucJP -+ ICONV="iconv -f EUC-JP -t UTF-8" -+ ;; -+ zh_TW*) -+ T=-Tnippon -+ export LC_ALL=zh_TW.Big5 -+ ICONV="iconv -f Big5 -t UTF-8" -+ ;; -+ zh_HK*) -+ T=-Tnippon -+ export LC_ALL=zh_HK.Big5HKSCS -+ ICONV="iconv -f Big5HKSCS -t UTF-8" -+ ;; -+ zh*) -+ T=-Tnippon -+ export LC_ALL=zh_CN.GB18030 -+ ICONV="iconv -f GB18030 -t UTF-8" -+ ;; -+ ko*) -+ T=-Tlatin1 -+ export LC_ALL=ko_KR.EUC-KR -+ # See https://bugzilla.novell.com/show_bug.cgi?id=470921 -+ # for the reason why the "-c" is needed and -+ # why a conversion from ISO-8859-1 instead of EUC-KR to -+ # UTF-8 may be needed if an English man-page is displayed: -+ ICONV="iconv -c -f EUC-KR -t UTF-8" -+ iconv -s -f ASCII -t UTF-8 < $TMPDIR/input > /dev/null -+ if [ $? -eq 0 ]; then -+ ICONV="iconv -f ISO-8859-1 -t UTF-8" -+ fi -+ ;; -+ # make 'man iso-8859-15' display correctly in UTF-8 locales using Euro -+ ca_ES*|de_AT*|de_BE*|de_DE*|de_LU*|en_BE*|en_IE*|es_ES*|eu_ES*|fi_FI*|fr_BE*|fr_FR*|fr_LU*|ga_IE*|gl_ES*|it_IT*|nl_BE*|nl_NL*|pt_PT*|sv_FI*|wa_BE*) -+ T=-Tlatin1 -+ export LC_ALL=de_DE@euro -+ ICONV="iconv -f ISO-8859-15 -t UTF-8" -+ ;; -+ esac -+ ;; -+esac -+ - # This shell script is intended for use with man, so warnings are - # probably not wanted. Also load nroff-style character definitions. - --: ${GROFF_BIN_PATH=@BINDIR@} -+: ${GROFF_BIN_PATH=@BINDIR@} - export GROFF_BIN_PATH --PATH=$GROFF_BIN_PATH:$PATH groff -mtty-char $T $opts ${1+"$@"} -+PATH=$GROFF_BIN_PATH:$PATH groff -mtty-char $T $opts ${1+"$@"} < $TMPDIR/input | $ICONV - - # eof