# -*- 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 58233 2009-09-24 17:52:22Z afb@macports.org $
PortSystem 1.0
name                xapian-bindings
version             1.0.15
categories          devel
maintainers         m@loonsoft.com
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://people.xapian.org
platforms           darwin
master_sites        http://oligarchy.co.uk/xapian/${version}

checksums           md5 d365969f5ba7fa99d369ef479862c4fe \
                    sha1 34ed2c71df43df39c3a8c56beb1c6bdd2cf39a17 \
                    rmd160 6e8214e2a629662c3dcfc3b469c5159c90ecfddc
depends_lib         port:xapian-core

configure.args-append  --without-python --without-csharp --without-java --without-tcl --without-php --without-ruby
variant     ruby description {builds ruby bindings} {
                    configure.args-delete  --without-ruby
                    configure.args-append  --with-ruby
                    depends_lib-append port:ruby
                }
variant     php description {builds php bindings} {
                    configure.args-delete  --without-php
                    configure.args-append  --with-php
                    depends_lib-append path:bin/php:php5
                }
variant     python description {builds python bindings} {
                    configure.args-delete  --without-python
                    configure.args-append  --with-python
                    configure.env-append PYTHON=${prefix}/bin/python2.5
                    depends_lib-append port:python25
                }
variant     java description {builds java bindings} {
                    configure.args-delete  --without-java
                    configure.args-append  --with-java
                }
default_variants +ruby

post-destroot {
  if {[file exists ${destroot}${prefix}/share/doc/xapian-bindings/ruby/rdocs]} {
    delete "${destroot}${prefix}/share/doc/xapian-bindings/ruby/rdocs"
  }
}
