# -*- 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: Portfile 107024 2013-06-14 17:27:29Z larryv@macports.org $

PortSystem          1.0

name                pcre
version             8.33
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/

use_bzip2           yes
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/
checksums           rmd160  de60ac0aaad1f04bc272f39136d9048b1adc9299 \
                    sha256  c603957a4966811c04af5f6048c71cfb4966ec93312d7b3118116ed9f3bc0478

patchfiles          configure.diff

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

# 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      --docdir=${prefix}/share/doc/${name} \
                    --disable-silent-rules \
                    --enable-pcre16 \
                    --enable-pcre32 \
                    --enable-jit \
                    --enable-unicode-properties \
                    --enable-pcregrep-libz \
                    --enable-pcregrep-libbz2 \
                    --enable-pcretest-libedit

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

test.run            yes
