rpms/man/devel man-1.6b-i18n_nroff.patch, NONE, 1.1 man-1.6b-man-pages.patch, NONE, 1.1 .cvsignore, 1.8, 1.9 man.spec, 1.38, 1.39 sources, 1.8, 1.9 man-1.5m2-i18n_nroff.patch, 1.2, NONE man-1.5p-man-pages.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Nov 10 10:34:20 UTC 2005


Author: varekova

Update of /cvs/dist/rpms/man/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14777

Modified Files:
	.cvsignore man.spec sources 
Added Files:
	man-1.6b-i18n_nroff.patch man-1.6b-man-pages.patch 
Removed Files:
	man-1.5m2-i18n_nroff.patch man-1.5p-man-pages.patch 
Log Message:
update to 1.6b


man-1.6b-i18n_nroff.patch:
 configure       |   19 +++------
 src/man.c       |  112 ++++++++++++++++++++++++++++++++++++++++----------------
 src/man.conf.in |    4 --
 src/paths.h.in  |    2 -
 4 files changed, 88 insertions(+), 49 deletions(-)

--- NEW FILE man-1.6b-i18n_nroff.patch ---
--- man-1.6b/configure.nroff	2005-11-10 10:02:58.000000000 +0100
+++ man-1.6b/configure	2005-11-10 10:29:55.971053960 +0100
@@ -405,10 +405,8 @@
   done
   troff=""
   nroff=""
-  jnroff=""
   eqn=""
   neqn=""
-  jneqn=""
   tbl=""
   col=""
   vgrind=""
@@ -467,25 +465,23 @@
   then
     if test $Fnroff = "missing"
     then
-      nroff="nroff -Tlatin1 -mandoc"
+      nroff="nroff --legacy NROFF_OLD_CHARSET -mandoc 2>/dev/null"
     else
-      nroff="$Fnroff -Tlatin1 -mandoc"
+      nroff="$Fnroff --legacy NROFF_OLD_CHARSET -mandoc 2>/dev/null"
     fi
     troff="troff -mandoc"
     echo "Warning: could not find groff"
   else
     if test $Fnroff = "missing"
     then
-      nroff="$Fgroff -Tlatin1 -mandoc"
+      nroff="$Fgroff -Tutf8 -mandoc"
     else
-      nroff="$Fnroff -Tlatin1 -mandoc"
+      nroff="$Fnroff --legacy NROFF_OLD_CHARSET -mandoc 2>/dev/null"
     fi
     troff="$Fgroff -Tps -mandoc"
-    jnroff="$Fgroff -Tnippon -mandocj"
   fi
   eqn="$Fgeqn -Tps"
-  neqn="$Fgeqn -Tlatin1"
-  jneqn="$Fgeqn -Tnippon"
+  neqn="$Fgeqn -Tutf8"
   tbl="$Fgtbl"
   col="$Fcol"
   vgrind="$Fvgrind"
@@ -518,7 +514,7 @@
   cat="$Fcat"
   awk="$Fawk"
 
-  FILTERS="troff nroff jnroff eqn neqn jneqn tbl col vgrind refer grap pic pager browser htmlpager cmp cat awk"
+  FILTERS="troff nroff eqn neqn tbl col vgrind refer grap pic pager browser htmlpager cmp cat awk"
 fi
 
 # Note: older nroff gives an error message for -c
@@ -526,7 +522,6 @@
 if [ "x$set_compatibility_mode_for_colored_groff" = "xtrue" ]; then
     troff="$troff -c"
     nroff="$nroff -c"
-    jnroff="$jnroff -c"
 fi
 
 if [ x$default = x ]; then
@@ -1281,10 +1276,8 @@
 s, at LIBOBJS@,$LIBOBJS,
 s, at troff@,$troff,
 s, at nroff@,$nroff,
-s, at jnroff@,$jnroff,
 s, at eqn@,$eqn,
 s, at neqn@,$neqn,
-s, at jneqn@,$jneqn,
 s, at tbl@,$tbl,
 s, at nocol@,$nocol,
 s, at pcol@,$pcol,
--- man-1.6b/src/man.c.nroff	2005-08-21 01:26:06.000000000 +0200
+++ man-1.6b/src/man.c	2005-11-10 10:53:04.778923072 +0100
@@ -80,8 +80,7 @@
 int fsstnd;
 int noautopath;
 int nocache;
-static int is_japanese;
-static char *language;
+
 static char **section_list;
 
 #ifdef DO_COMPRESS
@@ -442,7 +441,7 @@
 }
 
 static int
