# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 115342 2013-12-31 19:14:38Z jeremyhu@macports.org $

PortSystem      1.0

name            fribidi
version         0.19.6
revision        1
categories      textproc
license         LGPL-2.1+
maintainers     cal openmaintainer
platforms       darwin
description     Free Implementation of the Unicode BiDi algorithm

long_description \
    The FriBidi library implements the algorithm described in the \"Unicode \
    Standard Annex #9, The Bidirectional Algorithm\", available at \
    http://www.unicode.org/unicode/reports/tr9/.

homepage        http://fribidi.org/
master_sites    ${homepage}download/
use_bzip2       yes

checksums       sha256  cba8b7423c817e5adf50d28ec9079d14eafcec9127b9e8c8f1960c5ad585e17d \
                rmd160  0a2938a013a1d774fa5f95813826ac4f2c3030fc

depends_build   port:pkgconfig

depends_lib     port:gettext \
                path:lib/pkgconfig/glib-2.0.pc:glib2

# Fix build failure seein on Leopard
use_autoreconf  yes
autoreconf.args -fvi

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog \
        NEWS README THANKS TODO ${destroot}${docdir}
}

livecheck.type  regex
livecheck.url   [lindex ${master_sites} 0]
livecheck.regex ${name}-(\\d+\\.\\d+(?:\\.\\d+)*)
