# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0

name                pcre
version             8.37
categories          devel
license             BSD
platforms           darwin freebsd
maintainers         larryv

description         Perl Compatible Regular Expressions Library
long_description    The PCRE library is a set of functions that \
                    implement regular expression pattern matching \
                    using the same syntax and semantics as Perl 5. \
                    PCRE has its own native API, as well as a set of \
                    wrapper functions that correspond to the POSIX \
                    regular expression API.
homepage            http://www.pcre.org/

depends_lib         port:bzip2 \
                    port:libedit \
                    port:zlib

master_sites        sourceforge:project/pcre/pcre/${version} \
                    ftp://ftp.fu-berlin.de/unix/misc/pcre/ \
                    ftp://ftp.tin.org/pub/libs/pcre/ \
                    ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
use_bzip2           yes
checksums           rmd160  2f38e201b921a9dc73ab7d555cc58a4320c599e5 \
                    sha256  51679ea8006ce31379fb0860e46dd86665d864b5020fc9cd19e71260eef4789d

patchfiles          no-darwin-pthread-flag.patch

# One of the tests currently fails when built with gcc49 @4.9-20130609.
# Not that anyone cares.
#
# TODO Report upstream.
compiler.blacklist  macports-gcc-4.9

configure.args      --disable-silent-rules \
                    --docdir=${prefix}/share/doc/${name} \
                    --enable-jit \
                    --enable-pcre16 \
                    --enable-pcre32 \
                    --enable-pcregrep-libbz2 \
                    --enable-pcregrep-libz \
                    --enable-pcretest-libedit \
                    --enable-unicode-properties

platform darwin 8 {
    # ticket #18448
    if {[variant_isset universal]} {
        configure.ldflags-append -lncurses
    }
}

test.run            yes