update ocaml-mlgmp to use ocaml_native property and have a META file for ocamlfind

* bump REVISION
* update ocamlfind sitelib
* use new ocaml_native PROPERTY
* add ocamlfind META info
This commit is contained in:
avsm 2012-08-18 22:16:27 +00:00
parent 36332ea9ea
commit 42bc399fc1
4 changed files with 26 additions and 8 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/07/16 15:51:33 edd Exp $
# $OpenBSD: Makefile,v 1.2 2012/08/18 22:16:27 avsm Exp $
COMMENT = GMP bindings for OCaml
V = 0.13
REVISION = 0
DISTNAME = mlgmp-${V}
PKGNAME = ocaml-mlgmp-${V}
@ -33,9 +34,17 @@ MAKE_FLAGS += CFLAGS_MISC="${CFLAGS}"
# deal with this my calling certain make targets
LIBS_NATIVE = gmp.a gmp.cmxa
LIBS_OTHER = libmlgmp.a gmp.cma gmp.cmi
MAKE_FLAGS += LIBS="${LIBS_OTHER} ${MODOCAML_NATIVE:L:S/yes/${LIBS_NATIVE}/:S/no//}"
MAKE_FLAGS += TESTS="test_suite ${MODOCAML_NATIVE:L:S/yes/test_suite.opt/:S/no//}"
MAKE_FLAGS += TESTS_RUN="tests-nonative ${MODOCAML_NATIVE:L:S/yes/tests-native/:S/no//}"
.include <bsd.port.arch.mk>
.if ${PROPERTIES:Mocaml_native}
MAKE_FLAGS += LIBS="${LIBS_OTHER} ${LIBS_NATIVE}"
MAKE_FLAGS += TESTS="test_suite test_suite.opt"
MAKE_FLAGS += TESTS_RUN="tests-nonative tests-native"
.else
MAKE_FLAGS += LIBS="${LIBS_OTHER}"
MAKE_FLAGS += TESTS="test_suite"
MAKE_FLAGS += TESTS_RUN="tests-nonative"
.endif
REGRESS_TARGET = tests
@ -43,4 +52,8 @@ REGRESS_TARGET = tests
pre-build:
cd ${WRKBUILD} && ${MAKE_PROGRAM} clean
post-install:
${SUBST_CMD} -o ${BINOWN} -g ${BINGRP} -c \
${FILESDIR}/META ${PREFIX}/lib/ocaml/gmp/META
.include <bsd.port.mk>

View File

@ -1,5 +1,2 @@
MD5 (mlgmp-0.13.tar.gz) = +hZQOBUZncthiTeJzN3tkw==
RMD160 (mlgmp-0.13.tar.gz) = mWjeGJvOAwcU3M4pF+LGCnNIAh0=
SHA1 (mlgmp-0.13.tar.gz) = UQTsOOnoaq06NlCL3Qku9cEoPas=
SHA256 (mlgmp-0.13.tar.gz) = Wp+nk5Wxay9dTXketVwvbQlHi5H+S4EgZkG6/BQ64As=
SIZE (mlgmp-0.13.tar.gz) = 973490

View File

@ -0,0 +1,7 @@
name="gmp"
version="0.13"
description="bindings to GNU MP library"
archive(byte)="gmp.cma"
archive(native)="gmp.cmxa"
requires=""
directory="+gmp"

View File

@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/07/16 15:51:33 edd Exp $
@comment $OpenBSD: PLIST,v 1.2 2012/08/18 22:16:27 avsm Exp $
%%native%%
lib/ocaml/gmp/
lib/ocaml/gmp/META
lib/ocaml/gmp/gmp.cma
lib/ocaml/gmp/gmp.cmi
lib/ocaml/gmp/gmp.mli