# -*- 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 79284 2011-06-08 09:03:24Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           ruby 1.0

ruby.setup          {mysql mysql-ruby} 2.8.2 extconf.rb {README.html README_ja.html} default_fetch ruby19
categories-append   databases
platforms           darwin
maintainers         nomaintainer

description         Ruby client library for MySQL

long_description    Ruby client library for accessing MySQL \
                    databases from Ruby. It works with MySQL 4 or 5.

homepage            http://www.tmtm.org/mysql/ruby/
master_sites        http://tmtm.org/downloads/mysql/ruby/

checksums           sha1    c20ec0f41f19f11270963d9c9e0d5a2bba27801e \
                    rmd160  0cd9a6071f0878a5ab4b47d9a023066f5ae39955

depends_lib-append  path:bin/mysql_config5:mysql5

# gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
universal_variant   no

configure.args      --with-mysql-config=${prefix}/bin/mysql_config5

variant mysql4 description "Build using MySQL 4.1 client library" {
    depends_lib-delete      path:bin/mysql_config5:mysql5
    configure.args-delete   --with-mysql-config=${prefix}/bin/mysql_config5

    depends_lib-append      port:mysql4
    configure.args-append   --with-mysql-config=${prefix}/bin/mysql_config
}
