the gen_modules.pl script (in ocaml source package). You should have a
look at the comments in gen_modules.pl to understand the format of
*.install.in files.
+
+
+Patching upstream sources
+-------------------------
+
+This source package uses quilt to apply and remove its patches. Please
+refer to `/usr/share/doc/quilt/README.source' for information about
+how to use quilt for source packages.
+
+The quilt series is generated from the Git repository. Have a look at
+the `redo-patches' target of debian/rules for more details.
tk8.4-dev,
libncurses5-dev,
libgdbm-dev,
- dpatch,
+ quilt,
bzip2,
docbook-xml,
docbook-utils,
tk8.4-dev,
libncurses5-dev,
libgdbm-dev,
- dpatch,
+ quilt,
bzip2,
docbook-xml,
docbook-utils,
--- /dev/null
+From: Stefano Zacchiroli <zack@debian.org>
+Date: Tue, 19 May 2009 17:22:39 +0200
+Subject: [PATCH] Pass --no-relax to ld on alpha
+
+Pass the --no-relax option to ld to fix a segfault in initialization
+code (bug#338437)
+---
+ configure | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/configure b/configure
+index 503f555..eba3528 100755
+--- a/configure
++++ b/configure
+@@ -282,7 +282,8 @@ case "$bytecc,$host" in
+ gcc,alpha*-*-linux*)
+ if cc="$bytecc" sh ./hasgot -mieee; then
+ bytecccompopts="-mieee $bytecccompopts";
+- fi;;
++ fi
++ bytecclinkopts="-Wl,--no-relax";;
+ cc,mips-*-irix6*)
+ # Add -n32 flag to ensure compatibility with native-code compiler
+ bytecccompopts="-n32"
+@@ -684,6 +685,7 @@ case "$arch,$nativecc,$system,$host_type" in
+ nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";;
+ *,*,rhapsody,*) nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs"
+ if $arch64; then partialld="ld -r -arch ppc64"; fi;;
++ alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--no-relax";;
+ *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";;
+ amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
+ *,gcc*,*,*) nativecccompopts="$gcc_warnings";;
+--
+1.6.2.4
+
--- /dev/null
+From: Stefano Zacchiroli <zack@debian.org>
+Date: Tue, 19 May 2009 17:23:34 +0200
+Subject: [PATCH] Call ld with proper flags
+
+Filter linkflags passed to ld by ocamlopt -pack and -output-obj
+to remove the "-Wl," parts, which are only used when ocamlopt calls
+gcc.
+---
+ configure | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure b/configure
+index eba3528..be13adc 100755
+--- a/configure
++++ b/configure
+@@ -1548,7 +1548,7 @@ echo "DEBUGGER=$debugger" >> Makefile
+ echo "CC_PROFILE=$cc_profile" >> Makefile
+ echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
+ echo "PARTIALLD=$partialld" >> Makefile
+-echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " >> Makefile
++echo "PACKLD=\$(PARTIALLD) $(echo $nativecclinkopts|sed s/-Wl,//g) -o " >> Makefile
+ echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
+ echo "IFLEXDIR=$iflexdir" >> Makefile
+ echo "O=o" >> Makefile
+--
+1.6.2.4
+
--- /dev/null
+From: Stefano Zacchiroli <zack@debian.org>
+Date: Tue, 19 May 2009 17:24:14 +0200
+Subject: [PATCH] Don't use rpath
+
+---
+ tools/ocamlmklib.mlp | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/tools/ocamlmklib.mlp b/tools/ocamlmklib.mlp
+index cec4877..4db288f 100644
+--- a/tools/ocamlmklib.mlp
++++ b/tools/ocamlmklib.mlp
+@@ -32,6 +32,11 @@ and output_c = ref "" (* Output name for C part of library *)
+ and rpath = ref [] (* rpath options *)
+ and verbose = ref false
+
++(* Debian specific: inhibit rpath *)
++let byteccrpath = ""
++and nativeccrpath = ""
++and mksharedlibrpath = ""
++
+ let starts_with s pref =
+ String.length s >= String.length pref &&
+ String.sub s 0 (String.length pref) = pref
+--
+1.6.2.4
+
--- /dev/null
+From: Julien Cristau <julien.cristau@ens-lyon.org>
+Date: Tue, 19 May 2009 17:24:52 +0200
+Subject: [PATCH] Put manpages in section 3o instead of 3
+
+---
+ ocamldoc/Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
+index 0878a79..f53046c 100644
+--- a/ocamldoc/Makefile
++++ b/ocamldoc/Makefile
+@@ -318,7 +318,7 @@ test_texi: dummy
+ stdlib_man/Pervasives.3o: $(STDLIB_MLIS)
+ $(MKDIR) stdlib_man
+ $(OCAMLDOC_RUN) -man -d stdlib_man $(INCLUDES) \
+- -t "OCaml library" -man-mini \
++ -t "OCaml library" -man-mini -man-section 3o \
+ $(STDLIB_MLIS)
+
+ autotest_stdlib: dummy
+--
+1.6.2.4
+
--- /dev/null
+From: Stefano Zacchiroli <zack@debian.org>
+Date: Tue, 19 May 2009 17:25:59 +0200
+Subject: [PATCH] Add to ocamldoc support for native code dynamic loading
+
+That enables using ocamldoc flags such as "-g" also with
+ocamldoc.opt. Patch is taken from OCaml CVS and is already
+integrated upstream for future releases.
+---
+ man/ocamldoc.m | 5 +----
+ ocamldoc/Makefile | 29 +++++++++++++++--------------
+ ocamldoc/odoc.ml | 18 +++++++++---------
+ ocamldoc/odoc_args.ml | 8 ++------
+ ocamldoc/odoc_args.mli | 4 ----
+ ocamldoc/odoc_messages.ml | 5 ++---
+ 6 files changed, 29 insertions(+), 40 deletions(-)
+
+diff --git a/man/ocamldoc.m b/man/ocamldoc.m
+index 5d1ed6a..757ec58 100644
+--- a/man/ocamldoc.m
++++ b/man/ocamldoc.m
+@@ -110,10 +110,7 @@ to display it.
+ .TP
+ .BI \-g \ file
+ Dynamically load the given file (which extension usually is .cmo or .cma),
+-which defines a custom documentation generator. This option is supported by the
+-.BR ocamldoc (1)
+-command, but not by its native-code version
+-.BR ocamldoc.opt .
++which defines a custom documentation generator.
+ If the given file is a simple one and does not exist in
+ the current directory, then ocamldoc looks for it in the custom
+ generators default directory, and in the directories specified with the
+diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
+index f53046c..a3cf8fa 100644
+--- a/ocamldoc/Makefile
++++ b/ocamldoc/Makefile
+@@ -111,16 +111,17 @@ CMOFILES= odoc_config.cmo \
+ CMXFILES= $(CMOFILES:.cmo=.cmx)
+ CMIFILES= $(CMOFILES:.cmo=.cmi)
+
+-EXECMOFILES=$(CMOFILES)\
+- odoc_dag2html.cmo\
+- odoc_to_text.cmo\
+- odoc_ocamlhtml.cmo\
+- odoc_html.cmo\
+- odoc_man.cmo\
++EXECMOFILES=$(CMOFILES) \
++ odoc_dag2html.cmo \
++ odoc_to_text.cmo \
++ odoc_ocamlhtml.cmo \
++ odoc_html.cmo \
++ odoc_man.cmo \
+ odoc_latex_style.cmo \
+- odoc_latex.cmo\
+- odoc_texi.cmo\
+- odoc_dot.cmo
++ odoc_latex.cmo \
++ odoc_texi.cmo \
++ odoc_dot.cmo \
++ odoc.cmo
+
+ EXECMXFILES= $(EXECMOFILES:.cmo=.cmx)
+ EXECMIFILES= $(EXECMOFILES:.cmo=.cmi)
+@@ -199,10 +200,10 @@ libopt: $(OCAMLDOC_LIBCMXA) $(OCAMLDOC_LIBCMI)
+ debug:
+ make OCAMLPP=""
+
+-$(OCAMLDOC): $(EXECMOFILES) odoc.cmo
+- $(OCAMLC) -o $@ -linkall unix.cma str.cma dynlink.cma $(LINKFLAGS) $(OCAMLCMOFILES) $(EXECMOFILES) odoc.cmo
+-$(OCAMLDOC_OPT): $(EXECMXFILES) odoc_opt.cmx
+- $(OCAMLOPT) -o $@ unix.cmxa str.cmxa $(LINKFLAGS) $(OCAMLCMXFILES) $(EXECMXFILES) odoc_opt.cmx
++$(OCAMLDOC): $(EXECMOFILES)
++ $(OCAMLC) -o $@ -linkall unix.cma str.cma dynlink.cma $(LINKFLAGS) $(OCAMLCMOFILES) $(EXECMOFILES)
++$(OCAMLDOC_OPT): $(EXECMXFILES)
++ $(OCAMLOPT) -o $@ unix.cmxa str.cmxa dynlink.cmxa $(LINKFLAGS) $(OCAMLCMXFILES) $(EXECMXFILES)
+
+ $(OCAMLDOC_LIBCMA): $(LIBCMOFILES)
+ $(OCAMLC) -a -o $@ $(LINKFLAGS) $(OCAMLCMOFILES) $(LIBCMOFILES)
+@@ -211,7 +212,7 @@ $(OCAMLDOC_LIBCMXA): $(LIBCMXFILES)
+
+ manpages: stdlib_man/Pervasives.3o
+
+-dot: $(EXECMOFILES) odoc.cmo
++dot: $(EXECMOFILES)
+ $(OCAMLDOC_RUN) -dot -dot-reduce -o ocamldoc.dot $(INCLUDES) \
+ odoc*.ml
+
+diff --git a/ocamldoc/odoc.ml b/ocamldoc/odoc.ml
+index 472e93b..14ef26c 100644
+--- a/ocamldoc/odoc.ml
++++ b/ocamldoc/odoc.ml
+@@ -25,17 +25,18 @@ let print_DEBUG s = print_string s ; print_newline ()
+
+ (* we check if we must load a module given on the command line *)
+ let arg_list = Array.to_list Sys.argv
+-let (cmo_or_cma_opt, paths) =
++let (cm_opt, paths) =
+ let rec iter (f_opt, inc) = function
+ [] | _ :: [] -> (f_opt, inc)
+ | "-g" :: file :: q when
+ ((Filename.check_suffix file "cmo") or
+- (Filename.check_suffix file "cma")) &
++ (Filename.check_suffix file "cma") or
++ (Filename.check_suffix file "cmxs")) &
+ (f_opt = None) ->
+- iter (Some file, inc) q
+- | "-i" :: dir :: q ->
+- iter (f_opt, inc @ [dir]) q
+- | _ :: q ->
++ iter (Some file, inc) q
++ | "-i" :: dir :: q ->
++ iter (f_opt, inc @ [dir]) q
++ | _ :: q ->
+ iter (f_opt, inc) q
+ in
+ iter (None, []) arg_list
+@@ -63,12 +64,11 @@ let get_real_filename name =
+ )
+
+ let _ =
+- match cmo_or_cma_opt with
++ match cm_opt with
+ None ->
+ ()
+ | Some file ->
+- (* initializations for dynamic loading *)
+- Dynlink.init ();
++ let file = Dynlink.adapt_filename file in
+ Dynlink.allow_unsafe_modules true;
+ try
+ let real_file = get_real_filename file in
+diff --git a/ocamldoc/odoc_args.ml b/ocamldoc/odoc_args.ml
+index f82458a..2b1943d 100644
+--- a/ocamldoc/odoc_args.ml
++++ b/ocamldoc/odoc_args.ml
+@@ -24,8 +24,6 @@ type source_file =
+
+ let include_dirs = Clflags.include_dirs
+
+-let bytecode_mode = ref true
+-
+ class type doc_generator =
+ object
+ method generate : Odoc_module.t_module list -> unit
+@@ -254,10 +252,8 @@ let options = ref [
+ "-dot", Arg.Unit (fun () -> set_doc_generator !default_dot_generator), M.generate_dot ;
+ "-customdir", Arg.Unit (fun () -> Printf.printf "%s\n" Odoc_config.custom_generators_path; exit 0),
+ M.display_custom_generators_dir ;
+- "-i", Arg.String (fun s -> if !bytecode_mode then () else (prerr_endline (M.option_not_in_native_code "-i"); exit 1)),
+- M.add_load_dir ;
+- "-g", Arg.String (fun s -> if !bytecode_mode then () else (prerr_endline (M.option_not_in_native_code "-g"); exit 1)),
+- M.load_file ^
++ "-i", Arg.String (fun s -> ()), M.add_load_dir ;
++ "-g", Arg.String (fun s -> ()), M.load_file ^
+ "\n\n *** HTML options ***\n";
+
+ (* html only options *)
+diff --git a/ocamldoc/odoc_args.mli b/ocamldoc/odoc_args.mli
+index bd34ec5..c646536 100644
+--- a/ocamldoc/odoc_args.mli
++++ b/ocamldoc/odoc_args.mli
+@@ -22,10 +22,6 @@ type source_file =
+ (** The include_dirs in the OCaml compiler. *)
+ val include_dirs : string list ref
+
+-(** Indicate if we are in bytecode mode or not.
+- (For the [ocamldoc] command).*)
+-val bytecode_mode : bool ref
+-
+ (** The class type of documentation generators. *)
+ class type doc_generator =
+ object method generate : Odoc_module.t_module list -> unit end
+diff --git a/ocamldoc/odoc_messages.ml b/ocamldoc/odoc_messages.ml
+index f288da1..9753adf 100644
+--- a/ocamldoc/odoc_messages.ml
++++ b/ocamldoc/odoc_messages.ml
+@@ -24,7 +24,6 @@ let message_version = software^" "^config_version
+ let usage = "Usage : "^(Sys.argv.(0))^" [options] <files>\n"
+ let options_are = "Options are :"
+ let option_version = "\tPrint version and exit"
+-let bytecode_only = "(bytecode version only)"
+ let latex_only = "(LaTeX only)"
+ let texi_only = "(TeXinfo only)"
+ let latex_texi_only = "(LaTeX and TeXinfo only)"
+@@ -41,8 +40,8 @@ let option_intf ="<file>\tConsider <file> as a .mli file"
+ let option_text ="<file>\tConsider <file> as a .txt file"
+ let display_custom_generators_dir = "\tDisplay custom generators standard directory and exit"
+ let add_load_dir = "<dir>\tAdd the given directory to the search path for custom\n"^
+- "\t\tgenerators "^bytecode_only
+-let load_file = "<file.cm[o|a]>\n\t\tLoad file defining a new documentation generator\n\t\t"^bytecode_only
++ "\t\tgenerators"
++let load_file = "<file.cm[o|a|xs]>\n\t\tLoad file defining a new documentation generator"
+ let nolabels = "\tIgnore non-optional labels in types"
+ let werr = "\tTreat ocamldoc warnings as errors"
+ let hide_warnings = "\n\t\tdo not print ocamldoc warnings"
+--
+1.6.2.4
+
--- /dev/null
+From: Ralf Treinen <treinen@debian.org>
+Date: Tue, 19 May 2009 17:28:09 +0200
+Subject: [PATCH] Patch config.sh for installation
+
+Use for installatation a patched config.sh (created by debian/rules).
+---
+ build/install.sh | 2 +-
+ build/partial-install.sh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/build/install.sh b/build/install.sh
+index 34d6384..c57bcdb 100755
+--- a/build/install.sh
++++ b/build/install.sh
+@@ -18,7 +18,7 @@ set -e
+
+ cd `dirname $0`/..
+
+-. config/config.sh
++. config/config.debian.install.sh
+
+ not_installed=$PWD/_build/not_installed
+
+diff --git a/build/partial-install.sh b/build/partial-install.sh
+index 7240fff..ea55334 100755
+--- a/build/partial-install.sh
++++ b/build/partial-install.sh
+@@ -22,7 +22,7 @@ set -e
+
+ cd `dirname $0`/..
+
+-. config/config.sh
++. config/config.debian.install.sh
+
+ not_installed=$PWD/_build/not_installed
+
+--
+1.6.2.4
+
--- /dev/null
+From: Stefano Zacchiroli <zack@debian.org>
+Date: Tue, 19 May 2009 17:28:56 +0200
+Subject: [PATCH] Install ocamlbuild as a link on either .native or .byte
+
+---
+ build/partial-install.sh | 17 ++++++++++++++++-
+ 1 files changed, 16 insertions(+), 1 deletions(-)
+
+diff --git a/build/partial-install.sh b/build/partial-install.sh
+index ea55334..a0a0028 100755
+--- a/build/partial-install.sh
++++ b/build/partial-install.sh
+@@ -60,6 +60,21 @@ installbestbin() {
+ [ -x "$3" ] || chmod +x "$3"
+ }
+
++installbestlink() {
++ if [ -f "$1" ]; then
++ echo " linking binary $3 to `basename $1`"
++ ln -fs "$1" "$3"
++ else
++ if [ -f "$2" ]; then
++ echo " linking binary $3 to `basename $2`"
++ ln -fs "$2" "$3"
++ else
++ echo "None of $1, $2 exists"
++ exit 3
++ fi
++ fi
++}
++
+ installlib() {
+ if [ -f "$1" ]; then
+ dest="$2/`basename $1`"
+@@ -156,7 +171,7 @@ echo "Installing ocamlbuild..."
+ cd ocamlbuild
+ installbin ocamlbuild.byte$EXE $BINDIR/ocamlbuild.byte$EXE
+ installbin ocamlbuild.native$EXE $BINDIR/ocamlbuild.native$EXE
+-installbestbin ocamlbuild.native$EXE ocamlbuild.byte$EXE $BINDIR/ocamlbuild$EXE
++installbestlink ocamlbuild.native$EXE ocamlbuild.byte$EXE $BINDIR/ocamlbuild$EXE
+
+ installlibdir \
+ ocamlbuildlib.$A \
+--
+1.6.2.4
+
--- /dev/null
+From: Stephane Glondu <steph@glondu.net>
+Date: Tue, 19 May 2009 17:29:49 +0200
+Subject: [PATCH] Add missing dynamic linking options for dbm
+
+See OCaml PR#4699.
+---
+ otherlibs/dbm/Makefile | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/otherlibs/dbm/Makefile b/otherlibs/dbm/Makefile
+index 68fd200..894c822 100644
+--- a/otherlibs/dbm/Makefile
++++ b/otherlibs/dbm/Makefile
+@@ -21,6 +21,7 @@ CAMLOBJS=dbm.cmo
+ COBJS=cldbm.o
+ EXTRACFLAGS=$(DBM_INCLUDES)
+ LINKOPTS=$(DBM_LINK)
++LDOPTS=-ldopt "$(DBM_LINK)"
+
+ include ../Makefile
+
+--
+1.6.2.4
+
+++ /dev/null
-alpha_ld_no-relax.dpatch
-call_ld_with_proper_flags.dpatch
-no_rpath.dpatch
-stdlib_man_section.dpatch
-ocamldoc_natdynlink.dpatch
-install_scripts_config.dpatch
-install_ocamlbuild.dpatch
-dbm_ldopts.dpatch
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## alpha_ld_no-relax.dpatch by Stefano Zacchiroli <zack@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Pass the --no-relax option to ld to fix a segfault in initialization
-## DP: code (bug#338437)
-
-
-@DPATCH@
-diff -urNad ocaml~/configure ocaml/configure
---- ocaml~/configure 2008-11-29 11:16:39.000000000 +0100
-+++ ocaml/configure 2008-11-29 11:31:37.000000000 +0100
-@@ -282,7 +282,8 @@
- gcc,alpha*-*-linux*)
- if cc="$bytecc" sh ./hasgot -mieee; then
- bytecccompopts="-mieee $bytecccompopts";
-- fi;;
-+ fi
-+ bytecclinkopts="-Wl,--no-relax";;
- cc,mips-*-irix6*)
- # Add -n32 flag to ensure compatibility with native-code compiler
- bytecccompopts="-n32"
-@@ -684,6 +685,7 @@
- nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";;
- *,*,rhapsody,*) nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs"
- if $arch64; then partialld="ld -r -arch ppc64"; fi;;
-+ alpha,gcc*,linux*,*) nativecclinkopts="-Wl,--no-relax";;
- *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";;
- amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
- *,gcc*,*,*) nativecccompopts="$gcc_warnings";;
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## call_ld_with_proper_flags.dpatch by Stefano Zacchiroli <zack@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Filter linkflags passed to ld by ocamlopt -pack and -output-obj
-## DP: to remove the "-Wl," parts, which are only used when ocamlopt calls
-## DP: gcc.
-
-@DPATCH@
-diff -urNad ocaml~/configure ocaml/configure
---- ocaml~/configure 2008-12-02 01:24:33.000000000 +0100
-+++ ocaml/configure 2008-12-02 01:26:02.000000000 +0100
-@@ -1548,7 +1548,7 @@
- echo "CC_PROFILE=$cc_profile" >> Makefile
- echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
- echo "PARTIALLD=$partialld" >> Makefile
--echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " >> Makefile
-+echo "PACKLD=\$(PARTIALLD) $(echo $nativecclinkopts|sed s/-Wl,//g) -o " >> Makefile
- echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
- echo "IFLEXDIR=$iflexdir" >> Makefile
- echo "O=o" >> Makefile
+++ /dev/null
-#! /bin/sh -e
-## dbm_ldopts.dpatch by Stephane Glondu <steph@glondu.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: add missing dynamic linking options for dbm (see OCaml PR#4699)
-
-if [ $# -ne 1 ]; then
- echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
- exit 1
-fi
-case "$1" in
- -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
- -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
- *)
- echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
-diff --git a/otherlibs/dbm/Makefile b/otherlibs/dbm/Makefile
-index 68fd200..894c822 100644
---- a/otherlibs/dbm/Makefile
-+++ b/otherlibs/dbm/Makefile
-@@ -21,6 +21,7 @@ CAMLOBJS=dbm.cmo
- COBJS=cldbm.o
- EXTRACFLAGS=$(DBM_INCLUDES)
- LINKOPTS=$(DBM_LINK)
-+LDOPTS=-ldopt "$(DBM_LINK)"
-
- include ../Makefile
-
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## install_ocamlbuild.dpatch by Stefano Zacchiroli <zack@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: install ocamlbuild as a link on either .native or .byte.
-
-@DPATCH@
-diff -urNad ocaml~/build/partial-install.sh ocaml/build/partial-install.sh
---- ocaml~/build/partial-install.sh 2008-11-29 11:32:25.000000000 +0100
-+++ ocaml/build/partial-install.sh 2008-11-29 11:32:25.000000000 +0100
-@@ -60,6 +60,21 @@
- [ -x "$3" ] || chmod +x "$3"
- }
-
-+installbestlink() {
-+ if [ -f "$1" ]; then
-+ echo " linking binary $3 to `basename $1`"
-+ ln -fs "$1" "$3"
-+ else
-+ if [ -f "$2" ]; then
-+ echo " linking binary $3 to `basename $2`"
-+ ln -fs "$2" "$3"
-+ else
-+ echo "None of $1, $2 exists"
-+ exit 3
-+ fi
-+ fi
-+}
-+
- installlib() {
- if [ -f "$1" ]; then
- dest="$2/`basename $1`"
-@@ -156,7 +171,7 @@
- cd ocamlbuild
- installbin ocamlbuild.byte$EXE $BINDIR/ocamlbuild.byte$EXE
- installbin ocamlbuild.native$EXE $BINDIR/ocamlbuild.native$EXE
--installbestbin ocamlbuild.native$EXE ocamlbuild.byte$EXE $BINDIR/ocamlbuild$EXE
-+installbestlink ocamlbuild.native$EXE ocamlbuild.byte$EXE $BINDIR/ocamlbuild$EXE
-
- installlibdir \
- ocamlbuildlib.$A \
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## install_scripts_config.dpatch by Ralf Treinen <treinen@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Use for installatation a patched config.sh (created by debian/rules)
-## DP: Ralf Treinen <treinen@debian.org>
-
-@DPATCH@
-diff -urNad ocaml~/build/install.sh ocaml/build/install.sh
---- ocaml~/build/install.sh 2008-08-05 15:05:23.000000000 +0200
-+++ ocaml/build/install.sh 2008-11-29 11:32:20.000000000 +0100
-@@ -18,7 +18,7 @@
-
- cd `dirname $0`/..
-
--. config/config.sh
-+. config/config.debian.install.sh
-
- not_installed=$PWD/_build/not_installed
-
-diff -urNad ocaml~/build/partial-install.sh ocaml/build/partial-install.sh
---- ocaml~/build/partial-install.sh 2008-01-11 17:13:16.000000000 +0100
-+++ ocaml/build/partial-install.sh 2008-11-29 11:32:20.000000000 +0100
-@@ -22,7 +22,7 @@
-
- cd `dirname $0`/..
-
--. config/config.sh
-+. config/config.debian.install.sh
-
- not_installed=$PWD/_build/not_installed
-
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## missing-manpage-links.dpatch by <julien.cristau@ens-lyon.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-@DPATCH@
-diff -urNad ocaml-3.09.2~/man/Makefile ocaml-3.09.2/man/Makefile
---- ocaml-3.09.2~/man/Makefile 2002-04-24 11:09:35.000000000 +0200
-+++ ocaml-3.09.2/man/Makefile 2006-05-04 00:27:38.000000000 +0200
-@@ -20,3 +20,5 @@
- for i in *.m; do cp $$i $(DIR)/`basename $$i .m`.$(MANEXT); done
- echo '.so man$(MANEXT)/ocamlc.$(MANEXT)' > $(DIR)/ocamlc.opt.$(MANEXT)
- echo '.so man$(MANEXT)/ocamlopt.$(MANEXT)' > $(DIR)/ocamlopt.opt.$(MANEXT)
-+ echo '.so man$(MANEXT)/ocamldep.$(MANEXT)' > $(DIR)/ocamldep.opt.$(MANEXT)
-+ echo '.so man$(MANEXT)/ocamllex.$(MANEXT)' > $(DIR)/ocamllex.opt.$(MANEXT)
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## no_rpath.dpatch by Stefano Zacchiroli <zack@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Don't use rpath.
-
-@DPATCH@
-diff -urNad ocaml~/tools/ocamlmklib.mlp ocaml/tools/ocamlmklib.mlp
---- ocaml~/tools/ocamlmklib.mlp 2008-01-08 16:39:47.000000000 +0100
-+++ ocaml/tools/ocamlmklib.mlp 2008-11-29 11:31:52.000000000 +0100
-@@ -32,6 +32,11 @@
- and rpath = ref [] (* rpath options *)
- and verbose = ref false
-
-+(* Debian specific: inhibit rpath *)
-+let byteccrpath = ""
-+and nativeccrpath = ""
-+and mksharedlibrpath = ""
-+
- let starts_with s pref =
- String.length s >= String.length pref &&
- String.sub s 0 (String.length pref) = pref
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## ocamldoc_natdynlink.dpatch by Stefano Zacchiroli <zack@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Add to ocamldoc support for native code dynamic loading.
-## DP: That enables using ocamldoc flags such as "-g" also with
-## DP: ocamldoc.opt. Patch is taken from OCaml CVS and is already
-## DP: integrated upstream for future releases.
-
-@DPATCH@
-diff -urNad ocaml~/man/ocamldoc.m ocaml/man/ocamldoc.m
---- ocaml~/man/ocamldoc.m 2009-02-21 12:54:30.000000000 +0100
-+++ ocaml/man/ocamldoc.m 2009-04-06 13:57:21.520452487 +0200
-@@ -110,10 +110,7 @@
- .TP
- .BI \-g \ file
- Dynamically load the given file (which extension usually is .cmo or .cma),
--which defines a custom documentation generator. This option is supported by the
--.BR ocamldoc (1)
--command, but not by its native-code version
--.BR ocamldoc.opt .
-+which defines a custom documentation generator.
- If the given file is a simple one and does not exist in
- the current directory, then ocamldoc looks for it in the custom
- generators default directory, and in the directories specified with the
-diff -urNad ocaml~/ocamldoc/Makefile ocaml/ocamldoc/Makefile
---- ocaml~/ocamldoc/Makefile 2009-04-06 13:56:34.000451820 +0200
-+++ ocaml/ocamldoc/Makefile 2009-04-06 13:56:34.272459850 +0200
-@@ -111,16 +111,17 @@
- CMXFILES= $(CMOFILES:.cmo=.cmx)
- CMIFILES= $(CMOFILES:.cmo=.cmi)
-
--EXECMOFILES=$(CMOFILES)\
-- odoc_dag2html.cmo\
-- odoc_to_text.cmo\
-- odoc_ocamlhtml.cmo\
-- odoc_html.cmo\
-- odoc_man.cmo\
-+EXECMOFILES=$(CMOFILES) \
-+ odoc_dag2html.cmo \
-+ odoc_to_text.cmo \
-+ odoc_ocamlhtml.cmo \
-+ odoc_html.cmo \
-+ odoc_man.cmo \
- odoc_latex_style.cmo \
-- odoc_latex.cmo\
-- odoc_texi.cmo\
-- odoc_dot.cmo
-+ odoc_latex.cmo \
-+ odoc_texi.cmo \
-+ odoc_dot.cmo \
-+ odoc.cmo
-
- EXECMXFILES= $(EXECMOFILES:.cmo=.cmx)
- EXECMIFILES= $(EXECMOFILES:.cmo=.cmi)
-@@ -199,10 +200,10 @@
- debug:
- make OCAMLPP=""
-
--$(OCAMLDOC): $(EXECMOFILES) odoc.cmo
-- $(OCAMLC) -o $@ -linkall unix.cma str.cma dynlink.cma $(LINKFLAGS) $(OCAMLCMOFILES) $(EXECMOFILES) odoc.cmo
--$(OCAMLDOC_OPT): $(EXECMXFILES) odoc_opt.cmx
-- $(OCAMLOPT) -o $@ unix.cmxa str.cmxa $(LINKFLAGS) $(OCAMLCMXFILES) $(EXECMXFILES) odoc_opt.cmx
-+$(OCAMLDOC): $(EXECMOFILES)
-+ $(OCAMLC) -o $@ -linkall unix.cma str.cma dynlink.cma $(LINKFLAGS) $(OCAMLCMOFILES) $(EXECMOFILES)
-+$(OCAMLDOC_OPT): $(EXECMXFILES)
-+ $(OCAMLOPT) -o $@ unix.cmxa str.cmxa dynlink.cmxa $(LINKFLAGS) $(OCAMLCMXFILES) $(EXECMXFILES)
-
- $(OCAMLDOC_LIBCMA): $(LIBCMOFILES)
- $(OCAMLC) -a -o $@ $(LINKFLAGS) $(OCAMLCMOFILES) $(LIBCMOFILES)
-@@ -211,7 +212,7 @@
-
- manpages: stdlib_man/Pervasives.3o
-
--dot: $(EXECMOFILES) odoc.cmo
-+dot: $(EXECMOFILES)
- $(OCAMLDOC_RUN) -dot -dot-reduce -o ocamldoc.dot $(INCLUDES) \
- odoc*.ml
-
-diff -urNad ocaml~/ocamldoc/odoc.ml ocaml/ocamldoc/odoc.ml
---- ocaml~/ocamldoc/odoc.ml 2009-04-06 13:52:17.000000000 +0200
-+++ ocaml/ocamldoc/odoc.ml 2009-04-06 13:56:34.272459850 +0200
-@@ -25,17 +25,18 @@
-
- (* we check if we must load a module given on the command line *)
- let arg_list = Array.to_list Sys.argv
--let (cmo_or_cma_opt, paths) =
-+let (cm_opt, paths) =
- let rec iter (f_opt, inc) = function
- [] | _ :: [] -> (f_opt, inc)
- | "-g" :: file :: q when
- ((Filename.check_suffix file "cmo") or
-- (Filename.check_suffix file "cma")) &
-+ (Filename.check_suffix file "cma") or
-+ (Filename.check_suffix file "cmxs")) &
- (f_opt = None) ->
-- iter (Some file, inc) q
-- | "-i" :: dir :: q ->
-- iter (f_opt, inc @ [dir]) q
-- | _ :: q ->
-+ iter (Some file, inc) q
-+ | "-i" :: dir :: q ->
-+ iter (f_opt, inc @ [dir]) q
-+ | _ :: q ->
- iter (f_opt, inc) q
- in
- iter (None, []) arg_list
-@@ -63,12 +64,11 @@
- )
-
- let _ =
-- match cmo_or_cma_opt with
-+ match cm_opt with
- None ->
- ()
- | Some file ->
-- (* initializations for dynamic loading *)
-- Dynlink.init ();
-+ let file = Dynlink.adapt_filename file in
- Dynlink.allow_unsafe_modules true;
- try
- let real_file = get_real_filename file in
-diff -urNad ocaml~/ocamldoc/odoc_args.ml ocaml/ocamldoc/odoc_args.ml
---- ocaml~/ocamldoc/odoc_args.ml 2009-04-06 13:52:17.000000000 +0200
-+++ ocaml/ocamldoc/odoc_args.ml 2009-04-06 13:56:34.272459850 +0200
-@@ -24,8 +24,6 @@
-
- let include_dirs = Clflags.include_dirs
-
--let bytecode_mode = ref true
--
- class type doc_generator =
- object
- method generate : Odoc_module.t_module list -> unit
-@@ -254,10 +252,8 @@
- "-dot", Arg.Unit (fun () -> set_doc_generator !default_dot_generator), M.generate_dot ;
- "-customdir", Arg.Unit (fun () -> Printf.printf "%s\n" Odoc_config.custom_generators_path; exit 0),
- M.display_custom_generators_dir ;
-- "-i", Arg.String (fun s -> if !bytecode_mode then () else (prerr_endline (M.option_not_in_native_code "-i"); exit 1)),
-- M.add_load_dir ;
-- "-g", Arg.String (fun s -> if !bytecode_mode then () else (prerr_endline (M.option_not_in_native_code "-g"); exit 1)),
-- M.load_file ^
-+ "-i", Arg.String (fun s -> ()), M.add_load_dir ;
-+ "-g", Arg.String (fun s -> ()), M.load_file ^
- "\n\n *** HTML options ***\n";
-
- (* html only options *)
-diff -urNad ocaml~/ocamldoc/odoc_args.mli ocaml/ocamldoc/odoc_args.mli
---- ocaml~/ocamldoc/odoc_args.mli 2009-04-06 13:52:17.000000000 +0200
-+++ ocaml/ocamldoc/odoc_args.mli 2009-04-06 13:56:34.272459850 +0200
-@@ -22,10 +22,6 @@
- (** The include_dirs in the OCaml compiler. *)
- val include_dirs : string list ref
-
--(** Indicate if we are in bytecode mode or not.
-- (For the [ocamldoc] command).*)
--val bytecode_mode : bool ref
--
- (** The class type of documentation generators. *)
- class type doc_generator =
- object method generate : Odoc_module.t_module list -> unit end
-diff -urNad ocaml~/ocamldoc/odoc_messages.ml ocaml/ocamldoc/odoc_messages.ml
---- ocaml~/ocamldoc/odoc_messages.ml 2009-04-06 13:52:17.000000000 +0200
-+++ ocaml/ocamldoc/odoc_messages.ml 2009-04-06 13:56:34.272459850 +0200
-@@ -24,7 +24,6 @@
- let usage = "Usage : "^(Sys.argv.(0))^" [options] <files>\n"
- let options_are = "Options are :"
- let option_version = "\tPrint version and exit"
--let bytecode_only = "(bytecode version only)"
- let latex_only = "(LaTeX only)"
- let texi_only = "(TeXinfo only)"
- let latex_texi_only = "(LaTeX and TeXinfo only)"
-@@ -41,8 +40,8 @@
- let option_text ="<file>\tConsider <file> as a .txt file"
- let display_custom_generators_dir = "\tDisplay custom generators standard directory and exit"
- let add_load_dir = "<dir>\tAdd the given directory to the search path for custom\n"^
-- "\t\tgenerators "^bytecode_only
--let load_file = "<file.cm[o|a]>\n\t\tLoad file defining a new documentation generator\n\t\t"^bytecode_only
-+ "\t\tgenerators"
-+let load_file = "<file.cm[o|a|xs]>\n\t\tLoad file defining a new documentation generator"
- let nolabels = "\tIgnore non-optional labels in types"
- let werr = "\tTreat ocamldoc warnings as errors"
- let hide_warnings = "\n\t\tdo not print ocamldoc warnings"
--- /dev/null
+0001-Pass-no-relax-to-ld-on-alpha.patch
+0002-Call-ld-with-proper-flags.patch
+0003-Don-t-use-rpath.patch
+0004-Put-manpages-in-section-3o-instead-of-3.patch
+0005-Add-to-ocamldoc-support-for-native-code-dynamic-load.patch
+0006-Patch-config.sh-for-installation.patch
+0007-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch
+0008-Add-missing-dynamic-linking-options-for-dbm.patch
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## stdlib_man_section.dpatch by Julien Cristau <julien.cristau@ens-lyon.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Put manpages in section 3o instead of 3.
-
-@DPATCH@
-diff -urNad ocaml~/ocamldoc/Makefile ocaml/ocamldoc/Makefile
---- ocaml~/ocamldoc/Makefile 2008-01-11 17:13:16.000000000 +0100
-+++ ocaml/ocamldoc/Makefile 2008-11-29 11:32:03.000000000 +0100
-@@ -318,7 +318,7 @@
- stdlib_man/Pervasives.3o: $(STDLIB_MLIS)
- $(MKDIR) stdlib_man
- $(OCAMLDOC_RUN) -man -d stdlib_man $(INCLUDES) \
-- -t "OCaml library" -man-mini \
-+ -t "OCaml library" -man-mini -man-section 3o \
- $(STDLIB_MLIS)
-
- autotest_stdlib: dummy
#!/usr/bin/make -f
-include /usr/share/dpatch/dpatch.make
+include /usr/share/quilt/quilt.make
PACKAGE := ocaml
ALL_PACKAGES := $(shell sed -ne 's/^Package: //p' debian/control)
binary-indep: binary-stamp
.PHONY: build clean binary-indep binary-arch binary install build ocamlinit
+
+.PHONY: redo-patches
+redo-patches:
+ rm -f debian/patches/*
+ git format-patch -N -o debian/patches upstream...patch-queue | \
+ sed -e 's%debian/patches/%%' > debian/patches/series
+ sed -i -e 1d debian/patches/*.patch