OCaml library implementing an interface to FreeBSD's POSIX semaphores.
PR: ports/80108 Submitted by: Paul Argentoff <argentoff@gmail.com>
This commit is contained in:
parent
2f07eb9c92
commit
a22f63ba68
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=133999
6 changed files with 81 additions and 0 deletions
|
@ -598,6 +598,7 @@
|
|||
SUBDIR += ocaml-findlib
|
||||
SUBDIR += ocaml-pcre
|
||||
SUBDIR += ocaml-sdl
|
||||
SUBDIR += ocaml-sem
|
||||
SUBDIR += ocaml-ulex
|
||||
SUBDIR += ocamlweb
|
||||
SUBDIR += ode
|
||||
|
|
45
devel/ocaml-sem/Makefile
Normal file
45
devel/ocaml-sem/Makefile
Normal file
|
@ -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>
|
2
devel/ocaml-sem/distinfo
Normal file
2
devel/ocaml-sem/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
MD5 (sem-0.0.1.tar.bz2) = 28ddb9f9842b564abf9f0ca8ff82fe56
|
||||
SIZE (sem-0.0.1.tar.bz2) = 10871
|
18
devel/ocaml-sem/files/patch-sem_stubs.c
Normal file
18
devel/ocaml-sem/files/patch-sem_stubs.c
Normal file
|
@ -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);
|
||||
};
|
5
devel/ocaml-sem/pkg-descr
Normal file
5
devel/ocaml-sem/pkg-descr
Normal file
|
@ -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
|
10
devel/ocaml-sem/pkg-install
Normal file
10
devel/ocaml-sem/pkg-install
Normal file
|
@ -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
|
Loading…
Reference in a new issue