diff options
author | pav <pav@FreeBSD.org> | 2005-04-23 12:35:36 +0000 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-04-23 12:35:36 +0000 |
commit | 2d9c177701e021456c30f615caae55b575bec764 (patch) | |
tree | f3db2a12ae4c83d6bae4f25071d99a2ef896ea63 /devel | |
parent | 3686dc6d9340c62fecbdea298ea36a2e3d8a6ee6 (diff) | |
download | FreeBSD-ports-2d9c177701e021456c30f615caae55b575bec764.zip FreeBSD-ports-2d9c177701e021456c30f615caae55b575bec764.tar.gz |
OCaml library implementing an interface to FreeBSD's POSIX semaphores.
PR: ports/80108
Submitted by: Paul Argentoff <argentoff@gmail.com>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/ocaml-sem/Makefile | 45 | ||||
-rw-r--r-- | devel/ocaml-sem/distinfo | 2 | ||||
-rw-r--r-- | devel/ocaml-sem/files/patch-sem_stubs.c | 18 | ||||
-rw-r--r-- | devel/ocaml-sem/pkg-descr | 5 | ||||
-rw-r--r-- | devel/ocaml-sem/pkg-install | 10 |
6 files changed, 81 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 55d52d3..b4afd21 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -598,6 +598,7 @@ SUBDIR += ocaml-findlib SUBDIR += ocaml-pcre SUBDIR += ocaml-sdl + SUBDIR += ocaml-sem SUBDIR += ocaml-ulex SUBDIR += ocamlweb SUBDIR += ode diff --git a/devel/ocaml-sem/Makefile b/devel/ocaml-sem/Makefile new file mode 100644 index 0000000..c48aa16 --- /dev/null +++ b/devel/ocaml-sem/Makefile @@ -0,0 +1,45 @@ +# New ports collection makefile for: ocaml-sem +# Date created: 19 April 2005 +# Whom: asmith +# +# $FreeBSD$ +# + +PORTNAME= sem +PORTVERSION= 0.0.1 +CATEGORIES= devel +MASTER_SITES= ftp://ftp.rtelekom.ru/pub/FreeBSD/ports/distfiles/ +PKGNAMEPREFIX= ocaml- + +MAINTAINER= argentoff@gmail.com +COMMENT= POSIX semaphores for OCaml + +BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml \ + ocamlfind:${PORTSDIR}/devel/ocaml-findlib + +MAKE_ENV= OCAML_LIB_INSTALL="${PREFIX}/lib/ocaml/site-lib/sem" \ + INCDIRS="${LOCALBASE}/include" LIBDIRS="${LOCALBASE}/lib" + +.if !defined(WITH_CUSTOM) +MAKE_ENV+= NO_CUSTOM=y +.endif +ALL_TARGET= all + +PORTDOCS= html README +DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} + +USE_BZIP2= yes +USE_GMAKE= yes + +PKGDEINSTALL= ${PKGINSTALL} + +post-install: + @${FIND} ${PREFIX}/lib/ocaml/site-lib/sem -type f | \ + ${SED} "s,^${PREFIX}/,," >> ${TMPPLIST} + @${ECHO_CMD} "@dirrm lib/ocaml/site-lib/sem" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ocamlfind remove sem 2>/dev/null || true" >> ${TMPPLIST} + @${MKDIR} ${DOCSDIR} + ${CP} -R ${WRKSRC}/doc/ ${DOCSDIR} + ${CP} ${WRKSRC}/README ${DOCSDIR} + +.include <bsd.port.mk> diff --git a/devel/ocaml-sem/distinfo b/devel/ocaml-sem/distinfo new file mode 100644 index 0000000..c4b6d7f --- /dev/null +++ b/devel/ocaml-sem/distinfo @@ -0,0 +1,2 @@ +MD5 (sem-0.0.1.tar.bz2) = 28ddb9f9842b564abf9f0ca8ff82fe56 +SIZE (sem-0.0.1.tar.bz2) = 10871 diff --git a/devel/ocaml-sem/files/patch-sem_stubs.c b/devel/ocaml-sem/files/patch-sem_stubs.c new file mode 100644 index 0000000..81bdba6 --- /dev/null +++ b/devel/ocaml-sem/files/patch-sem_stubs.c @@ -0,0 +1,18 @@ +--- sem_stubs.c.orig Tue Apr 19 16:20:34 2005 ++++ sem_stubs.c Sat Apr 23 14:18:56 2005 +@@ -137,12 +137,14 @@ + }; + + value stub_sem_getvalue(value sem) { ++ int * vp; ++ + CAMLparam1(sem); + CAMLlocal2(estr, v); + + estr = copy_string(""); + +- int * vp = calloc(1, sizeof(int)); ++ vp = calloc(1, sizeof(int)); + if (sem_getvalue((sem_t *)sem,vp) == -1) { + uerror("sem_getvalue", estr); + }; diff --git a/devel/ocaml-sem/pkg-descr b/devel/ocaml-sem/pkg-descr new file mode 100644 index 0000000..5c9cf5a --- /dev/null +++ b/devel/ocaml-sem/pkg-descr @@ -0,0 +1,5 @@ +POSIX semaphores for OCaml. The library mimics things found under "man sem" +and "man sem_open". + +- Paul Argentoff +argentoff@gmail.com diff --git a/devel/ocaml-sem/pkg-install b/devel/ocaml-sem/pkg-install new file mode 100644 index 0000000..61774bb6 --- /dev/null +++ b/devel/ocaml-sem/pkg-install @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$2" = "POST-INSTALL" ]; then + echo "${PKG_PREFIX}/lib/ocaml/site-lib/sem" >> ${PKG_PREFIX}/lib/ocaml/ld.conf +elif [ "$2" = "DEINSTALL" ]; then + mv ${PKG_PREFIX}/lib/ocaml/ld.conf ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp + grep -v sem ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp > ${PKG_PREFIX}/lib/ocaml/ld.conf + rm -f ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp + chmod 0444 ${PKG_PREFIX}/lib/ocaml/ld.conf +fi |