[Pkg-ocaml-maint-commits] [SCM] ocaml-sha packaging branch, master, updated. debian/1.6-1-13-g1c5ab0c
Eric Cooper
ecc at cmu.edu
Fri Feb 25 20:29:14 UTC 2011
The following commit has been merged in the master branch:
commit f19d61d8aa7fe3e7b40596af1c0a845919edba9e
Author: Eric Cooper <ecc at cmu.edu>
Date: Fri Feb 25 10:26:23 2011 -0500
use debian/patches for all changes to upstream source
diff --git a/debian/patches/0001-update-checksums-of-README-file.patch b/debian/patches/0001-update-checksums-of-README-file.patch
new file mode 100644
index 0000000..47c94be
--- /dev/null
+++ b/debian/patches/0001-update-checksums-of-README-file.patch
@@ -0,0 +1,34 @@
+From: Eric Cooper <ecc at cmu.edu>
+Date: Fri, 9 Oct 2009 14:55:26 -0400
+Subject: update checksums of README file
+
+
+Signed-off-by: Eric Cooper <ecc at cmu.edu>
+---
+ sha.test.ml | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sha.test.ml b/sha.test.ml
+index 0442c01..2a508a0 100644
+--- a/sha.test.ml
++++ b/sha.test.ml
+@@ -42,15 +42,15 @@ let ex_strings_sha512 = [
+
+ let ex_files_sha1 =
+ [ ("README",
+- "8da1775cea8540cf22a32765eadcb2239cc4d392") ]
++ "ebd97ba45cd1668d242d98522dc0004bb70df4a8") ]
+
+ let ex_files_sha256 =
+ [ ("README",
+- "4eea769a1a5c7be83342923a240d68bc8170f170f4b6265a044261e0f7a88af0") ]
++ "7f8213da9acc755d57f3650827176dcdf2f101ea486d5fa357e705d728480878") ]
+
+ let ex_files_sha512 =
+ [ ("README",
+- "ed93656a1581965acf5cb49e56bff52e56ae1e8a96f3ca7b305e2fbeeeea64adf90943611aea97b372243ea300eda6214d5552bcf5176fda161a6590f946262b") ]
++ "da82cac10002a838aceedc7910b76735ec87b2dce08755680910b8ff287c0f48a1910989f8e3a94f9cb5a391e66d811d190bc3568135514229051c06c6e93f6e") ]
+
+ let ex_channels_sha1 =
+ [ ("sha.test.ml", "e13052afa4916d56994378f847f157596f9638a2") ]
+--
diff --git a/debian/patches/0002-modify-Makefile.patch b/debian/patches/0002-modify-Makefile.patch
new file mode 100644
index 0000000..51acb93
--- /dev/null
+++ b/debian/patches/0002-modify-Makefile.patch
@@ -0,0 +1,153 @@
+From: Eric Cooper <ecc at cmu.edu>
+Date: Fri, 25 Feb 2011 08:56:49 -0500
+Subject: modify Makefile
+
+handle bytecode-only architectures
+
+add separate all-byte and install-byte targets
+
+add targets for bytecode version of tests
+
+include Shacommon module in libraries
+
+install DLLs for additional libraries
+
+use internal $(ccopts) variable so that we still get
+correct settings when CFLAGS is set by cdbs
+
+Signed-off-by: Eric Cooper <ecc at cmu.edu>
+---
+ Makefile | 61 +++++++++++++++++++++++++++++++++++++++----------------------
+ 1 files changed, 39 insertions(+), 22 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3224c59..3b0afb5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,4 @@
+-CFLAGS = -Wall -O3 -funroll-loops -I/usr/include
++ccopts = $(CFLAGS) -Wall -O3 -funroll-loops -fPIC -DPIC
+ OCAMLC = ocamlc
+ OCAMLOPT = ocamlopt
+ OCAMLMKLIB = ocamlmklib
+@@ -6,18 +6,20 @@ OCAMLMKLIB = ocamlmklib
+ OCAMLOPTFLAGS =
+
+ OCAML_TEST_INC = -I `ocamlfind query oUnit`
+-OCAML_TEST_LIB = `ocamlfind query oUnit`/oUnit.cmxa
++OCAML_TEST_LIB = `ocamlfind query oUnit`/oUnit
+
+ PROGRAMS = sha1sum sha256sum sha512sum
+
+-allshabytes = $(foreach n, 1 256 512, sha$(n).lib.o sha$(n)_stubs.o sha$(n).cmo)
+-allshaopts = $(foreach n, 1 256 512, sha$(n).lib.o sha$(n)_stubs.o sha$(n).cmx)
++allshabytes = shacommon.cmo $(foreach n, 1 256 512, sha$(n).lib.o sha$(n)_stubs.o sha$(n).cmo)
++allshaopts = shacommon.cmx $(foreach n, 1 256 512, sha$(n).lib.o sha$(n)_stubs.o sha$(n).cmx)
+
+-all: sha1.cmi sha1.cma sha1.cmxa sha256.cma sha256.cmxa sha512.cma sha512.cmxa sha.cma sha.cmxa
++all: all-byte all-opt
++all-byte: $(foreach n, 1 256 512, sha$(n).cma) sha.cma
++all-opt: $(foreach n, 1 256 512, sha$(n).cmxa) sha.cmxa
+
+ bins: $(PROGRAMS)
+
+-sha1sum: shacommon.cmx sha1.cmxa sha256.cmxa sha512.cmxa shasum.cmx
++sha1sum: sha.cmxa shasum.cmx
+ $(OCAMLOPT) $(OCAMLOPTFLAGS) -o $@ -cclib -L. $+
+
+ sha256sum: sha1sum
+@@ -26,43 +28,53 @@ sha256sum: sha1sum
+ sha512sum: sha1sum
+ cp $< $@
+
+-sha.cma: shacommon.cmo $(allshabytes)
++cmi_files = $(foreach n, 1 256 512, sha$(n).cmi)
++
++sha.cma: $(cmi_files) $(allshabytes)
+ $(OCAMLMKLIB) -o sha $(allshabytes)
+
+-sha.cmxa: shacommon.cmo $(allshaopts)
++sha.cmxa: $(cmi_files) $(allshaopts)
+ $(OCAMLMKLIB) -o sha $(allshaopts)
+
+ sha1.cma: shacommon.cmo sha1.cmi sha1.lib.o sha1_stubs.o sha1.cmo
+- $(OCAMLMKLIB) -o sha1 sha1.lib.o sha1_stubs.o sha1.cmo
++ $(OCAMLMKLIB) -o sha1 shacommon.cmo sha1.lib.o sha1_stubs.o sha1.cmo
+
+ sha1.cmxa: shacommon.cmx sha1.cmi sha1.lib.o sha1_stubs.o sha1.cmx
+- $(OCAMLMKLIB) -o sha1 sha1.lib.o sha1_stubs.o sha1.cmx
++ $(OCAMLMKLIB) -o sha1 shacommon.cmx sha1.lib.o sha1_stubs.o sha1.cmx
+
+ sha256.cma: shacommon.cmo sha256.cmi sha256.lib.o sha256_stubs.o sha256.cmo
+- $(OCAMLMKLIB) -o sha256 sha256.lib.o sha256_stubs.o sha256.cmo
++ $(OCAMLMKLIB) -o sha256 shacommon.cmo sha256.lib.o sha256_stubs.o sha256.cmo
+
+ sha256.cmxa: shacommon.cmx sha256.cmi sha256.lib.o sha256_stubs.o sha256.cmx
+- $(OCAMLMKLIB) -o sha256 sha256.lib.o sha256_stubs.o sha256.cmx
++ $(OCAMLMKLIB) -o sha256 shacommon.cmx sha256.lib.o sha256_stubs.o sha256.cmx
+
+ sha512.cma: shacommon.cmo sha512.cmi sha512.lib.o sha512_stubs.o sha512.cmo
+- $(OCAMLMKLIB) -o sha512 sha512.lib.o sha512_stubs.o sha512.cmo
++ $(OCAMLMKLIB) -o sha512 shacommon.cmo sha512.lib.o sha512_stubs.o sha512.cmo
+
+ sha512.cmxa: shacommon.cmx sha512.cmi sha512.lib.o sha512_stubs.o sha512.cmx
+- $(OCAMLMKLIB) -o sha512 sha512.lib.o sha512_stubs.o sha512.cmx
++ $(OCAMLMKLIB) -o sha512 shacommon.cmx sha512.lib.o sha512_stubs.o sha512.cmx
+
+ tests: sha.test
+ ./sha.test
+
+-sha.test: sha1.cmxa sha256.cmxa sha512.cmxa sha.test.cmx
++sha.test: sha.cmxa sha.test.cmx
+
+ %.test:
+- $(OCAMLOPT) -o $@ $(OCAML_BFLAGS) unix.cmxa $(OCAML_TEST_INC) $(OCAML_TEST_LIB) $+
++ $(OCAMLOPT) -o $@ -cclib -L. $(OCAML_BFLAGS) unix.cmxa $(OCAML_TEST_INC) $(OCAML_TEST_LIB).cmxa $+
++
++bytetests: sha.bytetest
++ ./sha.bytetest
++
++sha.bytetest: sha.cma sha.test.cmo
++
++%.bytetest:
++ $(OCAMLC) -o $@ -cclib -L. $(OCAML_BFLAGS) unix.cma $(OCAML_TEST_INC) $(OCAML_TEST_LIB).cma $+
+
+ %.test.cmo: %.test.ml
+- $(OCAMLC) -c -o $@ $(OCAML_BFLAGS) -custom $(OCAML_TEST_INC) $<
++ $(OCAMLC) -c -o $@ -w x $(OCAML_BFLAGS) $(OCAML_TEST_INC) $<
+
+ %.test.cmx: %.test.ml
+- $(OCAMLOPT) -c -o $@ $(OCAML_BFLAGS) $(OCAML_TEST_INC) $<
++ $(OCAMLOPT) -c -o $@ -w x $(OCAML_BFLAGS) $(OCAML_TEST_INC) $<
+
+ %.cmo: %.ml
+ $(OCAMLC) -c -o $@ $<
+@@ -74,7 +86,7 @@ sha.test: sha1.cmxa sha256.cmxa sha512.cmxa sha.test.cmx
+ $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -o $@ $<
+
+ %.o: %.c
+- $(OCAMLC) -ccopt "$(CFLAGS)" -c -o $@ $<
++ $(OCAMLC) -ccopt "$(ccopts)" -c -o $@ $<
+
+ %.lib.o: %.o
+ mv $< $@
+@@ -85,10 +97,15 @@ doc:
+ ocamldoc -html -d html *.mli
+
+ clean:
+- rm -f *.o *.a *.cmo *.cmi *.cma *.cmx *.cmxa sha.test $(PROGRAMS)
++ rm -f *.o *.a *.so *.cmo *.cmi *.cma *.cmx *.cmxa sha.test sha.bytetest $(PROGRAMS)
++
++interfaces = $(cmi_files) $(cmi_files:.cmi=.mli)
++
++install: all
++ ocamlfind install sha META $(interfaces) *.cma *.cmxa *.a *.so
+
+-install: sha1.cma sha1.cmxa sha256.cma sha256.cmxa sha512.cma sha512.cmxa sha.cma sha.cmxa META
+- ocamlfind install sha META *.cmx sha1.cmi sha1.cma sha1.cmxa sha256.cmi sha256.cma sha256.cmxa sha512.cmi sha512.cma sha512.cmxa sha.cma sha.cmxa *.a *.so
++install-byte: all-byte
++ ocamlfind install sha META $(interfaces) *.cma *.a *.so
+
+ uninstall:
+ ocamlfind remove sha
+--
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b77f009
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-update-checksums-of-README-file.patch
+0002-modify-Makefile.patch
--
ocaml-sha packaging
More information about the Pkg-ocaml-maint-commits
mailing list