Skip to content
Permalink
Browse files

renaming myODBC to MyODBC

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@3887 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Nov 4, 2003
1 parent ca732e8 commit 62c0c13b7dbad863a1085b64e776a7361564f864
@@ -0,0 +1,91 @@
# $Id: Portfile,v 1.1 2003/11/04 07:35:07 mww Exp $

PortSystem 1.0
name MyODBC
version 3.51.06
categories databases
platforms darwin
maintainers simon@cotsworth.com
description MySQL Connector/ODBC
long_description MySQL Connector/ODBC (also known as MyODBC) allows you \
to connect to a MySQL database server using the ODBC database \
API on all Microsoft Windows and most Unix platforms, \
including through such applications and programming \
environments such as Microsoft Access, Microsoft Excel, and \
Borland Delphi.

homepage http://www.mysql.com/
master_sites http://mysql.mirror.anlx.net/Downloads/MyODBC3/ \
http://gd.tuwien.ac.at/db/mysql/Downloads/MyODBC3/

checksums md5 5a59b4f01592fc9ec96e985bc7d6aada

depends_lib lib:libdl.1:dlcompat \
lib:libiconv.2:libiconv \
lib:readline:readline \
lib:mysql:mysql \
lib:libodbc.1:unixODBC

configure.env CFLAGS=-no-cpp-precomp \
LDFLAGS=-L${prefix}/lib \
CPPFLAGS=-I${prefix}/include

configure.args --with-unixODBC=${prefix} \
--with-unixODBC-libs=${prefix}/lib \
--with-unixODBC-includes=${prefix}/include \
--with-odbc-ini=${prefix}/etc/odbc.ini \
--with-mysql-libs=${prefix}/lib/mysql \
--with-mysql-includes=${prefix}/include/mysql \
--with-docs \
--enable-shared

set odbc "unixODBC"
set doc_dest "${destroot}${prefix}/share/doc/${name}"
set share_dest "${destroot}${prefix}/share/${name}"
set odbc_share "${prefix}/share/${odbc}"

post-destroot {
system "cd ${worksrcpath}/driver && \
/usr/bin/gcc -bundle -flat_namespace -undefined error -o \
.libs/libmyodbc3-${version}.so *.o -L${prefix}/lib/mysql \
-L${prefix}/lib -lodbcinst -lmysqlclient -lz -lc"

# Install libmyodbc3.so and create symbolic links
system "install -m 755 \
${worksrcpath}/driver/.libs/libmyodbc3-${version}.so \
${destroot}${prefix}/lib/libmyodbc3-${version}.so"
system "cd ${destroot}${prefix}/lib && \
ln -s libmyodbc3-${version}.so libmyodbc3.so"

# Install documentation
file mkdir ${doc_dest}
system "cd ${worksrcpath} && \
tar -cf - COPYING INSTALL INSTALL-BINARY README | \
tar -xf - -C ${doc_dest}"
system "install -m 644 ${worksrcpath}/RELEASE-NOTES \
${doc_dest}/RELEASE-NOTES-${version}"
system "chown -R `id -u`:`id -g` ${doc_dest}"

# Install samples and myodbc example .ini
file mkdir ${share_dest} ${share_dest}/samples
system "install -m 755 ${worksrcpath}/samples/.libs/my_* \
${share_dest}/samples"
system "install -m 644 ${worksrcpath}/odbc.ini \
${share_dest}/odbc.ini.default"
reinplace "s|/usr/local|${prefix}|g" \
"${share_dest}/odbc.ini.default"

# Install odbc mysql templates
file mkdir ${destroot}${odbc_share}
system "install -m 755 ${portpath}/${filedir}/*.template \
${destroot}${odbc_share}"
reinplace "s|DarwinPortsDirectory|${prefix}|g" \
"${destroot}${odbc_share}/mysql.driver.template"
}

post-install {
system "${prefix}/bin/odbcinst -i -d -f \
${odbc_share}/mysql.driver.template"
system "${prefix}/bin/odbcinst -i -s -f \
${odbc_share}/mysql.data.template"
}
@@ -0,0 +1,10 @@
[MySQL-test]
Description = MySQL test database
Trace = Off
TraceFile = stderr
Driver = MySQL
SERVER = localhost
USER =
PASSWORD =
PORT = 3306
DATABASE = test
@@ -0,0 +1,4 @@
[MySQL]
Description = MySQL ODBC 3.51 Driver
Driver = DarwinPortsDirectory/lib/libmyodbc3.so
Setup = DarwinPortsDirectory/lib/libodbcmyS.so

0 comments on commit 62c0c13

Please sign in to comment.
You can’t perform that action at this time.