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

PortSystem              1.0

name                    postgresql-unaccent
version                 0.1
categories              databases
platforms               darwin
maintainers             nomaintainer

description             PostgreSQL extension that provides a function to \
                        remove accents from characters

long_description        ${name} is a ${description} (not compatible with \
                        the version bundled in postgresql90)

homepage                http://launchpad.net/postgresql-unaccent/
master_sites            ${homepage}trunk/${version}/+download/

checksums               sha1    2867e9f95e764da3d04fe3719275ae05503033bd \
                        rmd160  85e8ed5221c4e3a659d6d3091460207ac9f29746

depends_lib             port:unac

use_configure           no

pre-destroot {
    destroot.env-append ${build.env}
}

variant postgresql82 conflicts postgresql83 postgresql84 postgresql90 postgresql91 description {Use postgresql82} {
    depends_build-append    port:postgresql82
    build.env-append        PATH=$env(PATH):${prefix}/lib/postgresql82/bin
}

variant postgresql83 conflicts postgresql82 postgresql84 postgresql90 postgresql91 description {Use postgresql83} {
    depends_build-append    port:postgresql83
    build.env-append        PATH=$env(PATH):${prefix}/lib/postgresql83/bin
}

variant postgresql84 conflicts postgresql82 postgresql83 postgresql90 postgresql91 description {Use postgresql84} {
    depends_build-append    port:postgresql84
    build.env-append        PATH=$env(PATH):${prefix}/lib/postgresql84/bin
}

variant postgresql90 conflicts postgresql82 postgresql83 postgresql84 postgresql91 description {Use postgresql90} {
    depends_build-append    port:postgresql90
    build.env-append        PATH=$env(PATH):${prefix}/lib/postgresql90/bin
}

variant postgresql91 conflicts postgresql82 postgresql83 postgresql84 postgresql90 description {Use postgresql91} {
    depends_build-append    port:postgresql91
    build.env-append        PATH=$env(PATH):${prefix}/lib/postgresql91/bin
}

if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91]} {
    default_variants        +postgresql90
}