Add manpages.dpatch and ocamldoc.dpatch
authorStephane Glondu <steph@glondu.net>
Mon, 27 Oct 2008 17:57:41 +0000 (18:57 +0100)
committerStephane Glondu <steph@glondu.net>
Mon, 27 Oct 2008 18:25:58 +0000 (19:25 +0100)
debian/changelog
debian/patches/00list
debian/patches/manpages.dpatch [new file with mode: 0755]
debian/patches/ocamldoc.dpatch [new file with mode: 0755]

index e4e3b5c004c71963a7483b08d9c3b847be494953..dd1cfa4e3c930317c8193c60a0ba5cfcd1c381d8 100644 (file)
@@ -4,6 +4,7 @@ ocaml (3.11.0~beta1-1) UNRELEASED; urgency=low
   * New upstream beta release:
     - camlrun_shared.dpatch removed (integrated upstream)
     - all other patches updated
+    - manpages.dpatch and ocamldoc.dpatch added
   * Switching packaging to git (from svn)
   * Bump debhelper compatibility level to 7, and use debian/clean feature
     of dh_clean
@@ -19,7 +20,7 @@ ocaml (3.11.0~beta1-1) UNRELEASED; urgency=low
     - ocaml-md5sums (therefore also disable its usage at the end of the
       build process)
 
- -- Stephane Glondu <steph@glondu.net>  Mon, 20 Oct 2008 23:57:07 +0200
+ -- Stephane Glondu <steph@glondu.net>  Mon, 27 Oct 2008 19:25:11 +0100
 
 ocaml (3.10.2-3) unstable; urgency=low
 
index 55f0b79e21587c7048b8e162a223df0a23fdaf22..3be95a81df5358d221de37bcee9ae9a1d7e1f5e7 100644 (file)
@@ -1,3 +1,5 @@
+manpages.dpatch
+ocamldoc.dpatch
 objinfo.dpatch
 dumpobj.dpatch
 man-ocamlmklib.dpatch
diff --git a/debian/patches/manpages.dpatch b/debian/patches/manpages.dpatch
new file mode 100755 (executable)
index 0000000..12873fc
--- /dev/null
@@ -0,0 +1,63 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## manpages.dpatch by Stephane Glondu <steph@glondu.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix errors in ocamlc and ocamlopt manpages (see Mantis #4629)
+
+
+@DPATCH@
+diff --git a/man/ocamlc.m b/man/ocamlc.m
+index 0ce1e8d..b1fb8bf 100644
+--- a/man/ocamlc.m
++++ b/man/ocamlc.m
+@@ -421,8 +421,8 @@ as a preprocessor for each source file. The output of
+ is redirected to
+ an intermediate file, which is compiled. If there are no compilation
+ errors, the intermediate file is deleted afterwards. The name of this
+-file is built from the basename of the source file with the extension
+-.ppi for an interface (.mli) file and .ppo for an implementation
++file is built from the basename of the source file with the extension .ppi
++for an interface (.mli) file and .ppo for an implementation
+ (.ml) file.
+ .TP
+ .B \-principal
+@@ -561,7 +561,7 @@ into errors.  The compiler will stop with an error when one of these
+ warnings is emitted.  The
+ .I warning\-list
+ has the same meaning as for
+-the "-w" option: an uppercase character turns the corresponding
++the "\-w" option: an uppercase character turns the corresponding
+ warning into an error, a lowercase character leaves it as a warning.
+ The default setting is
+ .B \-warn\-error\ a
+diff --git a/man/ocamlopt.m b/man/ocamlopt.m
+index 3872bd8..2a44836 100644
+--- a/man/ocamlopt.m
++++ b/man/ocamlopt.m
+@@ -222,7 +222,7 @@ and edit that file to remove all declarations of unexported names.
+ Add the given directory to the list of directories searched for
+ compiled interface files (.cmi) and compiled object code files
+ (.cmo). By default, the current directory is searched first, then the
+-standard library directory. Directories added with -I are searched
++standard library directory. Directories added with \-I are searched
+ after the current directory, in the order in which they were given on
+ the command line, but before the standard library directory.
+@@ -536,7 +536,7 @@ into errors.  The compiler will stop with an error when one of these
+ warnings is emitted.  The
+ .I warning\-list
+ has the same meaning as for
+-the "-w" option: an uppercase character turns the corresponding
++the "\-w" option: an uppercase character turns the corresponding
+ warning into an error, a lowercase character leaves it as a warning.
+ The default setting is
+ .B \-warn\-error\ a
+@@ -577,7 +577,7 @@ trigonometric operations
+ .BR cos ,
+ .BR sin ,
+ .B tan
+-have their range reduced to [-2^64, 2^64].
++have their range reduced to [\-2^64, 2^64].
+ .SH OPTIONS FOR THE AMD64 ARCHITECTURE
diff --git a/debian/patches/ocamldoc.dpatch b/debian/patches/ocamldoc.dpatch
new file mode 100755 (executable)
index 0000000..ffd69a8
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ocamldoc.dpatch by Stephane Glondu <steph@glondu.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Various fixes in ocamldoc (see Mantis #4630)
+
+
+@DPATCH@
+diff --git a/ocamldoc/odoc_man.ml b/ocamldoc/odoc_man.ml
+index a550118..ae3a120 100644
+--- a/ocamldoc/odoc_man.ml
++++ b/ocamldoc/odoc_man.ml
+@@ -204,6 +204,8 @@ class man =
+         match s.[i] with
+           '\\' -> Buffer.add_string b "\\(rs"
+         | '.' -> Buffer.add_string b "\\&."
++        | '\'' -> Buffer.add_string b "\\&'"
++        | '-' -> Buffer.add_string b "\\-"
+         | c -> Buffer.add_char b c
+       done;
+       Buffer.contents b
+@@ -633,15 +635,15 @@ class man =
+     (** Print groff string for a module comment.*)
+     method man_of_module_comment b text =
+-      bs b "\n.pp\n";
++      bs b "\n.PP\n";
+       self#man_of_text b [Code ("=== "^(Odoc_misc.string_of_text text)^" ===")];
+-      bs b "\n.pp\n"
++      bs b "\n.PP\n"
+     (** Print groff string for a class comment.*)
+     method man_of_class_comment b text =
+-      bs b "\n.pp\n";
++      bs b "\n.PP\n";
+       self#man_of_text b [Code ("=== "^(Odoc_misc.string_of_text text)^" ===")];
+-      bs b "\n.pp\n"
++      bs b "\n.PP\n"
+     (** Print groff string for an included module. *)
+     method man_of_included_module b m_name im =