diff options
Diffstat (limited to 'devel/ocaml-event')
-rw-r--r-- | devel/ocaml-event/Makefile | 96 | ||||
-rw-r--r-- | devel/ocaml-event/distinfo | 2 | ||||
-rw-r--r-- | devel/ocaml-event/files/patch-Makefile | 7 | ||||
-rw-r--r-- | devel/ocaml-event/pkg-descr | 20 | ||||
-rw-r--r-- | devel/ocaml-event/pkg-plist | 2 |
5 files changed, 127 insertions, 0 deletions
diff --git a/devel/ocaml-event/Makefile b/devel/ocaml-event/Makefile new file mode 100644 index 000000000000..038c32152652 --- /dev/null +++ b/devel/ocaml-event/Makefile @@ -0,0 +1,96 @@ +# New ports collection makefile for: ocaml libevent +# Date created: Thu Aug 25 15:34:53 UTC 2005 +# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= event +PORTVERSION= 0.5.0 +CATEGORIES= devel +MASTER_SITES= http://www.xs4all.nl/~mmzeeman/ocaml/ +PKGNAMEPREFIX= ocaml- +DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION} + +MAINTAINER= lioux@FreeBSD.org +COMMENT= An ocaml wrapper for the libevent API + +LIB_DEPENDS= ${LIB_EVENT}:${PORTSDIR}/devel/libevent + +USE_REINPLACE= yes +ALL_TARGET= all allopt +USE_GMAKE= yes + +.ifndef(NOPORTDOCS) +ALL_TARGET+= doc + +PORTDOCS= * +.endif + +# libevent library +LIB_EVENT= event-1.1a.1 + +EXAMPLE_FILES= \ + Makefile \ + fifo_example.ml \ + signal_example.ml +LIB_FILES= \ + libevent.a \ + libevent.cmxa \ + libmlevent.a \ + libevent.cma \ + libevent.mli \ + libevent.cmi +LIB_STUB_FILES= \ + dllmlevent.so + +# examples to install +.for file in ${EXAMPLE_FILES} +PLIST_FILES+= ${EXAMPLESDIR:S,^${PREFIX}/,,}/${file} +.endfor +# libraries to install +.for file in ${LIB_FILES} +PLIST_FILES+= lib/ocaml/${file} +.endfor +.for file in ${LIB_STUB_FILES} +PLIST_FILES+= lib/ocaml/stublibs/${file} +.endfor + +post-configure: +# CFLAGS,PREFIX safeness + @${REINPLACE_CMD} -E -e \ + 's|^(EVENT_LIB=).*$$|\1-l${LIB_EVENT:R}|; \ + s|^(EVENT_LIBDIR=).$$|\1${LOCALBASE}/lib|; \ + s|^(EVENT_INCDIR=).$$|\1${LOCALBASE}/include|; \ + s|^(CFLAGS).*$$|\1=${CFLAGS} -I\$$(EVENT_INCDIR)|' \ + ${WRKSRC}/Makefile + +pre-build: +.for file in libevent.cmi + @cd ${WRKSRC} && ${GMAKE} ${file} +.endfor + +do-install: +# docs +.ifndef(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR} +.endif +# examples + @${MKDIR} ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR} +# libs + @${MKDIR} ${PREFIX}/lib/ocaml/stublibs +.for file in ${LIB_FILES} + @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/lib/ocaml +.endfor +.for file in ${LIB_STUB_FILES} + @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/lib/ocaml/stublibs +.endfor + +.include <bsd.port.pre.mk> + +DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} +EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} + +.include <bsd.port.post.mk> diff --git a/devel/ocaml-event/distinfo b/devel/ocaml-event/distinfo new file mode 100644 index 000000000000..dac26677c29b --- /dev/null +++ b/devel/ocaml-event/distinfo @@ -0,0 +1,2 @@ +MD5 (ocaml-event-0.5.0.tar.gz) = 1c6478d39817a90faa59a353018b082d +SIZE (ocaml-event-0.5.0.tar.gz) = 7040 diff --git a/devel/ocaml-event/files/patch-Makefile b/devel/ocaml-event/files/patch-Makefile new file mode 100644 index 000000000000..a0751ce3622b --- /dev/null +++ b/devel/ocaml-event/files/patch-Makefile @@ -0,0 +1,7 @@ +--- Makefile.orig Thu Aug 25 12:57:52 2005 ++++ Makefile Thu Aug 25 12:57:55 2005 +@@ -98,4 +98,3 @@ + .c.o: + $(OCAMLC) -c -ccopt "$(CFLAGS)" $< + +-include depend diff --git a/devel/ocaml-event/pkg-descr b/devel/ocaml-event/pkg-descr new file mode 100644 index 000000000000..d53e606248ed --- /dev/null +++ b/devel/ocaml-event/pkg-descr @@ -0,0 +1,20 @@ +[ excerpt from developer's www site ] + +An ocaml wrapper for the libevent API. The libevent API provides a +mechanism to execute a callback function when a specific event +occurs on a file descriptor or after a timeout has been reached. +Furthermore, libevent also support callbacks due to signals or +regular timeouts. + +Currently, libevent supports /dev/poll, kqueue(2), select(2), poll(2) +and epoll(4). It also has experimental support for real-time signals. +The internal event mechanism is completely independent of the exposed +event API, and a simple update of libevent can provide new functionality +without having to redesign the applications. As a result, Libevent +allows for portable application development and provides the most +scalable event notification mechanism available on an operating +system. + +WWW: http://www.xs4all.nl/~mmzeeman/ocaml/ + +-- lioux@FreeBSD.org diff --git a/devel/ocaml-event/pkg-plist b/devel/ocaml-event/pkg-plist new file mode 100644 index 000000000000..3b24f5073ded --- /dev/null +++ b/devel/ocaml-event/pkg-plist @@ -0,0 +1,2 @@ +@unexec rmdir %D/lib/ocaml/stublibs 2>/dev/null || true +@unexec rmdir %D/lib/ocaml 2>/dev/null || true |