-is_lang_page (char *lang, const char *file) {
+is_lang_page (const char *lang, const char *file) {
 	char lang_path[16] = "";
 
 	snprintf(lang_path, sizeof(lang_path), "/%s/", lang);
@@ -457,22 +456,75 @@
 	return 0;
 }
 
+/* we need to pass, as a parameter, what the character set of a man page
+ * is likely to be if it is not utf-8, so that nroff can iconv it to utf-8.
+ *
+ * the character set/encoding is "guessed" based on the most common non-Unicode
+ * encoding used for man pages.
+ */
+
+typedef struct {
+    const char *lang;
+    const char *encoding;
+} lc2enc_t;
+
+static const lc2enc_t lc2enc[] = {
+    { "C",     "ASCII"      },
+    { "de",    "ISO-8859-1" },
+    { "en",    "ISO-8859-1" },
+    { "es",    "ISO-8859-1" },
+    { "fr",    "ISO-8859-1" },
+    { "it",    "ISO-8859-1" },
+    { "pt",    "ISO-8859-1" },
+    { "hr",    "ISO-8859-2" },
+    { "cs",    "ISO-8859-2" },
+    { "et",    "ISO-8859-2" },
+    { "hu",    "ISO-8859-2" },
+    { "lv",    "ISO-8859-2" },
+    { "lt",    "ISO-8859-2" },
+    { "pl",    "ISO-8859-2" },
+    { "ro",    "ISO-8859-2" },
+    { "sk",    "ISO-8859-2" },
+    { "sl",    "ISO-8859-2" },
+    { "bg",    "KOI8-R"     },
+    { "be",    "KOI8-R"     },
+    { "mk",    "KOI8-R"     },
+    { "ru",    "KOI8-R"     },
+    { "sh",    "KOI8-R"     },
+    { "uk",    "KOI8-R"     },
+    { "el",    "ISO-8859-7" },
+    { "tr",    "ISO-8859-9" },
+    { "ja",    "EUC-JP"     },
+    { "ko",    "EUC-KR"     },
+    { "zh_CN", "GB2312"     },
+    { "zh_HK", "BIG5"       },
+    { "zh_TW", "BIG5"       },
+    { NULL }
+};
+
+static const char *
+get_legacy_encoding(const char *file) {
+    const lc2enc_t *ptr;
+
+    for (ptr = lc2enc; ptr->lang != NULL; ptr++) {
+        if (is_lang_page(ptr->lang, file)) {
+            return ptr->encoding;
+        }
+    }
+    return "ISO-8859-1";
+}
+
 static int
 parse_roff_directive (char *cp, const char *file, char *buf, int buflen) {
      char c;
      int tbl_found = 0;
-     int use_jroff;
-
-     use_jroff = (is_japanese &&
-		   (strstr(file, "/jman/") || is_lang_page(language, file)));
 
      while ((c = *cp++) != '\0') {
 	  switch (c) {
 	  case 'e':
 	       if (debug)
 		    gripe (FOUND_EQN);
-	       add_directive((do_troff ? "EQN" : use_jroff ? "JNEQN": "NEQN"),
-			     file, buf, buflen);
+	       add_directive((do_troff ? "EQN" : "NEQN"), file, buf, buflen);
 	       break;
 
 	  case 'g':
@@ -520,9 +572,27 @@
      if (*buf == 0)
 	  return 1;
 
-     add_directive (do_troff ? "TROFF" : use_jroff ? "JNROFF" : "NROFF",
-		    "", buf, buflen);
+     add_directive (do_troff ? "TROFF" : "NROFF", "", buf, buflen);
 
+     if (!do_troff && strstr(buf, "NROFF_OLD_CHARSET") != NULL) {
+         const char *encoding = NULL;
+         size_t len = strlen("NROFF_OLD_CHARSET");
+         char *p = strstr(buf, "NROFF_OLD_CHARSET");
+
+         if (debug) {
+             fprintf(stderr, "\nfound '%s' in path\n", "NROFF_OLD_CHARSET");
+         }
+         encoding = get_legacy_encoding(file);
+         if (debug) {
+             fprintf(stderr, "\nold charset of '%s' is '%s'\n", file, encoding);
+         }
+         if (strlen(encoding) < len) {
+             memmove(p, p + len, strlen(p + len) + 1);
+             memmove(p + strlen(encoding), p, strlen(p) + 1);
+             memcpy(p, encoding, strlen(encoding));
+         }
+     }
+     
      if (tbl_found && !do_troff && *getval("COL"))
 	  add_directive ("COL", "", buf, buflen);
 
@@ -1181,22 +1251,6 @@
      return status;
 }
 
-/* Special code for Japanese (to pick jnroff instead of nroff, etc.) */
-static void
-setlang(void) {
-	char *lang;
-
-	/* We use getenv() instead of setlocale(), because of
-	   glibc 2.1.x security policy for SetUID/SetGID binary. */
-	if ((lang = getenv("LANG")) == NULL &&
-	    (lang = getenv("LC_ALL")) == NULL &&
-	    (lang = getenv("LC_CTYPE")) == NULL)
-		/* nothing */;
-
-	language = lang;
-	is_japanese = (lang && strncmp(lang, "ja", 2) == 0);
-}
-
 /*
  * Handle the apropos option.  Cheat by using another program.
  */
@@ -1263,10 +1317,6 @@
      setlocale(LC_MESSAGES, "");
 #endif
 
-     /* No doubt we'll need some generic language code here later.
-	For the moment only Japanese support. */
-     setlang();
-
      /* Handle /usr/man/man1.Z/name.1 nonsense from HP */
      dohp = getenv("MAN_HP_DIREXT");		/* .Z */
 
--- man-1.6b/src/man.conf.in.nroff	2005-11-10 10:02:58.000000000 +0100
+++ man-1.6b/src/man.conf.in	2005-11-10 10:39:04.442673600 +0100
@@ -86,14 +86,12 @@
 # (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
 #
 # If you have a new troff (version 1.18.1?) and its colored output
-# causes problems, add the -c option to TROFF, NROFF, JNROFF.
+# causes problems, add the -c option to TROFF, NROFF.
 #
 TROFF		@troff@
 NROFF		@nroff@
-JNROFF		@jnroff@
 EQN		@eqn@
 NEQN		@neqn@
-JNEQN		@jneqn@
 TBL		@tbl@
 @nocol at COL		@col@
 REFER		@refer@
--- man-1.6b/src/paths.h.in.nroff	2005-08-21 01:26:06.000000000 +0200
+++ man-1.6b/src/paths.h.in	2005-11-10 10:38:09.156078440 +0100
@@ -16,10 +16,8 @@
     { "WHATIS",   "@whatis@" },
     { "TROFF",	"@troff@" },
     { "NROFF",	"@nroff@" },
-    { "JNROFF",	"@jnroff@" },
     { "EQN",	"@eqn@" },
     { "NEQN",	"@neqn@" },
-    { "JNEQN",	"@jneqn@" },
     { "TBL",	"@tbl@" },
     { "COL",	"@pcol@" },
     { "REFER",	"@refer@" },

man-1.6b-man-pages.patch:
 makewhatis.man |    2 +-
 man.conf.man   |    6 +++---
 man.man        |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

--- NEW FILE man-1.6b-man-pages.patch ---
--- man-1.6b/man/en/man.conf.man.pom	2005-09-19 08:30:42.000000000 +0200
+++ man-1.6b/man/en/man.conf.man	2005-11-10 11:17:04.079116184 +0100
@@ -1,7 +1,7 @@
 .\" @(#)man.conf
-.TH MAN.CONF 5 "September 19, 2005"
+.TH MAN.CONFIG 5 "September 19, 2005"
 .SH NAME
-man.conf \- configuration data for man
+man.config \- configuration data for man
 .SH DESCRIPTION
 .LP
 This file is read by
@@ -12,7 +12,7 @@
 An alternative version of this file can be specified with
 .LP
 .RS
-man -C private_man.conf ...
+man -C private_man.config ...
 .RE
 .LP
 The command names may be provided with options. 
--- man-1.6b/man/en/makewhatis.man.pom	2005-09-19 08:29:48.000000000 +0200
+++ man-1.6b/man/en/makewhatis.man	2005-11-10 11:17:51.367927192 +0100
@@ -49,7 +49,7 @@
 .SH OPTIONS
 .TP
 .B -u
-Update database with new pages.
+Update database with new pages (file's status was last changed 24 hours ago)
 .TP
 .B -v
 Verbose output
--- man-1.6b/man/en/man.man.pom	2005-09-19 08:27:29.000000000 +0200
+++ man-1.6b/man/en/man.man	2005-11-10 11:19:03.836910232 +0100
@@ -72,7 +72,7 @@
 Specify the configuration file to use; the default is
 .BR @man_config_file@ .
 (See
-.BR man.conf (5).)
+.BR man.config (5).)
 .TP
 .B \-\^M " path"
 Specify the list of directories to search for man pages.
@@ -218,7 +218,7 @@
 No cat pages are saved when the required cat directory does not exist.
 No cat pages are saved when they are formatted for a line length
 different from 80.
-No cat pages are saved when man.conf contains the line NOCACHE.
+No cat pages are saved when man.config contains the line NOCACHE.
 .PP
 It is possible to make
 .B man
@@ -491,4 +491,4 @@
 Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
 Federico Lucifredi <flucifredi at acm.org> is the current maintainer.
 .SH "SEE ALSO"
-apropos(1), whatis(1), less(1), groff(1), man.conf(5).
+apropos(1), whatis(1), less(1), groff(1), man.config(5).


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/man/devel/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- .cvsignore	7 Mar 2005 17:02:05 -0000	1.8
+++ .cvsignore	10 Nov 2005 10:34:15 -0000	1.9
@@ -1 +1 @@
-man-1.5p.tar.gz
+man-1.6b.tar.gz


Index: man.spec
===================================================================
RCS file: /cvs/dist/rpms/man/devel/man.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- man.spec	31 Oct 2005 13:20:00 -0000	1.38
+++ man.spec	10 Nov 2005 10:34:16 -0000	1.39
@@ -3,11 +3,11 @@
 
 Summary: A set of documentation tools: man, apropos and whatis.
 Name: man
-Version: 1.5p
+Version: 1.6b
 Release: 7
 License: GPL
 Group: System Environment/Base
-Source0: ftp://ftp.win.tue.nl/pub/linux-local/utils/man/man-%{version}.tar.gz
+Source0: http://primates.ximian.com/~flucifredi/man/man-%{version}.tar.gz
 Source1: makewhatis.cronweekly
 Source2: makewhatis.crondaily
 Source3: mess.ru
@@ -15,17 +15,17 @@
 Patch2: man-1.5h1-make.patch
 Patch6: man-1.5m2-apropos.patch
 Patch7: man-1.5m2-lc_all.patch
-Patch8: man-1.5m2-i18n_nroff.patch  
 Patch10: man-1.5m2-i18n_makewhatis.patch
 Patch12: man-1.5m2-posix.patch
 Patch13: man-1.5p-makewhatis2.patch
 Patch14: man-1.5p-makewhatis3.patch
 Patch15: man-1.5p-mandirlist.patch
 Patch16: man-1.5p-man2html.patch
-Patch17: man-1.5p-man-pages.patch
 Patch18: man-1.5p-pipe_makewhatis.patch
 Patch19: man-1.5p-sec.patch
 Patch20: man-1.5p-xorg.patch
+Patch21: man-1.6b-i18n_nroff.patch
+Patch22: man-1.6b-man-pages.patch
 
 Buildroot: %{_tmppath}/%{name}-root
 PreReq: coreutils
@@ -50,17 +50,17 @@
 %patch2 -p1 -b .make
 %patch6 -p1 -b .apropos
 %patch7 -p1 -b .lc_all
-%patch8 -p1 -b .i18n_nroff
 %patch10 -p1 -b .i18n_makewhatis
 %patch12 -p1 -b .posix
 %patch13 -p1 -b .trap
 %patch14 -p1 -b .update
 %patch15 -p1 -b .lang
 %patch16 -p1 -b .man2html
-%patch17 -p1 -b .up 
 %patch18 -p1 -b .pipe
 %patch19 -p1 -b .sec
 %patch20 -p1 -b .xorg
+%patch21 -p1 -b .i18n_nroff
+%patch22 -p1 -b .up 
 
 cp -f %{SOURCE3} msgs	# replace bad ru trans
 
@@ -318,6 +318,9 @@
 %attr(0775,root,man)	%dir %{cache}/X11R6/cat[123456789n]
 
 %changelog
+* Thu Nov 10 2005 Ivana Varekova <varekova at redhat.com> 1.6b-1
+- update to 1.6b
+
 * Mon Oct 31 2005 Ivana Varekova <varekova at redhat.com> 1.5p-7
 - add ?x sections to MANSECT variable (bug 172002) 
 


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/man/devel/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sources	7 Mar 2005 17:02:05 -0000	1.8
+++ sources	10 Nov 2005 10:34:16 -0000	1.9
@@ -1 +1 @@
-037d5644f8ef9ea0ef22b271bae0297d  man-1.5p.tar.gz
+81d96091482b6445cbfa248fadb422b8  man-1.6b.tar.gz


--- man-1.5m2-i18n_nroff.patch DELETED ---


--- man-1.5p-man-pages.patch DELETED ---




More information about the fedora-cvs-commits mailing list