[Pkg-ocaml-maint-commits] [SCM] mlgmp packaging branch, master, updated. upstream/20021123-1-g853f6b2
Mike Furr
mfurr at debian.org
Fri Feb 27 22:25:43 UTC 2009
The following commit has been merged in the master branch:
commit 853f6b2316c669e8c91225ea009e218124edfb06
Author: Mike Furr <mfurr at debian.org>
Date: Fri Feb 27 17:09:09 2009 -0500
Updated with new dh-ocaml and moved to git.
diff --git a/debian/META b/debian/META
new file mode 100644
index 0000000..91a4071
--- /dev/null
+++ b/debian/META
@@ -0,0 +1,7 @@
+name="gmp"
+version="20021123"
+description="bindings to GNU MP library"
+archive(byte)="gmp.cma"
+archive(native)="gmp.cmxa"
+requires=""
+directory="+gmp"
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..3c75035
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,7 @@
+mlgmp for Debian
+----------------
+
+Note that this original source package contains creal v0.1 which is
+not built since creal v0.4 is packaged as a separate entity.
+
+ -- Mike Furr <mfurr at debian.org>, Fri Apr 9 22:20:43 2004
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..802d740
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,124 @@
+mlgmp (20021123-14) unstable; urgency=low
+
+ [ Mike Furr ]
+ * Changed packaging to git and updated VCS field
+ * Changed Maintainer to d-o-m, added self to uploaders
+ * Chnaged compat file to 7
+ * Bump standards to 3.8.0
+ * Cleaned up rules file and added build-dep on dh-ocaml
+ * Changed *.in to use new substitutation vars
+ * Added Homepage
+ * Install the .so file directly into the proper package tree via the
+ makefile, instead of moving it there manually in rules
+
+ [ Sylvain Le Gall ]
+ * Update my email address
+
+ -- Mike Furr <mfurr at debian.org> Fri, 27 Feb 2009 16:28:55 -0500
+
+mlgmp (20021123-13) unstable; urgency=medium
+
+ [ Stefano Zacchiroli ]
+ * fix vcs-svn field to point just above the debian/ dir
+ * fix typo in Sylvain's name
+ * bump urgency to medium for the OCaml 3.10.1 transition
+
+ [ Stephane Glondu ]
+ * Fix binNMU safety (Closes: #464312)
+ * Fix OCaml spelling in description
+ * Fix copyright file
+ * Use ${binary:Version} instead of deprecated ${Source-Version} in
+ debian/control
+ * Add Section:libs for source package
+ * Add descriptions to patches
+ * Fix lintian debian-rules-ignores-make-clean-error
+ * Removing empty stublibs directory from -dev package
+ * Update Standards-Version to 3.7.3
+
+ -- Stefano Zacchiroli <zack at debian.org> Sun, 02 Mar 2008 15:24:05 +0100
+
+mlgmp (20021123-12) unstable; urgency=low
+
+ * Rebuild with 3.10.0 (Closes: #441187)
+
+ -- Mike Furr <mfurr at debian.org> Fri, 07 Sep 2007 17:05:56 -0400
+
+mlgmp (20021123-11) unstable; urgency=low
+
+ * Standards-Version 3.7.2 (no change)
+ * Rebuild with Ocaml 3.09.2 (closes: Bug#369711)
+ * Package description: replaced "O'Caml" by "OCaml"
+ * debian/rules: changed name of the target "transition" into "debian/control"
+
+ -- Ralf Treinen <treinen at debian.org> Wed, 7 Jun 2006 22:24:56 +0200
+
+mlgmp (20021123-10) unstable; urgency=low
+
+ * Remove hard-coded ABI version
+ * Rebuild with 3.09.1
+
+ -- Mike Furr <mfurr at debian.org> Sat, 7 Jan 2006 18:04:32 -0500
+
+mlgmp (20021123-9) unstable; urgency=low
+
+ * Rebuild with 3.09
+
+ -- Mike Furr <mfurr at debian.org> Tue, 8 Nov 2005 22:29:07 -0500
+
+mlgmp (20021123-8) unstable; urgency=low
+
+ * Moved the binary packages into their proper sections of
+ libs && libdevel
+
+ -- Mike Furr <mfurr at debian.org> Mon, 5 Sep 2005 12:07:48 -0400
+
+mlgmp (20021123-7) unstable; urgency=low
+
+ * Use -O2 instead of -O3 to hopefully avoid an ICE on m68k
+ * Several bug fixes from Pascal Zimmer including
+ - Z2.copy is really Z.copy
+ - Added a real Z2.copy
+ - _mlgmp_z2_from_[int|string_base|float] now use mpz_set
+ insetad of mpz_init_set
+ - Added test suite for these functions
+
+ -- Mike Furr <mfurr at debian.org> Sat, 3 Sep 2005 15:11:10 -0400
+
+mlgmp (20021123-6) unstable; urgency=low
+
+ * Rebuild against new gmp package.
+
+ -- Mike Furr <mfurr at debian.org> Fri, 29 Jul 2005 12:31:36 -0400
+
+mlgmp (20021123-5) unstable; urgency=medium
+
+ * Rebuild against 3.08.3
+ * Set [Build-]Depends to 3.08.3
+
+ -- Mike Furr <mfurr at debian.org> Wed, 23 Mar 2005 12:54:24 -0500
+
+mlgmp (20021123-4) unstable; urgency=low
+
+ * Rebuild with ocaml 3.08
+ * Change deps to use ocaml-nox-3.08
+
+ -- Mike Furr <mfurr at debian.org> Thu, 22 Jul 2004 13:10:24 -0400
+
+mlgmp (20021123-3) unstable; urgency=low
+
+ * Added a depends on libgmp3-dev for libgmp-ocaml-dev pkg.
+
+ -- Mike Furr <mfurr at debian.org> Sun, 18 Apr 2004 21:32:08 -0400
+
+mlgmp (20021123-2) unstable; urgency=low
+
+ * Added -fPIC flag so it compiles on all archs
+ * Added ocaml team to uploaders field.
+
+ -- Mike Furr <mfurr at debian.org> Sun, 18 Apr 2004 12:26:51 -0400
+
+mlgmp (20021123-1) unstable; urgency=low
+
+ * Initial Release (Closes: 242841)
+
+ -- Mike Furr <mfurr at debian.org> Fri, 9 Apr 2004 02:05:56 -0400
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..38b63d2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,55 @@
+Source: mlgmp
+Priority: optional
+Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
+Uploaders:
+ Ralf Treinen <treinen at debian.org>,
+ Sven Luther <luther at debian.org>,
+ Remi Vanicat <vanicat at debian.org>,
+ Stefano Zacchiroli <zack at debian.org>,
+ Sylvain Le Gall <gildor at debian.org>,
+ Mike Furr <mfurr at debian.org>
+Build-Depends:
+ ocaml-nox (>= 3.10.0),
+ debhelper (>= 7.0.0),
+ dpatch,
+ libgmp3-dev,
+ libmpfr-dev,
+ dh-ocaml
+Homepage: http://www-verimag.imag.fr/~monniaux/programmes.html.en
+Standards-Version: 3.8.0
+Section: libs
+Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/mlgmp.git
+Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/perl4caml.git
+
+Package: libgmp-ocaml
+Architecture: any
+Section: libs
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends},
+ ocaml-nox-${F:OCamlAbi}
+Description: OCaml bindings for the GNU multiprecision arithmetic library
+ This package provides bindings for the GNU multiprecision library
+ (GNU MP) for the language OCaml (caml.inria.fr). It is mostly a 1-1 mapping
+ of the C functions into the OCaml namespace, but also includes some
+ infix operators to make for a cleaner syntax.
+ .
+ This package provides the shared library for running applications linked
+ against libgmp-ocaml
+
+Package: libgmp-ocaml-dev
+Architecture: any
+Section: libdevel
+Depends:
+ libgmp-ocaml (= ${binary:Version}),
+ ocaml-nox-${F:OCamlAbi},
+ libgmp3-dev,
+ ${misc:Depends}
+Description: OCaml bindings for the GNU multiprecision arithmetic library
+ This package provides bindings for the GNU multiprecision library
+ (GNU MP) for the language OCaml(caml.inria.fr). It is mostly a 1-1 mapping
+ of the C functions into the OCaml namespace, but also includes some
+ infix operators to make for a cleaner syntax.
+ .
+ This package provides the static library, OCaml library and interface
+ for developing applications to use libgmp-ocaml
diff --git a/README b/debian/copyright
similarity index 54%
copy from README
copy to debian/copyright
index 02c051a..f652e6d 100644
--- a/README
+++ b/debian/copyright
@@ -1,39 +1,16 @@
-This directory contains two separate programs:
+This package was debianized by Mike Furr <mfurr at debian.org> on
+Fri, 9 Apr 2004 02:05:56 -0400.
-*** Creal v0.1
-Copyright (C) 2000 Jean-Christophe Filliâtre.
+It was downloaded from http://www.di.ens.fr/~monniaux/download/mlgmp-20021123.tar.gz
-This module consists in the files containing the name "creal" and
-carrying J.C. Filliâtre's copyright.
+Upstream Author: David Monniaux <David.Monniaux at ens.fr>
-Most algorithms are from Valérie Ménissier-Morain Ph.D. thesis
-(http://www-calfor.lip6.fr/~vmm/)
+Copyright:
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License version 2, as
-published by the Free Software Foundation.
+ Copyright (C) 2001-2002 David Monniaux
+ Copyright (C) 2000 Jean-Christophe Filliatre
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU Library General Public License version 2 for more details
-
-This module was adapted for correct linking with the current version
-of ML GMP by D. Monniaux.
-
-
-*** ML GMP 2002/07/29
-Copyright (c) 2001,2002 David Monniaux
-
-This package provides an interface between Objective Caml
-(http://www.inria.fr) and
-- the GNU MP (http://www.swox.com/gmp/) library
-- the MPFR (http://www.mpfr.org) library
-
-The current version is meant for
-- Objective Caml 3.04
-- GNU MP 4.1
+Quote the README:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License version 2, as
@@ -60,3 +37,8 @@ conditions defined in clause 3 of the GNU Library General Public
License. This exception does not however invalidate any other reasons
why the executable file might be covered by the GNU Library General
Public License.
+
+End Quoate.
+Note, the LGPL is available as
+ /usr/share/common-licenses/LGPL-2
+on Debian systems
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/files b/debian/files
new file mode 100644
index 0000000..3a5547d
--- /dev/null
+++ b/debian/files
@@ -0,0 +1,2 @@
+libgmp-ocaml_20021123-14_amd64.deb libs optional
+libgmp-ocaml-dev_20021123-14_amd64.deb libdevel optional
diff --git a/debian/libgmp-ocaml.files.in b/debian/libgmp-ocaml.files.in
new file mode 100644
index 0000000..0afcee4
--- /dev/null
+++ b/debian/libgmp-ocaml.files.in
@@ -0,0 +1,2 @@
+ at OCamlDllDir@
+
diff --git a/debian/patched/10_config.dpatch b/debian/patched/10_config.dpatch
new file mode 100644
index 0000000..72ec1f1
--- /dev/null
+++ b/debian/patched/10_config.dpatch
@@ -0,0 +1 @@
+patching file config.h
diff --git a/debian/patched/11_Makefile.dpatch b/debian/patched/11_Makefile.dpatch
new file mode 100644
index 0000000..20e9829
--- /dev/null
+++ b/debian/patched/11_Makefile.dpatch
@@ -0,0 +1 @@
+patching file Makefile
diff --git a/debian/patched/15_bugfixes.dpatch b/debian/patched/15_bugfixes.dpatch
new file mode 100644
index 0000000..892a788
--- /dev/null
+++ b/debian/patched/15_bugfixes.dpatch
@@ -0,0 +1,4 @@
+patching file gmp.ml
+patching file gmp.mli
+patching file mlgmp_z.c
+patching file test_suite.ml
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..705ece7
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1,3 @@
+10_config.dpatch
+11_Makefile.dpatch
+15_bugfixes.dpatch
diff --git a/debian/patches/10_config.dpatch b/debian/patches/10_config.dpatch
new file mode 100755
index 0000000..b5ff580
--- /dev/null
+++ b/debian/patches/10_config.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+## 10_Makefile.dpatch by Mike Furr <mfurr at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Disabling MPFR
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
+
+if [ $# -lt 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+ at DPATCH@
+--- mlgmp-20021123.orig/config.h
++++ mlgmp-20021123/config.h
+@@ -1,5 +1,5 @@
+ #define SERIALIZE
+-#define USE_MPFR
++/*#define USE_MPFR*/
+ #define NDEBUG
+ #undef TRACE
diff --git a/debian/patches/11_Makefile.dpatch b/debian/patches/11_Makefile.dpatch
new file mode 100755
index 0000000..cf2f2e4
--- /dev/null
+++ b/debian/patches/11_Makefile.dpatch
@@ -0,0 +1,161 @@
+#! /bin/sh -e
+## 10_Makefile.dpatch by Mike Furr <mfurr at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handling non-native archs and proper handling of .so generation
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
+
+if [ $# -lt 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+ at DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./Makefile /tmp/dpep-work.HWFzlv/mlgmp-20021123/Makefile
+--- ./Makefile 2005-09-03 15:15:47.339340437 -0400
++++ /tmp/dpep-work.HWFzlv/mlgmp-20021123/Makefile 2005-09-03 15:15:56.140184593 -0400
+@@ -2,12 +2,14 @@
+ RANLIB= ranlib
+
+ OCAML_LIBDIR:= $(shell ocamlc -where)
+-GMP_INCLUDES= -I/opt/gmp/include -I/users/absint2/local/include -I$(HOME)/packages/gmp/include
++GMP_INCLUDES=
+
+-GMP_LIBDIR=/opt/gmp/lib
+-DESTDIR= $(OCAML_LIBDIR)/gmp
++GMP_LIBDIR=
++PREFIX= $(OCAML_LIBDIR)
++PKGDIR= $(PREFIX)/gmp/
++STUBDIR= $(PREFIX)/stublibs/
+
+-RLIBFLAGS= -cclib "-Wl,-rpath $(GMP_LIBDIR)" # Linux, FreeBSD
++#RLIBFLAGS= -cclib "-Wl,-rpath $(GMP_LIBDIR)" # Linux, FreeBSD
+ #RLIBFLAGS= -cclib "-Wl,-R $(GMP_LIBDIR)" # Solaris
+ # RLIBFLAGS= # MacOS X
+
+@@ -15,33 +17,53 @@
+ -cclib -lmpfr -cclib -lgmp -cclib -L$(DESTDIR)
+
+ CC= gcc
+-CFLAGS_MISC= -Wall -Wno-unused -g -O3
++CFLAGS_MISC= -Wall -Wno-unused -g -O2 -fPIC
+ #CFLAGS_MISC=
+ CFLAGS_INCLUDE= -I $(OCAML_LIBDIR) $(GMP_INCLUDES)
+ CFLAGS= $(CFLAGS_MISC) $(CFLAGS_INCLUDE)
+
+ OCAMLC= ocamlc -g
+ OCAMLOPT= ocamlopt
++OCAMLMKLIB= ocamlmklib
+ OCAMLFLAGS=
+
+ CMODULES= mlgmp_z.c mlgmp_q.c mlgmp_f.c mlgmp_fr.c mlgmp_random.c mlgmp_misc.c
+ CMODULES_O= $(CMODULES:%.c=%.o)
+
+-LIBS= libmlgmp.a gmp.a gmp.cma gmp.cmxa gmp.cmi
+
+ PROGRAMS= test_creal test_creal.opt essai essai.opt toplevel\
+ test_suite test_suite.opt
+-TESTS= test_suite test_suite.opt
++
++C_STATIC = libgmpstub.a
++C_SHARED = dllgmpstub.so
++
++HAS_OPT=
++BYTE_LIBS= gmp.cma gmp.cmi
++BYTE_TESTS= test_suite
++
++ifdef HAS_OPT
++ OPT_LIBS= gmp.cmxa
++ OPT_CMX= gmp.cmx
++ OPT_TESTS= test_suite.opt
++else
++ OPT_LIBS=
++ OPT_CMX=
++ OPT_TESTS=
++endif
++
++LIBS = $(C_SHARED) $(BYTE_LIBS) $(OPT_LIBS)
+
+ all: $(LIBS) tests
+
+ install: all
+- -mkdir $(DESTDIR)
+- cp $(LIBS) gmp.mli $(DESTDIR)
++ install -d $(DESTDIR)$(PKGDIR)
++ install -m 0644 -c $(BYTE_LIBS) $(OPT_LIBS) *.a gmp.mli $(DESTDIR)$(PKGDIR)
++ install -d $(STUBDIR)
++ install -m 0644 -c $(C_SHARED) $(STUBDIR)
+
+-tests: $(LIBS) $(TESTS)
++tests: $(LIBS) $(BYTE_TESTS) $(OPT_TESTS)
+ ./test_suite
+- ./test_suite.opt
++ if [ -e ./test_suite.opt ]; then ./test_suite.opt; fi
+
+ %.i: %.c
+ $(CC) $(CFLAGS) -E $*.c > $*.i
+@@ -63,15 +85,9 @@
+
+ $(CMODULES_O): conversions.c config.h
+
+-libmlgmp.a: $(CMODULES_O)
+- $(AR) -rc $@ $+
+- $(RANLIB) $@
+-
+-gmp.cma: gmp.cmo libmlgmp.a
+- $(OCAMLC) $(OCAMLFLAGS) -a gmp.cmo -cclib -lmlgmp $(LIBFLAGS) -o $@
+-
+-gmp.a gmp.cmxa: gmp.cmx libmlgmp.a
+- $(OCAMLOPT) $(OCAMLFLAGS) -a gmp.cmx -cclib -lmlgmp $(LIBFLAGS) -o $@
++dllgmpstub.so libgmpstub.a gmp.cma gmp.cmxa: gmp.cmo $(OPT_CMX) $(CMODULES_O)
++ $(OCAMLMKLIB) $(OCAMLFLAGS) -o gmp -oc gmpstub gmp.cmo \
++ $(OPT_CMX) $(CMODULES_O) -lgmp
+
+ pretty_gmp.cmo: pretty_gmp.cmi gmp.cmo
+
+@@ -81,27 +97,27 @@
+ essai: gmp.cma essai.cmo
+ $(OCAMLC) -custom $+ -o $@
+
+-essai.opt: gmp.cmxa essai.cmx
++essai.opt: gmp.cmxa essai.cmx
+ $(OCAMLOPT) $+ -o $@
+
+-test_creal: gmp.cma creal.cmo test_creal.cmo
+- $(OCAMLC) -custom $+ -o $@
++test_creal: gmp.cma creal.cmo test_creal.cmo
++ $(OCAMLC) $+ -o $@
+
+ test_creal.opt: gmp.cmxa creal.cmx test_creal.cmx
+ $(OCAMLOPT) $+ -o $@
+
+-test_suite: gmp.cma test_suite.cmo
+- $(OCAMLC) -custom $+ -o $@
++test_suite: gmp.cma test_suite.cmo
++ $(OCAMLC) -custom $+ -o $@ -cclib -L.
+
+ test_suite.opt: gmp.cmxa test_suite.cmx
+- $(OCAMLOPT) $+ -o $@
++ $(OCAMLOPT) $+ -o $@ -cclib -L.
+
+ clean:
+- rm -f *.o *.cm* $(PROGRAMS) *.a
++ -rm -f *.o *.cm* $(PROGRAMS) *.a *.so
+
+ depend:
+ ocamldep *.ml *.mli > depend
+
+ .PHONY: clean
+
+-include depend
++-include depend
diff --git a/debian/patches/15_bugfixes.dpatch b/debian/patches/15_bugfixes.dpatch
new file mode 100755
index 0000000..d95a122
--- /dev/null
+++ b/debian/patches/15_bugfixes.dpatch
@@ -0,0 +1,104 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 15_bugfixes.dpatch by Mike Furr <mfurr at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Various bugfixes in C bindings
+
+ at DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./gmp.ml /tmp/dpep-work.FYBj8e/mlgmp-20021123/gmp.ml
+--- ./gmp.ml 2002-11-23 08:13:53.000000000 -0500
++++ /tmp/dpep-work.FYBj8e/mlgmp-20021123/gmp.ml 2005-09-03 15:18:53.505890041 -0400
+@@ -66,7 +66,7 @@
+ external from_float: dest: t->float->unit = "_mlgmp_z2_from_float";;
+
+ external create: unit->t = "_mlgmp_z_create";;
+- external copy: dest: t-> from: t-> unit = "_mlgmp_z_copy";;
++ external copy: dest: t-> from: t-> unit = "_mlgmp_z2_copy";;
+ external add: dest: t-> t->t->unit = "_mlgmp_z2_add";;
+ external sub: dest: t-> t->t->unit = "_mlgmp_z2_sub";;
+ external mul: dest: t-> t->t->unit = "_mlgmp_z2_mul";;
+@@ -85,6 +85,7 @@
+
+ module Z = struct
+ type t = Z2.t;;
++ external copy: t->t = "_mlgmp_z_copy";;
+ external of_int: int->t = "_mlgmp_z_from_int";;
+ external from_int: int->t = "_mlgmp_z_from_int";;
+ external from_string_base: base: int->string->t="_mlgmp_z_from_string_base";;
+diff -urNad --exclude=CVS --exclude=.svn ./gmp.mli /tmp/dpep-work.FYBj8e/mlgmp-20021123/gmp.mli
+--- ./gmp.mli 2002-11-23 08:13:54.000000000 -0500
++++ /tmp/dpep-work.FYBj8e/mlgmp-20021123/gmp.mli 2005-09-03 15:18:53.505890041 -0400
+@@ -14,7 +14,7 @@
+ = "_mlgmp_z2_from_string_base"
+ external from_float : dest:t -> float -> unit = "_mlgmp_z2_from_float"
+ external create : unit -> t = "_mlgmp_z_create"
+- external copy : dest:t -> from:t -> unit = "_mlgmp_z_copy"
++ external copy : dest:t -> from:t -> unit = "_mlgmp_z2_copy"
+ external add : dest:t -> t -> t -> unit = "_mlgmp_z2_add"
+ external sub : dest:t -> t -> t -> unit = "_mlgmp_z2_sub"
+ external mul : dest:t -> t -> t -> unit = "_mlgmp_z2_mul"
+@@ -31,6 +31,7 @@
+ module Z :
+ sig
+ type t = Z2.t
++ external copy : t -> t = "_mlgmp_z_copy"
+ external from_int : int -> t = "_mlgmp_z_from_int"
+ external of_int : int -> t = "_mlgmp_z_from_int"
+ external from_string_base : base:int -> string -> t
+diff -urNad --exclude=CVS --exclude=.svn ./mlgmp_z.c /tmp/dpep-work.FYBj8e/mlgmp-20021123/mlgmp_z.c
+--- ./mlgmp_z.c 2002-11-23 12:47:20.000000000 -0500
++++ /tmp/dpep-work.FYBj8e/mlgmp-20021123/mlgmp_z.c 2005-09-03 15:18:53.506889909 -0400
+@@ -58,6 +58,13 @@
+ CAMLreturn(r);
+ }
+
++value _mlgmp_z2_copy(value dest, value from)
++{
++ CAMLparam2(dest, from);
++ mpz_set(*mpz_val(dest), *mpz_val(from));
++ CAMLreturn(Val_unit);
++}
++
+ value _mlgmp_z_from_int(value ml_val)
+ {
+ CAMLparam1(ml_val);
+@@ -88,21 +95,21 @@
+ value _mlgmp_z2_from_int(value r, value ml_val)
+ {
+ CAMLparam2(r, ml_val);
+- mpz_init_set_si(*mpz_val(r), Int_val(ml_val));
++ mpz_set_si(*mpz_val(r), Int_val(ml_val));
+ CAMLreturn(Val_unit);
+ }
+
+ value _mlgmp_z2_from_string_base(value r, value base, value ml_val)
+ {
+ CAMLparam3(r, base, ml_val);
+- mpz_init_set_str(*mpz_val(r), String_val(ml_val), Int_val(base));
++ mpz_set_str(*mpz_val(r), String_val(ml_val), Int_val(base));
+ CAMLreturn(Val_unit);
+ }
+
+ value _mlgmp_z2_from_float(value r, value ml_val)
+ {
+ CAMLparam2(r, ml_val);
+- mpz_init_set_d(*mpz_val(r), Double_val(ml_val));
++ mpz_set_d(*mpz_val(r), Double_val(ml_val));
+ CAMLreturn(Val_unit);
+ }
+
+diff -urNad --exclude=CVS --exclude=.svn ./test_suite.ml /tmp/dpep-work.FYBj8e/mlgmp-20021123/test_suite.ml
+--- ./test_suite.ml 2002-11-21 07:26:37.000000000 -0500
++++ /tmp/dpep-work.FYBj8e/mlgmp-20021123/test_suite.ml 2005-09-03 15:18:53.506889909 -0400
+@@ -1,5 +1,11 @@
+ open Gmp;;
+
++assert ((Z.from_int 578) = (let r = Z2.create () in Z2.copy r (Z.from_int 578); r));
++assert ((Z.from_int 578) = (let r = Z2.create () in Z2.from_int r 578; r));
++assert ((Z.from_int 578) = (let r = Z2.create () in Z2.from_string_base r 10 "578"; r));
++(*to be used only with corrected sources *)
++(*assert ((Z.from_int 578) = (Z.copy (Z.from_int 578)));*)
++assert ((Z.from_int 578) = (let r = Z2.create () in Z2.from_float r 578.; r));
+ assert ((Z.from_int 578) = (Z.from_string_base ~base: 10 "578"));
+ assert ((Z.from_int 578) = (Z.from_float 578.));
+ assert ((Z.to_string_base ~base: 10 (Z.from_int 578)) = "578");
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..0292fb6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,56 @@
+#!/usr/bin/make -f
+
+PACKAGE=libgmp-ocaml
+
+include /usr/share/ocaml/ocamlinit.mk
+include /usr/share/dpatch/dpatch.make
+
+INST_STUB = $(CURDIR)/debian/$(PACKAGE)/$(OCAML_DLL_DIR)
+
+build: ocamlinit build-stamp
+build-stamp: patch
+ dh build
+
+ $(MAKE) depend
+ if [ -e /usr/bin/ocamlopt ]; then \
+ $(MAKE) HAS_OPT=1; \
+ else \
+ $(MAKE); \
+ fi
+ touch build-stamp
+
+clean: clean1 unpatch ocamlinit-clean
+clean1:
+ dh_clean
+ $(MAKE) clean
+ rm -f depend
+
+install: build install-stamp
+install-stamp:
+ dh install --before auto_install
+
+ if [ -e /usr/bin/ocamlopt ]; then \
+ $(MAKE) HAS_OPT=1 install \
+ DESTDIR=$(CURDIR)/debian/$(PACKAGE)-dev \
+ STUBDIR=$(INST_STUB); \
+ else \
+ $(MAKE) install \
+ DESTDIR=$(CURDIR)/debian/$(PACKAGE)-dev\
+ STUBDIR=$(INST_STUB); \
+ fi
+ cp debian/META debian/$(PACKAGE)-dev/usr/lib/ocaml/$(OCAML_ABI)/gmp
+
+ dh install --after auto_install
+ touch $@
+
+binary-indep: install-stamp
+ dh $@
+
+binary-arch: install-stamp
+ echo 'F:OCamlAbi=$(OCAML_ABI)' >> debian/$(PACKAGE).substvars
+ echo 'F:OCamlAbi=$(OCAML_ABI)' >> debian/$(PACKAGE)-dev.substvars
+ dh $@
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean clean1 binary-indep binary-arch binary install
--
mlgmp packaging
More information about the Pkg-ocaml-maint-commits
mailing list