# $Id: Portfile 68064 2010-05-26 03:11:38Z jmr@macports.org $

PortSystem              1.0

name                    mysql-connector-odbc
version                 5.1.6
set branch              [join [lrange [split ${version} .] 0 1] .]
homepage                http://www.mysql.com/products/connector/
categories              databases
platforms               darwin
maintainers             pixilla.com:brad
license                 GPLv2

description \
    The MySQL Connector/ODBC

long_description \
    The MySQL Connector/ODBC is the name for the family of MySQL ODBC drivers \
    (previously called MyODBC drivers) that provide access to a MySQL database \
    using the industry standard Open Database Connectivity (ODBC) API.

master_sites \
    http://mysql.mirrors.pair.com/Downloads/Connector-ODBC/${branch}/ \
    http://mysql.he.net/Downloads/Connector-ODBC/${branch}/ \
    http://mirrors.sunsite.dk/mysql/Downloads/Connector-ODBC/${branch}/ \
    http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/Connector-ODBC/${branch}/ \
    http://ftp.plusline.de/mysql/Downloads/Connector-ODBC/${branch}/

checksums \
    md5     ed445092466be030f991b3a093649f45 \
    sha1    c02e1c671fae60f7f7389dd2f963b07c3113ab35 \
    rmd160  90eeefbfb0153a32dd7f0be5c2685fcf13036543

depends_lib \
    port:unixODBC \
    port:mysql5

configure.args \
          --with-unixODBC=${prefix} \
          --with-mysql-path=${prefix} \
          --disable-shared \
          --enable-gui=no

pre-configure {
    reinplace "s;bin/mysql_config;bin/mysql_config5;" ${worksrcpath}/configure
}

livecheck.type          regex
livecheck.url           http://dev.mysql.com/
livecheck.regex         "(5\\.1\\.\[0-9\.\]+)"
