From 0490dc3efeb1682cb67b1f3705d1f15f4c3c517a Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Tue, 19 May 2009 17:36:45 +0200 Subject: [PATCH] Convert patches to quilt --- debian/README.source | 11 +++ debian/control | 2 +- debian/control.in | 2 +- ...> 0001-Pass-no-relax-to-ld-on-alpha.patch} | 29 +++--- .../0002-Call-ld-with-proper-flags.patch | 27 ++++++ debian/patches/0003-Don-t-use-rpath.patch | 27 ++++++ ...-manpages-in-section-3o-instead-of-3.patch | 24 +++++ ...upport-for-native-code-dynamic-load.patch} | 91 +++++++++++-------- ...006-Patch-config.sh-for-installation.patch | 39 ++++++++ ...d-as-a-link-on-either-.native-or-.b.patch} | 27 +++--- ...sing-dynamic-linking-options-for-dbm.patch | 24 +++++ debian/patches/00list | 8 -- .../patches/call_ld_with_proper_flags.dpatch | 21 ----- debian/patches/dbm_ldopts.dpatch | 32 ------- debian/patches/install_scripts_config.dpatch | 32 ------- debian/patches/missing-manpage-links.dpatch | 16 ---- debian/patches/no_rpath.dpatch | 22 ----- debian/patches/series | 8 ++ debian/patches/stdlib_man_section.dpatch | 19 ---- debian/rules | 9 +- 20 files changed, 256 insertions(+), 214 deletions(-) rename debian/patches/{alpha_ld_no-relax.dpatch => 0001-Pass-no-relax-to-ld-on-alpha.patch} (60%) mode change 100755 => 100644 create mode 100644 debian/patches/0002-Call-ld-with-proper-flags.patch create mode 100644 debian/patches/0003-Don-t-use-rpath.patch create mode 100644 debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch rename debian/patches/{ocamldoc_natdynlink.dpatch => 0005-Add-to-ocamldoc-support-for-native-code-dynamic-load.patch} (71%) mode change 100755 => 100644 create mode 100644 debian/patches/0006-Patch-config.sh-for-installation.patch rename debian/patches/{install_ocamlbuild.dpatch => 0007-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch} (59%) mode change 100755 => 100644 create mode 100644 debian/patches/0008-Add-missing-dynamic-linking-options-for-dbm.patch delete mode 100644 debian/patches/00list delete mode 100755 debian/patches/call_ld_with_proper_flags.dpatch delete mode 100755 debian/patches/dbm_ldopts.dpatch delete mode 100755 debian/patches/install_scripts_config.dpatch delete mode 100755 debian/patches/missing-manpage-links.dpatch delete mode 100755 debian/patches/no_rpath.dpatch create mode 100644 debian/patches/series delete mode 100755 debian/patches/stdlib_man_section.dpatch diff --git a/debian/README.source b/debian/README.source index 25819cfd..45ded35e 100644 --- a/debian/README.source +++ b/debian/README.source @@ -9,3 +9,14 @@ are generated from *.install.in by ocamlinit.mk (from dh-ocaml), and 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. diff --git a/debian/control b/debian/control index 75e752cd..60a9950c 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Build-Depends: tk8.4-dev, libncurses5-dev, libgdbm-dev, - dpatch, + quilt, bzip2, docbook-xml, docbook-utils, diff --git a/debian/control.in b/debian/control.in index 759b6b76..de994482 100644 --- a/debian/control.in +++ b/debian/control.in @@ -15,7 +15,7 @@ Build-Depends: tk8.4-dev, libncurses5-dev, libgdbm-dev, - dpatch, + quilt, bzip2, docbook-xml, docbook-utils, diff --git a/debian/patches/alpha_ld_no-relax.dpatch b/debian/patches/0001-Pass-no-relax-to-ld-on-alpha.patch old mode 100755 new mode 100644 similarity index 60% rename from debian/patches/alpha_ld_no-relax.dpatch rename to debian/patches/0001-Pass-no-relax-to-ld-on-alpha.patch index 9b47c685..11ee3070 --- a/debian/patches/alpha_ld_no-relax.dpatch +++ b/debian/patches/0001-Pass-no-relax-to-ld-on-alpha.patch @@ -1,16 +1,18 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## alpha_ld_no-relax.dpatch by Stefano Zacchiroli -## -## 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) +From: Stefano Zacchiroli +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(-) -@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 @@ +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"; @@ -20,7 +22,7 @@ diff -urNad ocaml~/configure ocaml/configure cc,mips-*-irix6*) # Add -n32 flag to ensure compatibility with native-code compiler bytecccompopts="-n32" -@@ -684,6 +685,7 @@ +@@ -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;; @@ -28,3 +30,6 @@ diff -urNad ocaml~/configure ocaml/configure *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";; amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; *,gcc*,*,*) nativecccompopts="$gcc_warnings";; +-- +1.6.2.4 + diff --git a/debian/patches/0002-Call-ld-with-proper-flags.patch b/debian/patches/0002-Call-ld-with-proper-flags.patch new file mode 100644 index 00000000..d6fdd438 --- /dev/null +++ b/debian/patches/0002-Call-ld-with-proper-flags.patch @@ -0,0 +1,27 @@ +From: Stefano Zacchiroli +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 + diff --git a/debian/patches/0003-Don-t-use-rpath.patch b/debian/patches/0003-Don-t-use-rpath.patch new file mode 100644 index 00000000..f6611e68 --- /dev/null +++ b/debian/patches/0003-Don-t-use-rpath.patch @@ -0,0 +1,27 @@ +From: Stefano Zacchiroli +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 + diff --git a/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch b/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch new file mode 100644 index 00000000..56d11936 --- /dev/null +++ b/debian/patches/0004-Put-manpages-in-section-3o-instead-of-3.patch @@ -0,0 +1,24 @@ +From: Julien Cristau +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 + diff --git a/debian/patches/ocamldoc_natdynlink.dpatch b/debian/patches/0005-Add-to-ocamldoc-support-for-native-code-dynamic-load.patch old mode 100755 new mode 100644 similarity index 71% rename from debian/patches/ocamldoc_natdynlink.dpatch rename to debian/patches/0005-Add-to-ocamldoc-support-for-native-code-dynamic-load.patch index 99aaf809..2bb7912d --- a/debian/patches/ocamldoc_natdynlink.dpatch +++ b/debian/patches/0005-Add-to-ocamldoc-support-for-native-code-dynamic-load.patch @@ -1,17 +1,24 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## ocamldoc_natdynlink.dpatch by Stefano Zacchiroli -## -## 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. +From: Stefano Zacchiroli +Date: Tue, 19 May 2009 17:25:59 +0200 +Subject: [PATCH] Add to ocamldoc support for native code dynamic loading -@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 @@ +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), @@ -23,10 +30,11 @@ diff -urNad ocaml~/man/ocamldoc.m ocaml/man/ocamldoc.m 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 @@ +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) @@ -53,7 +61,7 @@ diff -urNad ocaml~/ocamldoc/Makefile ocaml/ocamldoc/Makefile EXECMXFILES= $(EXECMOFILES:.cmo=.cmx) EXECMIFILES= $(EXECMOFILES:.cmo=.cmi) -@@ -199,10 +200,10 @@ +@@ -199,10 +200,10 @@ libopt: $(OCAMLDOC_LIBCMXA) $(OCAMLDOC_LIBCMI) debug: make OCAMLPP="" @@ -68,7 +76,7 @@ diff -urNad ocaml~/ocamldoc/Makefile ocaml/ocamldoc/Makefile $(OCAMLDOC_LIBCMA): $(LIBCMOFILES) $(OCAMLC) -a -o $@ $(LINKFLAGS) $(OCAMLCMOFILES) $(LIBCMOFILES) -@@ -211,7 +212,7 @@ +@@ -211,7 +212,7 @@ $(OCAMLDOC_LIBCMXA): $(LIBCMXFILES) manpages: stdlib_man/Pervasives.3o @@ -77,10 +85,11 @@ diff -urNad ocaml~/ocamldoc/Makefile ocaml/ocamldoc/Makefile $(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 @@ +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 @@ -105,7 +114,7 @@ diff -urNad ocaml~/ocamldoc/odoc.ml ocaml/ocamldoc/odoc.ml iter (f_opt, inc) q in iter (None, []) arg_list -@@ -63,12 +64,11 @@ +@@ -63,12 +64,11 @@ let get_real_filename name = ) let _ = @@ -120,10 +129,11 @@ diff -urNad ocaml~/ocamldoc/odoc.ml ocaml/ocamldoc/odoc.ml 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 @@ +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 @@ -132,7 +142,7 @@ diff -urNad ocaml~/ocamldoc/odoc_args.ml ocaml/ocamldoc/odoc_args.ml class type doc_generator = object method generate : Odoc_module.t_module list -> unit -@@ -254,10 +252,8 @@ +@@ -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 ; @@ -145,10 +155,11 @@ diff -urNad ocaml~/ocamldoc/odoc_args.ml ocaml/ocamldoc/odoc_args.ml "\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 @@ +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 @@ -159,10 +170,11 @@ diff -urNad ocaml~/ocamldoc/odoc_args.mli ocaml/ocamldoc/odoc_args.mli (** 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 @@ +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] \n" let options_are = "Options are :" let option_version = "\tPrint version and exit" @@ -170,7 +182,7 @@ diff -urNad ocaml~/ocamldoc/odoc_messages.ml ocaml/ocamldoc/odoc_messages.ml let latex_only = "(LaTeX only)" let texi_only = "(TeXinfo only)" let latex_texi_only = "(LaTeX and TeXinfo only)" -@@ -41,8 +40,8 @@ +@@ -41,8 +40,8 @@ let option_intf ="\tConsider as a .mli file" let option_text ="\tConsider as a .txt file" let display_custom_generators_dir = "\tDisplay custom generators standard directory and exit" let add_load_dir = "\tAdd the given directory to the search path for custom\n"^ @@ -181,3 +193,6 @@ diff -urNad ocaml~/ocamldoc/odoc_messages.ml ocaml/ocamldoc/odoc_messages.ml 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 + diff --git a/debian/patches/0006-Patch-config.sh-for-installation.patch b/debian/patches/0006-Patch-config.sh-for-installation.patch new file mode 100644 index 00000000..db2e87e8 --- /dev/null +++ b/debian/patches/0006-Patch-config.sh-for-installation.patch @@ -0,0 +1,39 @@ +From: Ralf Treinen +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 + diff --git a/debian/patches/install_ocamlbuild.dpatch b/debian/patches/0007-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch old mode 100755 new mode 100644 similarity index 59% rename from debian/patches/install_ocamlbuild.dpatch rename to debian/patches/0007-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch index d95ddda6..0fc5ce15 --- a/debian/patches/install_ocamlbuild.dpatch +++ b/debian/patches/0007-Install-ocamlbuild-as-a-link-on-either-.native-or-.b.patch @@ -1,14 +1,16 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## install_ocamlbuild.dpatch by Stefano Zacchiroli -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: install ocamlbuild as a link on either .native or .byte. +From: Stefano Zacchiroli +Date: Tue, 19 May 2009 17:28:56 +0200 +Subject: [PATCH] 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 @@ +--- + 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" } @@ -30,7 +32,7 @@ diff -urNad ocaml~/build/partial-install.sh ocaml/build/partial-install.sh installlib() { if [ -f "$1" ]; then dest="$2/`basename $1`" -@@ -156,7 +171,7 @@ +@@ -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 @@ -39,3 +41,6 @@ diff -urNad ocaml~/build/partial-install.sh ocaml/build/partial-install.sh installlibdir \ ocamlbuildlib.$A \ +-- +1.6.2.4 + diff --git a/debian/patches/0008-Add-missing-dynamic-linking-options-for-dbm.patch b/debian/patches/0008-Add-missing-dynamic-linking-options-for-dbm.patch new file mode 100644 index 00000000..c10e26dc --- /dev/null +++ b/debian/patches/0008-Add-missing-dynamic-linking-options-for-dbm.patch @@ -0,0 +1,24 @@ +From: Stephane Glondu +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 + diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index a5be651c..00000000 --- a/debian/patches/00list +++ /dev/null @@ -1,8 +0,0 @@ -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 diff --git a/debian/patches/call_ld_with_proper_flags.dpatch b/debian/patches/call_ld_with_proper_flags.dpatch deleted file mode 100755 index 5cb4a680..00000000 --- a/debian/patches/call_ld_with_proper_flags.dpatch +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## call_ld_with_proper_flags.dpatch by Stefano Zacchiroli -## -## 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 diff --git a/debian/patches/dbm_ldopts.dpatch b/debian/patches/dbm_ldopts.dpatch deleted file mode 100755 index 31d782f9..00000000 --- a/debian/patches/dbm_ldopts.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh -e -## dbm_ldopts.dpatch by Stephane Glondu -## -## 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 - diff --git a/debian/patches/install_scripts_config.dpatch b/debian/patches/install_scripts_config.dpatch deleted file mode 100755 index 626b5f88..00000000 --- a/debian/patches/install_scripts_config.dpatch +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## install_scripts_config.dpatch by Ralf Treinen -## -## 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 - -@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 - diff --git a/debian/patches/missing-manpage-links.dpatch b/debian/patches/missing-manpage-links.dpatch deleted file mode 100755 index b131adcd..00000000 --- a/debian/patches/missing-manpage-links.dpatch +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## missing-manpage-links.dpatch by -## -## 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) diff --git a/debian/patches/no_rpath.dpatch b/debian/patches/no_rpath.dpatch deleted file mode 100755 index 3547e15d..00000000 --- a/debian/patches/no_rpath.dpatch +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## no_rpath.dpatch by Stefano Zacchiroli -## -## 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 diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..86e69379 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,8 @@ +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 diff --git a/debian/patches/stdlib_man_section.dpatch b/debian/patches/stdlib_man_section.dpatch deleted file mode 100755 index dab3fde2..00000000 --- a/debian/patches/stdlib_man_section.dpatch +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## stdlib_man_section.dpatch by Julien Cristau -## -## 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 diff --git a/debian/rules b/debian/rules index 7e25b094..6e2e7ad3 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,5 @@ #!/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) @@ -215,3 +215,10 @@ binary-arch: binary-stamp 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 -- 2.30.2