Created a new package, devel/ocaml-result. This is a compatibility library

so that packages can remain compatible with OCaml <= 4.03 while using the
Result type.
This commit is contained in:
jaapb 2016-08-17 15:55:53 +00:00
parent aaa21a29da
commit 5fddf7cfe6
6 changed files with 72 additions and 0 deletions

3
devel/ocaml-result/DESCR Normal file
View file

@ -0,0 +1,3 @@
Projects that want to use the new result type defined in OCaml >= 4.03 while
staying compatible with older version of OCaml should use the Result module
defined in this library.

View file

@ -0,0 +1,24 @@
# $NetBSD: Makefile,v 1.1 2016/08/17 15:55:53 jaapb Exp $
GITHUB_PROJECT= result
DISTNAME= ${GITHUB_PROJECT}-1.2
PKGNAME= ocaml-${DISTNAME}
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=janestreet/}
MAINTAINER= jaapb@NetBSD.org
HOMEPAGE= https://github.com/janestreet/result/
COMMENT= OCaml compatibility library for Result module
LICENSE= modified-bsd
USE_LANGUAGES= # none
OCAML_USE_FINDLIB= yes
.include "../../mk/ocaml.mk"
BUILD_TARGET= byte
.if (${OCAML_USE_OPT_COMPILER} == "yes")
BUILD_TARGET+= native
.endif
BUILD_TARGET+= result.install
.include "../../mk/bsd.pkg.mk"

12
devel/ocaml-result/PLIST Normal file
View file

@ -0,0 +1,12 @@
@comment $NetBSD: PLIST,v 1.1 2016/08/17 15:55:53 jaapb Exp $
${OCAML_SITELIB}/result/META
${PLIST.ocaml-opt}${OCAML_SITELIB}/result/result.a
${OCAML_SITELIB}/result/result.cma
${OCAML_SITELIB}/result/result.cmi
${OCAML_SITELIB}/result/result.cmo
${PLIST.ocaml-opt}${OCAML_SITELIB}/result/result.cmx
${PLIST.ocaml-opt}${OCAML_SITELIB}/result/result.cmxa
${PLIST.ocaml-opt}${OCAML_SITELIB}/result/result.cmxs
${OCAML_SITELIB}/result/result.install
${OCAML_SITELIB}/result/result.ml
${OCAML_SITELIB}/result/result.o

View file

@ -0,0 +1,12 @@
# $NetBSD: buildlink3.mk,v 1.1 2016/08/17 15:55:53 jaapb Exp $
BUILDLINK_TREE+= ocaml-result
.if !defined(OCAML_RESULT_BUILDLINK3_MK)
OCAML_RESULT_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.ocaml-result+= ocaml-result>=1.2
BUILDLINK_PKGSRCDIR.ocaml-result?= ../../devel/ocaml-result
.endif # OCAML_RESULT_BUILDLINK3_MK
BUILDLINK_TREE+= -ocaml-result

View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2016/08/17 15:55:53 jaapb Exp $
SHA1 (result-1.2.tar.gz) = f9c51e5f92035ddc2600aa69fa3325634086535d
RMD160 (result-1.2.tar.gz) = 203c1cc5400f40d207a1b2aedc57d99f62a6ee09
SHA512 (result-1.2.tar.gz) = b47fe24302182642c7dfb3329a9a475518fca01ed7080fb625379abbb7ada0bec4a27e666886c101ba4b0083eeb6312740d99ef764690d38ee6e6d8960fc9b87
Size (result-1.2.tar.gz) = 2100 bytes
SHA1 (patch-Makefile) = 6a950a5f1fe92bcb63ab922bdda8317fa41338c7

View file

@ -0,0 +1,14 @@
$NetBSD: patch-Makefile,v 1.1 2016/08/17 15:55:53 jaapb Exp $
Fix Makefile dependency problems.
--- Makefile.orig 2016-03-03 15:24:37.000000000 +0000
+++ Makefile
@@ -5,7 +5,7 @@ result.ml: which_result.ml
cp `ocaml which_result.ml` result.ml
.PHONY: byte
-byte: result.ml
+byte result.cma: result.ml
ocamlc -c result.ml
ocamlc -a -o result.cma result.cmo