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:
parent
f638292b71
commit
af4daa9c19
41
devel/ocaml-pcre/Makefile
Normal file
41
devel/ocaml-pcre/Makefile
Normal 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
|
5
devel/ocaml-pcre/distinfo
Normal file
5
devel/ocaml-pcre/distinfo
Normal 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
|
13
devel/ocaml-pcre/pkg/DESCR
Normal file
13
devel/ocaml-pcre/pkg/DESCR
Normal 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.
|
3
devel/ocaml-pcre/pkg/PFRAG.native
Normal file
3
devel/ocaml-pcre/pkg/PFRAG.native
Normal 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
|
2
devel/ocaml-pcre/pkg/PFRAG.shared
Normal file
2
devel/ocaml-pcre/pkg/PFRAG.shared
Normal 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
|
9
devel/ocaml-pcre/pkg/PLIST
Normal file
9
devel/ocaml-pcre/pkg/PLIST
Normal 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
|
Loading…
x
Reference in New Issue
Block a user