[Pkg-ocaml-maint-commits] [SCM] dh-ocaml packaging branch, master, updated. debian/0.9.3-16-ga443dc6

Stephane Glondu steph at glondu.net
Wed Jun 16 15:17:53 UTC 2010


The following commit has been merged in the master branch:
commit 931211ccf33618d6c13b0e06ed0ac27027250ea8
Author: Stephane Glondu <steph at glondu.net>
Date:   Wed Jun 9 10:31:52 2010 +0200

    Add support for DYN: lines in *.in files (on archs with natdynlink)

diff --git a/debhelper/dh_ocamlinit b/debhelper/dh_ocamlinit
index c82ab46..72c276f 100755
--- a/debhelper/dh_ocamlinit
+++ b/debhelper/dh_ocamlinit
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 
 # Copyright © 2009 Mehdi Dogguy <mehdi at debian.org>
+# Copyright © 2010 Stéphane Glondu <glondu at debian.org>
 #
 # This is free software, you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 or above
@@ -54,6 +55,7 @@ Clean files generated from present debian/*.in ones and exit.
 
 my $ocamlc = "/usr/bin/ocamlc";
 my $ocamlopt = "/usr/bin/ocamlopt";
+my $dynlinkcmxa = "`$ocamlc -where`/dynlink.cmxa";
 error "$ocamlc does not exists or is not executable" unless -x $ocamlc;
 
 chomp (my $ocaml_version = `$ocamlc -version`);
@@ -78,6 +80,12 @@ if (-x $ocamlopt) {
     $ocamlinit_sed .= " -e '/^OPT: /d' -e 's/^BYTE: //'";
 }
 
+if (-f $dynlinkcmxa) {
+    $ocamlinit_sed .= " -e 's/^DYN: //'";
+} else {
+    $ocamlinit_sed .= " -e '/^DYN: /d'";
+}
+
 $ocamlinit_sed .= " ".$ENV{"OCAMLINIT_SED"} if $ENV{"OCAMLINIT_SED"};
 
 foreach my $file (@ocaml_in_files) {

-- 
dh-ocaml packaging



More information about the Pkg-ocaml-maint-commits mailing list