1 | # $Id: $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name unixODBC |
---|
5 | version 2.2.6 |
---|
6 | categories databases |
---|
7 | platforms darwin |
---|
8 | |
---|
9 | maintainers simon@cotsworth.com |
---|
10 | |
---|
11 | description Provides ODBC 3 connectivity for Unix |
---|
12 | |
---|
13 | long_description The unixODBC project provides UNIX applications with the same ODBC 3.51 API \ |
---|
14 | and facilities available under Windows. It provides a Driver Manager that \ |
---|
15 | supports the full ODBC API and performs the ODBC 3 to ODBC 2 translations \ |
---|
16 | with UNICODE to ANSI conversion. It also includes a set of graphical utilities \ |
---|
17 | that allow users to specify connections to DBMSes to be used by applications, \ |
---|
18 | a collection of ODBC drivers including a simple text based driver, an NNTP \ |
---|
19 | driver, a Postgres driver and others, and a selection of templates and \ |
---|
20 | libraries that to aid in the construction of ODBC drivers. It works with \ |
---|
21 | MySQL, Postgres, StarOffice, Applixware, iHTML, PHP, Perl DBD::ODBC, \ |
---|
22 | Paradox 9, and many other applications and drivers. Connection pooling is \ |
---|
23 | also provided to increase performance with applications such as PHP. |
---|
24 | |
---|
25 | homepage http://www.unixodbc.org/ |
---|
26 | master_sites ${homepage} \ |
---|
27 | ftp://ftp.easysoft.com/pub/beta/unixODBC/ |
---|
28 | |
---|
29 | checksums md5 748ce54e34b2b339c99a8b1ddaee54f5 |
---|
30 | |
---|
31 | depends_lib lib:libdl.1:dlcompat \ |
---|
32 | lib:libiconv.2:libiconv \ |
---|
33 | lib:readline:readline |
---|
34 | |
---|
35 | patchfiles patch-configure \ |
---|
36 | patch-ltmain.sh \ |
---|
37 | patch-SQLManageDataSources.c |
---|
38 | |
---|
39 | set share_path "${prefix}/share/${name}" |
---|
40 | set doc_dest "${destroot}${prefix}/share/doc/${name}" |
---|
41 | |
---|
42 | configure.env LDFLAGS=-L${prefix}/lib \ |
---|
43 | CPPFLAGS=-I${prefix}/include |
---|
44 | |
---|
45 | configure.args --with-libiconv-prefix=${prefix} \ |
---|
46 | --disable-stats \ |
---|
47 | --enable-gui=no |
---|
48 | |
---|
49 | post-destroot { |
---|
50 | file mkdir ${destroot}${share_path} |
---|
51 | system "install -m 644 ${portpath}/${filedir}/*.template \ |
---|
52 | ${destroot}${share_path}" |
---|
53 | reinplace "s|DarwinPortsDirectory|${prefix}|g" \ |
---|
54 | "${destroot}${share_path}/postgresql.driver.template" |
---|
55 | |
---|
56 | # ODBCDataSources Directory & empty directory hack |
---|
57 | file mkdir ${destroot}${prefix}/etc/ODBCDataSources |
---|
58 | system "touch ${destroot}${prefix}/etc/ODBCDataSources/.turd" |
---|
59 | |
---|
60 | # Install Documentation |
---|
61 | file mkdir ${doc_dest} |
---|
62 | system "cd ${worksrcpath}/doc && \ |
---|
63 | tar -cf - * | tar -xf - -C ${doc_dest}" |
---|
64 | system "find ${doc_dest} -name 'Makefile*' | xargs rm" |
---|
65 | system "chown -R `id -u`:`id -g` ${doc_dest}" |
---|
66 | |
---|
67 | # Create .so |
---|
68 | system "cd ${destroot}${prefix}/lib/ && \ |
---|
69 | /usr/bin/gcc -bundle -undefined error -o libodbc.1.0.0.so libodbc.1.0.0.dylib && \ |
---|
70 | ln -s libodbc.1.0.0.so libodbc.1.so && \ |
---|
71 | ln -s libodbc.1.0.0.so libodbc.so" |
---|
72 | } |
---|
73 | |
---|
74 | post-install { |
---|
75 | system "${prefix}/bin/odbcinst -i -d -f \ |
---|
76 | ${share_path}/postgresql.driver.template" |
---|
77 | system "${prefix}/bin/odbcinst -i -s -f \ |
---|
78 | ${share_path}/postgresql.data.template" |
---|
79 | } |
---|