Ticket #12214: Portfile

File Portfile, 3.6 KB (added by mjscod@…, 17 years ago)

The new Portfile that contains a reference to the new patch

Line 
1# $Id: Portfile 21261 2007-01-18 06:15:28Z markd@macports.org $
2
3PortSystem 1.0
4name                    unixODBC
5version                 2.2.12
6categories              databases
7platforms               darwin
8maintainers             simon@cotsworth.com
9description             Provides ODBC 3 connectivity for Unix
10
11long_description        The unixODBC project provides UNIX applications with the same ODBC 3.51 API \
12                                and facilities available under Windows. It provides a Driver Manager that \
13                                supports the full ODBC API and performs the ODBC 3 to ODBC 2 translations \
14                                with UNICODE to ANSI conversion. It also includes a set of graphical utilities \
15                                that allow users to specify connections to DBMSes to be used by applications, \
16                                a collection of ODBC drivers including a simple text based driver, an NNTP \
17                                driver, a Postgres driver and others, and a selection of templates and \
18                                libraries that to aid in the construction of ODBC drivers. It works with \
19                                MySQL, Postgres, StarOffice, Applixware, iHTML, PHP, Perl DBD::ODBC, \
20                                Paradox 9, and many other applications and drivers. Connection pooling is \
21                                also provided to increase performance with applications such as PHP.
22
23homepage                http://www.unixodbc.org/
24master_sites    ${homepage} \
25                                ftp://ftp.easysoft.com/pub/beta/unixODBC/
26
27checksums               md5 9a116aad4059c31d231b626ffdf1869a
28#                               sha1 a8869c38d0f1bb18b33e5165a2a79dd8770f98b3
29
30depends_lib             port:libiconv port:readline
31
32patchfiles              patch-ltmain.sh patch-DriverManager_SQLConnect.c
33
34configure.env   LDFLAGS=-L${prefix}/lib CPPFLAGS=-I${prefix}/include
35
36configure.args  --enable-static --enable-shared --enable-gui=no --with-libiconv-prefix=${prefix}
37
38platform darwin 6 {
39        depends_lib-append      port:dlcompat
40}
41
42        global _cc _ccr _psq1 _psq2 _nn _odbc _ex1 _ex2
43        set _cc         "/usr/bin/gcc -bundle -flat_namespace -undefined suppress -o"
44        set _ccr        libodbccr.1.0.0
45        set     _psq1   libodbcpsql.1.0.0
46        set     _psq2   libodbcpsql.2.0.0
47        set     _nn             libnn.1.0.0
48        set _odbc       libodbc.1.0.0
49
50variant gui {
51        depends_lib-append      lib:libX11.6:XFree86 port:qt3
52        configure.env-append    QTDIR=${prefix}
53        configure.args-delete   --enable-gui=no
54        configure.args-append   --enable-gui \
55          --with-qt-dir=${prefix} \
56          --with-qt-includes=${prefix}/include/qt3 \
57          --with-qt-libraries=${prefix}/lib \
58          --with-qt-bin=${prefix}/bin \
59          --with-extra-includes=/usr/X11R6/include \
60          --with-extra-libs=/usr/X11R6/lib
61}
62
63variant debug {
64        configure.env-append \
65                CFLAGS="-g -O0"
66        configure.args-append \
67                --enable-debug
68}
69
70post-destroot   {
71        # DOCS
72        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
73        foreach doc [glob ${worksrcpath}/\[A-Z\]*\[A-Z\]\[A-Z\]\[A-Z\] ${worksrcpath}/doc/*.\[a-z\]\[a-z\]\[a-z\]*] {
74                if {[string match "*.html" $doc]} {
75                        reinplace "s|${homepage}doc/||g" $doc
76                }
77                xinstall -m 0644 $doc ${destroot}${prefix}/share/doc/${name}
78        }
79        foreach dir [list AdministratorManual lst ProgrammerManual ProgrammerManual/Tutorial UserManual] {
80                xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/$dir
81                foreach file [glob ${worksrcpath}/doc/$dir/*.\[a-z\]\[a-z\]\[a-z\]*] {
82                        if {[string match "*.html" $file]} {
83                                reinplace "s|${homepage}doc/||g" $file
84                        }
85                        xinstall -m 0644 $file ${destroot}${prefix}/share/doc/${name}/$dir
86                }
87        }
88
89        # TEMPLATES
90        xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
91        foreach template [glob ${portpath}/${filesdir}/*.template] {
92                xinstall -m 0644 $template ${destroot}${prefix}/share/${name}
93        }
94        foreach driver [glob ${destroot}${prefix}/share/${name}/*.driver.*] {
95                reinplace "s|__PREFIX__|${prefix}|g" $driver
96        }
97
98        # CONFIG
99        foreach ini [glob ${destroot}${prefix}/etc/*.ini] {
100                system "mv $ini $ini.dist"
101        }
102        destroot.keepdirs ${destroot}${prefix}/etc/ODBCDataSources
103}
104