set branch [join [lrange [split ${version} .] 0 1] .]
homepage http://www.mysql.com/
maintainers jwa ryandesign
distname mysql-${version}
Multithreaded SQL database server
MySQL is an open-source, multi-threaded SQL database \
with a command syntax very similar to mSQL.
http://mysql.mirrors.pair.com/Downloads/MySQL-${branch}/ \
http://mysql.he.net/Downloads/MySQL-${branch}/ \
http://mirrors.sunsite.dk/mysql/Downloads/MySQL-${branch}/ \
http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-${branch}/ \
http://ftp.plusline.de/mysql/Downloads/MySQL-${branch}/
checksums md5 87e5f7455c425df04bab25a3f2de90c8 \
sha1 5e547ee11841f4f5c35141ee365edc6f1e139571 \
rmd160 6472960ccb45eda240dc1a0a4068ad327cde3dde
archcheck.files lib/libz.dylib \
set major_version [strsed ${version} {s/\..*$//}]
set mysql mysql${major_version}
set libdir ${prefix}/lib/${mysql}
set dbdir ${prefix}/var/db/${mysql}
set sysconfdir ${prefix}/etc/${mysql}
if {"darwin" == ${os.platform} && ${os.major} > 8} {
patch-mysql_secure_installation.sh.diff
reinplace s%@BINDIR@%${bindir}%g ${worksrcpath}/scripts/mysql_secure_installation.sh
--mandir=${prefix}/share/man \
--infodir=${prefix}/share/info \
--localstatedir=${dbdir} \
--includedir=${prefix}/include/${mysql} \
--datadir=${prefix}/share/${mysql} \
--sysconfdir=${sysconfdir} \
--with-zlib-dir=${prefix} \
--with-extra-charsets=complex \
--with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock \
--with-mysqld-user=${mysqluser} \
--enable-thread-safe-client
# the following is in store for future
# "--without-readline" has the peculiar meaning "do not use the bundled copy
# of readline but use the system's (i.e. MacPorts') copy of readline"
depends_lib-append port:readline
archcheck.files-append lib/libreadline.dylib
configure.args-append --without-readline