a project to simplify installation of open source software
on Mac OS X and Darwin
PortSystem 1.0
name caml-pcre
version 5.11.2
categories devel
maintainers eridius@macports.org
description Perl compatibility regular expressions for OCaml
long_description This OCaml-library interfaces the PCRE (Perl-compatibility regular \
expressions) library which is written in C. it can be used for matching \
regular expressions which are written in PERL-style. Searching for, replacing \
or splitting text should become much easier with this library.
homepage http://www.ocaml.info/home/ocaml_sources.html
platforms darwin
master_sites http://www.ocaml.info/ocaml_sources/
checksums sha1 2a9f44165670a4fc81d9a13f4f7192ebc5a96b71 \
md5 ba3ad47c971ef1eb7f5b7006462f321f
distfiles pcre-ocaml-${version}.tar.bz2
worksrcdir pcre-ocaml-${version}
use_bzip2 yes
depends_lib bin:caml4p:ocaml bin:ocamlfind:caml-findlib lib:pcre:pcre
patchfiles patch-OCamlMakefile patch-Makefile.conf
configure no
proc ocamlfind_destdir {} {
# only bother calculating this darn thing once
variable ocamlfind_destdir {}
variable destroot
variable prefix
if {![string length $ocamlfind_destdir]} {
set ocamlfind_destdir ${destroot}[exec ${prefix}/bin/ocamlfind printconf destdir]
}
return $ocamlfind_destdir
}
pre-build {
file mkdir [ocamlfind_destdir]
reinplace "s|##OCAMLFIND_INSTFLAGS##|-destdir '[ocamlfind_destdir]' -metadir ''|" ${worksrcpath}/OCamlMakefile
reinplace "s|##PREFIX##|${prefix}|g" ${worksrcpath}/Makefile.conf
}
post-destroot {
# install the doc/examples dirs if we built them
cd $worksrcpath
if {[string equal [lindex [array get variations doc] end] +]} then {
file copy lib/doc/pcre [ocamlfind_destdir]/pcre/pcre-doc
}
if {[string equal [lindex [array get variations examples] end] +]} then {
file copy examples [ocamlfind_destdir]/pcre/pcre-examples
}
}
variant doc {
build.target-append doc
depends_lib-append port:ghostscript port:teTeX
}
variant examples {
build.target-append examples
}