import ocaml-pcre; ok jasper@

This OCaml-library interfaces the PCRE (Perl-compatible regular expression)
library which is written in C. it can be used for matching regular expressions
which are written in the PERL style.
 
It is reentrant - and thus thread safe. This is not the case with the "Str"
module of OCaml, which builds on the GNU "regex"-library. Using reentrant
libraries also means more convenience for programmers. They do not have to
reason about states in which the library might be in.
 
The high-level functions for replacement and substitution, all implemented
in OCaml, are much faster than the ones of the "Str"-module. In fact, when
compiled to native code, they even seem to be significantly faster than
those of PERL.
This commit is contained in:
sthen 2011-09-15 15:50:23 +00:00
parent f638292b71
commit af4daa9c19
6 changed files with 73 additions and 0 deletions

41
devel/ocaml-pcre/Makefile Normal file
View File

@ -0,0 +1,41 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/09/15 15:50:23 sthen Exp $
COMMENT= Objective Caml perl-compatible regexp library
CATEGORIES= devel textproc
DISTNAME= release-6.2.2
PKGNAME= ocaml-pcre-6.2.2
WRKDIST= ${WRKDIR}/pcre-ocaml-${DISTNAME}
DIST_SUBDIR= ocaml-pcre
HOMEPAGE= http://ocaml.info/home/ocaml_sources.html
# GPLv2+
PERMIT_PACKAGE_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
MODULES= lang/ocaml
MASTER_SITES= http://hg.ocaml.info/release/pcre-ocaml/archive/
RUN_DEPENDS= sysutils/findlib
BUILD_DEPENDS= ${RUN_DEPENDS}
LIB_DEPENDS= devel/pcre
WANTLIB= pcre
NO_REGRESS= Yes
USE_GMAKE= Yes
MAKE_ENV+= OCAMLFIND_INSTFLAGS="-ldconf ignore"
pre-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/ocaml/site-lib/pcre
.include <bsd.port.mk>
.if ${MODOCAML_NATIVE:L:Mno}
WRKSRC= ${WRKDIST}/lib
ALL_TARGET= byte-code-library
INSTALL_TARGET= libinstall-byte-code
.endif

View File

@ -0,0 +1,5 @@
MD5 (ocaml-pcre/release-6.2.2.tar.gz) = Nh6o2O0yzGt4r83tzIsjOg==
RMD160 (ocaml-pcre/release-6.2.2.tar.gz) = tiSMvzXnera+UN5UlEASr1j3CYA=
SHA1 (ocaml-pcre/release-6.2.2.tar.gz) = J/f9NEjI5drUKzB9BFjPlLgjHTU=
SHA256 (ocaml-pcre/release-6.2.2.tar.gz) = ENcvcpzmPadI+5pnEJN3lQQzX5buTkdKjrCvyJwZpqI=
SIZE (ocaml-pcre/release-6.2.2.tar.gz) = 60365

View File

@ -0,0 +1,13 @@
This OCaml-library interfaces the PCRE (Perl-compatible regular expression)
library which is written in C. it can be used for matching regular expressions
which are written in the PERL style.
It is reentrant - and thus thread safe. This is not the case with the "Str"
module of OCaml, which builds on the GNU "regex"-library. Using reentrant
libraries also means more convenience for programmers. They do not have to
reason about states in which the library might be in.
The high-level functions for replacement and substitution, all implemented
in OCaml, are much faster than the ones of the "Str"-module. In fact, when
compiled to native code, they even seem to be significantly faster than
those of PERL.

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.native,v 1.1.1.1 2011/09/15 15:50:23 sthen Exp $
lib/ocaml/site-lib/pcre/pcre.a
lib/ocaml/site-lib/pcre/pcre.cmxa

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2011/09/15 15:50:23 sthen Exp $
lib/ocaml/site-lib/pcre/dllpcre_stubs.so

View File

@ -0,0 +1,9 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/09/15 15:50:23 sthen Exp $
%%SHARED%%
%%native%%
lib/ocaml/site-lib/pcre/
lib/ocaml/site-lib/pcre/META
lib/ocaml/site-lib/pcre/libpcre_stubs.a
lib/ocaml/site-lib/pcre/pcre.cma
lib/ocaml/site-lib/pcre/pcre.cmi
lib/ocaml/site-lib/pcre/pcre.mli