# -*- 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 118851 2014-04-13 01:27:06Z larryv@macports.org $

PortSystem          1.0

name                pcre
version             8.35
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  85565cfb183fdef1408309b9f02d19c4d85ff458 \
                    sha256  a961c1c78befef263cc130756eeca7b674b4e73a81533293df44e4265236865b

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

# Generate a newer libtool that passes -stdlib correctly.
use_autoreconf      yes
autoreconf.args     -fvi

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
