# -*- 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$

PortSystem 1.0

name                xapian-bindings
version             1.2.21
categories          devel
maintainers         gmail.com:dcolish
license             GPL-2+

description         Xapian bindings
long_description    Xapian is a highly adaptable toolkit which allows \
                    developers to easily add advanced indexing and search \
                    facilities to their own applications. It supports the \
                    Probabilistic Information Retrieval model and also \
                    supports a rich set of boolean query operators.

homepage            http://xapian.org/
platforms           darwin
master_sites        http://oligarchy.co.uk/xapian/${version}
use_xz              yes

checksums           rmd160  02621fe2788be8d7a04fcfb23214e73cabfb5d83 \
                    sha256  28a39247ac875be2dc1386c273167aab5c9949227c1070b65ca8de603c06d546

depends_lib         port:xapian-core

configure.args      --without-python --without-csharp --without-java \
                    --without-tcl --without-php --without-ruby --without-perl

variant java description {build java bindings} {
    configure.args-replace  --without-java --with-java
}

variant php description {build php bindings} {
    depends_lib-append      path:bin/php:php5

    configure.args-replace  --without-php --with-php
}

variant python27 description {build python 2.7 bindings} {
    depends_lib-append      port:python27

    configure.python        ${prefix}/bin/python2.7
    configure.args-replace  --without-python --with-python
}

variant ruby description {build ruby bindings} {
    depends_lib-append      port:ruby

    configure.args-replace  --without-ruby --with-ruby

    post-destroot {
        delete ${destroot}${prefix}/share/doc/xapian-bindings/ruby/rdocs
    }
}

default_variants    +ruby

livecheck.type      regex
livecheck.url       ${homepage}download
livecheck.regex     ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix}