Ticket #26022: patch-Portfile.diff

File patch-Portfile.diff, 2.1 KB (added by pixilla (Bradley Giesbrecht), 14 years ago)
  • Portfile

     
    44
    55name                    mysql-connector-odbc
    66version                 5.1.6
     7set major_version       [join [lrange [split ${version} .] 0 0] .]
    78set branch              [join [lrange [split ${version} .] 0 1] .]
    89homepage                http://www.mysql.com/products/connector/
    910categories              databases
     
    3132    sha1    c02e1c671fae60f7f7389dd2f963b07c3113ab35 \
    3233    rmd160  90eeefbfb0153a32dd7f0be5c2685fcf13036543
    3334
     35patchfiles              patch-configure.diff
     36
    3437depends_lib \
    3538    port:unixODBC \
    3639    port:mysql5
    3740
     41post-patch {
     42    reinplace "s|@@mysql_config@@|mysql_config5|" ${worksrcpath}/configure
     43}
     44
     45
     46# Using instructions from here:
     47# http://dev.mysql.com/doc/refman/5.1/en/connector-odbc-installation-source-unix.html#connector-odbc-installation-source-unix-macosx
    3848configure.args \
    39           --with-unixODBC=${prefix} \
    40           --with-mysql-path=${prefix} \
    41           --disable-shared \
    42           --enable-gui=no
     49    --with-unixODBC=${prefix} \
     50    --with-mysql-path=${prefix} \
     51    --disable-shared \
     52    --enable-gui=no
    4353
    44 pre-configure {
    45     reinplace "s;bin/mysql_config;bin/mysql_config5;" ${worksrcpath}/configure
     54pre-destroot {
     55    system \
     56        "cd ${worksrcpath}/driver && ${configure.cc} -bundle -flat_namespace  \
     57        -undefined dynamic_lookup -o .libs/libmyodbc${major_version}-${version}.so *.o  \
     58        -L${prefix}/lib/mysql5/mysql -L${prefix}/lib -lodbcinst -lmysqlclient -lz -lc"
    4659}
    4760
     61post-destroot {
     62    xinstall -m 755 ${worksrcpath}/driver/.libs/libmyodbc${major_version}-${version}.so \
     63                    ${destroot}${prefix}/lib
     64    system \
     65        "cd ${destroot}${prefix}/lib && ln -s libmyodbc${major_version}-${version}.so  \
     66        libmyodbc${major_version}.so"
     67}
     68
     69livecheck.url           ${master_sites}
    4870livecheck.type          regex
    49 livecheck.url           http://dev.mysql.com/
    50 livecheck.regex         "(5\\.1\\.\[0-9\.\]+)"
     71livecheck.regex         "(\\d\\.\\d\.?\\d*)"