11 | | to connect to a MySQL database server using the ODBC database \ |
12 | | API on all Microsoft Windows and most Unix platforms, \ |
13 | | including through such applications and programming \ |
14 | | environments such as Microsoft Access, Microsoft Excel, and \ |
15 | | Borland Delphi. |
16 | | |
17 | | homepage http://www.mysql.com/ |
18 | | master_sites http://mysql.mirror.anlx.net/Downloads/MyODBC3/ \ |
19 | | http://gd.tuwien.ac.at/db/mysql/Downloads/MyODBC3/ |
20 | | |
21 | | checksums md5 5a59b4f01592fc9ec96e985bc7d6aada |
22 | | |
23 | | depends_lib lib:libdl:dlcompat \ |
24 | | lib:libiconv.2:libiconv \ |
25 | | lib:readline:readline \ |
26 | | lib:mysql:mysql \ |
27 | | lib:libodbc.1:unixODBC |
28 | | |
29 | | configure.env CFLAGS=-no-cpp-precomp \ |
30 | | LDFLAGS=-L${prefix}/lib \ |
31 | | CPPFLAGS=-I${prefix}/include |
| 12 | to connect to a MySQL database server using the ODBC database \ |
| 13 | API on all Microsoft Windows and most Unix platforms, \ |
| 14 | including through such applications and programming \ |
| 15 | environments such as Microsoft Access, Microsoft Excel, and \ |
| 16 | Borland Delphi. |
| 17 | |
| 18 | homepage http://www.mysql.com/ |
| 19 | |
| 20 | set sitedir Downloads/${name}3/ |
| 21 | master_sites ftp://planetmirror.com/pub/mysql/${sitedir} \ |
| 22 | http://www.softagency.co.jp/MySQL/${sitedir} \ |
| 23 | ftp://sunsite.dk/mirrors/mysql/${sitedir} \ |
| 24 | http://mysql.mirror.anlx.net/${sitedir} \ |
| 25 | http://gd.tuwien.ac.at/db/mysql/${sitedir} \ |
| 26 | http://mysql.mediatraffic.fi/${sitedir} \ |
| 27 | ftp://filepile.tiscali.de/mirror/mysql/${sitedir} \ |
| 28 | http://mirrors.tilian.co.uk/mysql.com/${sitedir} \ |
| 29 | ftp://ftp.rtfm.no/pub/mysql/${sitedir} \ |
| 30 | http://www.mysql.cz/${sitedir} \ |
| 31 | ftp://ftp.u-paris10.fr/mysql.com/${sitedir} \ |
| 32 | http://mysql.oms-net.nl/${sitedir} \ |
| 33 | ftp://ftp.free.fr/pub/MySQL/${sitedir} |
| 34 | |
| 35 | checksums md5 95e123c9edfdc7afe27cd7d03fd853c7 \ |
| 36 | sha1 54d189618dd88d82571f4211445c67681a8b59a4 |
| 37 | |
| 38 | depends_lib lib:libmysqlclient:mysql4 \ |
| 39 | lib:libodbc.1:unixODBC \ |
| 40 | lib:libz.1:zlib |
| 41 | |
| 42 | post-patch { |
| 43 | reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/imyodbc/Makefile.osx |
| 44 | } |
| 45 | |
| 46 | configure.env LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include |
34 | | --with-unixODBC-libs=${prefix}/lib \ |
35 | | --with-unixODBC-includes=${prefix}/include \ |
36 | | --with-odbc-ini=${prefix}/etc/odbc.ini \ |
37 | | --with-mysql-libs=${prefix}/lib/mysql \ |
38 | | --with-mysql-includes=${prefix}/include/mysql \ |
39 | | --with-docs \ |
40 | | --enable-shared |
41 | | |
42 | | set odbc "unixODBC" |
43 | | set doc_dest "${destroot}${prefix}/share/doc/${name}" |
44 | | set share_dest "${destroot}${prefix}/share/${name}" |
45 | | set odbc_share "${prefix}/share/${odbc}" |
| 49 | --with-unixODBC-includes=${prefix}/include \ |
| 50 | --with-unixODBC-libs=${prefix}/lib \ |
| 51 | --with-odbc-ini=${prefix}/etc/odbc.ini \ |
| 52 | --with-mysql-path=${prefix} \ |
| 53 | --enable-thread-safe \ |
| 54 | --enable-shared \ |
| 55 | --enable-static \ |
| 56 | --without-debug \ |
| 57 | --without-samples \ |
| 58 | --disable-gui |
47 | | post-destroot { |
48 | | system "cd ${worksrcpath}/driver && \ |
49 | | /usr/bin/gcc -bundle -flat_namespace -undefined error -o \ |
50 | | .libs/libmyodbc3-${version}.so *.o -L${prefix}/lib/mysql \ |
51 | | -L${prefix}/lib -lodbcinst -lmysqlclient -lz -lc" |
52 | | |
53 | | # Install libmyodbc3.so and create symbolic links |
54 | | system "install -m 755 \ |
55 | | ${worksrcpath}/driver/.libs/libmyodbc3-${version}.so \ |
56 | | ${destroot}${prefix}/lib/libmyodbc3-${version}.so" |
57 | | system "cd ${destroot}${prefix}/lib && \ |
58 | | ln -fs libmyodbc3-${version}.so libmyodbc3.so" |
59 | | |
60 | | # Install documentation |
61 | | file mkdir ${doc_dest} |
62 | | system "cd ${worksrcpath} && \ |
63 | | tar -cf - COPYING INSTALL INSTALL-BINARY README | \ |
64 | | tar -xf - -C ${doc_dest}" |
65 | | system "install -m 644 ${worksrcpath}/RELEASE-NOTES \ |
66 | | ${doc_dest}/RELEASE-NOTES-${version}" |
67 | | system "chown -R `id -u`:`id -g` ${doc_dest}" |
68 | | |
69 | | # Install samples and myodbc example .ini |
70 | | file mkdir ${share_dest} ${share_dest}/samples |
71 | | system "install -m 755 ${worksrcpath}/samples/.libs/my_* \ |
72 | | ${share_dest}/samples" |
73 | | system "install -m 644 ${worksrcpath}/odbc.ini \ |
74 | | ${share_dest}/odbc.ini.default" |
75 | | reinplace "s|/usr/local|${prefix}|g" \ |
76 | | "${share_dest}/odbc.ini.default" |
| 60 | platform darwin 6 { |
| 61 | depends_lib-append lib:libdl:dlcompat |
| 62 | } |
86 | | post-install { |
87 | | system "${prefix}/bin/odbcinst -i -d -f \ |
88 | | ${odbc_share}/mysql.driver.template" |
89 | | system "${prefix}/bin/odbcinst -i -s -f \ |
90 | | ${odbc_share}/mysql.data.template" |
| 70 | variant samples { |
| 71 | configure.args-delete --without-samples |
| 72 | configure.args-append --with-samples |
| 73 | } |
| 74 | |
| 75 | variant debug { |
| 76 | configure.args-delete --without-debug |
| 77 | configure.args-append --with-debug |
| 78 | } |
| 79 | |
| 80 | post-destroot { |
| 81 | # install directories |
| 82 | foreach dir [list ${name} doc/${name} unixODBC] { |
| 83 | xinstall -d -m 0755 ${destroot}${prefix}/share/$dir |
| 84 | } |
| 85 | |
| 86 | # install readme files |
| 87 | foreach readme [glob ${worksrcpath}/\[A-Z\]*\[A-Z\] ${worksrcpath}/\[A-Z\]*.\[a-z\]] { |
| 88 | xinstall -m 0644 $readme ${destroot}${prefix}/share/doc/${name} |
| 89 | } |
| 90 | |
| 91 | # install samples |
| 92 | if { [variant_isset samples] } { |
| 93 | xinstall -d -m 0755 ${destroot}${prefix}/share/${name}/samples |
| 94 | foreach sample [glob ${worksrcpath}/samples/.libs/my_*] { |
| 95 | xinstall -m 0755 $sample \ |
| 96 | ${destroot}${prefix}/share/${name}/samples |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | # install example odbc.ini |
| 101 | xinstall -m 0644 ${portpath}/${filesdir}/odbc.ini \ |
| 102 | ${destroot}${prefix}/share/${name}/odbc.ini.dist |
| 103 | reinplace "s|/usr/local|${prefix}|g" \ |
| 104 | ${destroot}${prefix}/share/${name}/odbc.ini.dist |
| 105 | |
| 106 | # install MyODBC templates |
| 107 | foreach template [glob ${portpath}/${filesdir}/*.template] { |
| 108 | xinstall -m 0644 $template ${destroot}${prefix}/share/unixODBC |
| 109 | } |
| 110 | reinplace "s|_DP_PREFIX|${prefix}|g" \ |
| 111 | ${destroot}${prefix}/share/unixODBC/mysql.driver.template |