summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authormarkd <markd@pkgsrc.org>2016-02-07 21:43:03 +0000
committermarkd <markd@pkgsrc.org>2016-02-07 21:43:03 +0000
commitccff423ef54def16a5e6000c513cbef7f7f38aea (patch)
tree302eebab3b27fc90702352ad6eceaff2042756c2 /math
parent6d886ac57780b13f6c1dee55b37457ee41b1d896 (diff)
downloadpkgsrc-ccff423ef54def16a5e6000c513cbef7f7f38aea.tar.gz
Add ocaml-zarith 1.4.1
The Zarith library implements arithmetic and logical operations over arbitrary precision numbers. It uses GMP to efficiently implement arithmetic over large numbers. Small integers are represented as Caml unboxed integers for speed and space economy.
Diffstat (limited to 'math')
-rw-r--r--math/ocaml-zarith/DESCR4
-rw-r--r--math/ocaml-zarith/Makefile27
-rw-r--r--math/ocaml-zarith/PLIST15
-rw-r--r--math/ocaml-zarith/buildlink3.mk13
-rw-r--r--math/ocaml-zarith/patches/patch-configure28
5 files changed, 87 insertions, 0 deletions
diff --git a/math/ocaml-zarith/DESCR b/math/ocaml-zarith/DESCR
new file mode 100644
index 00000000000..5bf8a1849cb
--- /dev/null
+++ b/math/ocaml-zarith/DESCR
@@ -0,0 +1,4 @@
+The Zarith library implements arithmetic and logical operations over
+arbitrary precision numbers. It uses GMP to efficiently implement
+arithmetic over large numbers. Small integers are represented as Caml
+unboxed integers for speed and space economy.
diff --git a/math/ocaml-zarith/Makefile b/math/ocaml-zarith/Makefile
new file mode 100644
index 00000000000..549d305799b
--- /dev/null
+++ b/math/ocaml-zarith/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1 2016/02/07 21:43:03 markd Exp $
+#
+
+DISTNAME= ocaml-zarith-1.4.1
+CATEGORIES= math
+MASTER_SITES= http://forge.ocamlcore.org/frs/download.php/1574/
+
+MAINTAINER= markd@NetBSD.org
+HOMEPAGE= http://forge.ocamlcore.org/projects/zarith
+COMMENT= OCaml arithmetic library for arbitrary precision integers
+LICENSE= gnu-lgpl-v2
+
+DEPENDS+= ocaml-findlib-[0-9]*:../../devel/ocaml-findlib
+
+HAS_CONFIGURE= yes
+CONFIGURE_ENV+= DESTDIR=${DESTDIR}
+USE_TOOLS+= gmake perl
+
+INSTALLATION_DIRS= lib/ocaml/site-lib
+
+WRKSRC= ${WRKDIR}/${DISTNAME:S/ocaml-//}
+
+REPLACE_PERL+= z_pp.pl
+
+.include "../../devel/gmp/buildlink3.mk"
+.include "../../lang/ocaml/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/ocaml-zarith/PLIST b/math/ocaml-zarith/PLIST
new file mode 100644
index 00000000000..acb817ec372
--- /dev/null
+++ b/math/ocaml-zarith/PLIST
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST,v 1.1 2016/02/07 21:43:03 markd Exp $
+lib/ocaml/site-lib/zarith/big_int_Z.cmi
+lib/ocaml/site-lib/zarith/big_int_Z.mli
+lib/ocaml/site-lib/zarith/dllzarith.so
+lib/ocaml/site-lib/zarith/libzarith.a
+lib/ocaml/site-lib/zarith/META
+lib/ocaml/site-lib/zarith/q.cmi
+lib/ocaml/site-lib/zarith/q.mli
+lib/ocaml/site-lib/zarith/zarith.a
+lib/ocaml/site-lib/zarith/zarith.cma
+lib/ocaml/site-lib/zarith/zarith.cmxa
+lib/ocaml/site-lib/zarith/zarith.cmxs
+lib/ocaml/site-lib/zarith/zarith.h
+lib/ocaml/site-lib/zarith/z.cmi
+lib/ocaml/site-lib/zarith/z.mli
diff --git a/math/ocaml-zarith/buildlink3.mk b/math/ocaml-zarith/buildlink3.mk
new file mode 100644
index 00000000000..1d62fd01d0c
--- /dev/null
+++ b/math/ocaml-zarith/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2016/02/07 21:43:03 markd Exp $
+
+BUILDLINK_TREE+= ocaml-zarith
+
+.if !defined(OCAML_ZARITH_BUILDLINK3_MK)
+OCAML_ZARITH_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.ocaml-zarith+= ocaml-zarith>=1.2.1
+BUILDLINK_PKGSRCDIR.ocaml-zarith?= ../../math/ocaml-zarith
+
+.endif # OCAML_ZARITH_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -ocaml-zarith
diff --git a/math/ocaml-zarith/patches/patch-configure b/math/ocaml-zarith/patches/patch-configure
new file mode 100644
index 00000000000..041eeba626d
--- /dev/null
+++ b/math/ocaml-zarith/patches/patch-configure
@@ -0,0 +1,28 @@
+$NetBSD: patch-configure,v 1.1 2016/02/07 21:43:03 markd Exp $
+
+--- configure.orig 2013-06-12 07:13:59.000000000 +0000
++++ configure
+@@ -304,6 +304,14 @@ case $host in
+ arch='i686'
+ fi
+ ;;
++ i386-*freebsd* | i386-*netbsd* | i386-*dragonfly*)
++ ccdef="-DZ_ELF -DZ_DOT_LABEL_PREFIX $ccdef"
++ arch='i686'
++ ;;
++ amd64-*freebsd* | amd64-*netbsd* | x86_64-*dragonfly*)
++ ccdef="-DZ_ELF -DZ_DOT_LABEL_PREFIX $ccdef"
++ arch='x86_64'
++ ;;
+ i386-*darwin* | x86_64-*darwin*)
+ ccdef="-DZ_UNDERSCORE_PREFIX -DZ_MACOS $ccdef"
+ if test "x$wordsize" = "x64"; then
+@@ -401,7 +409,7 @@ CFLAGS=$ccinc $ccdef $ccopt
+ ASFLAGS=$ccdef $asopt
+ LIBS=$cclib
+ ARCH=$arch
+-INSTALLDIR=$installdir
++INSTALLDIR=${DESTDIR}$installdir
+ AR=$ar
+ INSTALL=install
+ OCAMLFIND=ocamlfind