Changeset 96976


Ignore:
Timestamp:
Aug 23, 2012, 6:07:35 PM (6 years ago)
Author:
pixilla@…
Message:

databases/mysql-connector-cpp:

  • Move to mysql55-connector-cpp.

databases/mysql55-connector-cpp:

  • Update to version 1.1.1.
  • Port/subports for mysql5, mysql51, mysql55, mariadb and percona.
  • mysql-connector-cpp replaced_by mysql5-connector-cpp
  • Patch examples to make them more friendly. Closes #34235
Location:
trunk/dports/databases/mysql55-connector-cpp
Files:
9 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/dports/databases/mysql55-connector-cpp/Portfile

    r90703 r96976  
    55PortGroup           cmake 1.0
    66
    7 name                mysql-connector-cpp
     7name                mysql55-connector-cpp
    88set name_package    mysql-connector-c++
    9 version             1.1.0
     9version             1.1.1
    1010set branch          [join [lrange [split ${version} .] 0 1] .]
    1111categories          databases
    1212platforms           darwin
    13 maintainers         pixilla
     13maintainers         pixilla openmaintainer
    1414license             GPL-2
    15 description         The MySQL Connector/C++
    16 long_description    Standardized MySQL database driver for C++ development.
    1715
    1816set mirror_dir      Downloads/Connector-C++
     
    2523
    2624distname            ${name_package}-${version}
    27 checksums           rmd160  f98bf0a4c987f49054da62e1e86197049b03250a \
    28                     sha256  dfb8933dada706a1b3188b162fc5a9686b5ed46323bf09548ce291e8dd4545e2
     25checksums           rmd160  6415ae385effabb482b12cb9e39186d838d70d74 \
     26                    sha256  31c3e4f637153bd270812dffc6a50708dfc686a8afa7ea1c88a9dfda0d8af52e
    2927
    3028depends_build-append \
    3129                    port:boost
    32 depends_lib-append \
    33                     port:mysql5
     30
     31patch.pre_args      -p1
     32patchfiles          patch-CMakeLists.txt.diff \
     33                    patch-cppconn-CMakeLists.txt.diff \
     34                    patch-driver-CMakeLists.txt.diff \
     35                    patch-examples-examples.h.diff \
     36                    patch-examples-pthreads.cpp.diff \
     37                    patch-examples-standalone_example.cpp.diff \
     38                    patch-examples-standalone_example_docs1.cpp.diff \
     39                    patch-examples-standalone_example_docs2.cpp.diff
     40
     41post-patch {
     42
     43    reinplace "s,@NAME@,/${subport},g" \
     44        ${worksrcpath}/cppconn/CMakeLists.txt \
     45        ${worksrcpath}/driver/CMakeLists.txt
     46}
    3447
    3548configure.args-append \
    36                     -DMYSQL_CONFIG_EXECUTABLE:FILEPATH=${prefix}/bin/mysql_config5 \
    37                     -DMYSQLCPPCONN_BUILD_EXAMPLES:BOOL=1
     49                    -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/${subport}
    3850
    3951post-destroot {
    40     xinstall -d ${destroot}${prefix}/share/${name_package}
    41     eval move [glob -type f ${destroot}${prefix}/*] \
    42         ${destroot}${prefix}/share/${name_package}
     52    xinstall -d ${destroot}${prefix}/share/${subport}
    4353    copy ${worksrcpath}/examples \
    44         ${destroot}${prefix}/share/${name_package}/
     54        ${destroot}${prefix}/share/${subport}/
     55
     56    foreach lib [glob -directory ${destroot}${prefix}/lib/${subport} -type f *.dylib] {
     57
     58        system "install_name_tool -id ${prefix}/lib/${subport}/[strsed ${lib} /^.*\\///] ${lib}"
     59    }
     60}
     61
     62set mp.ports {
     63    mysql5
     64    mysql51
     65    mysql55
     66    mariadb
     67    percona
     68}
     69set mp.names {}
     70foreach mp.port ${mp.ports} {
     71
     72    lappend mp.names "${mp.port}-connector-cpp"
     73}
     74foreach mp.name ${mp.names} {
     75
     76    set idx             [lsearch ${mp.names} ${mp.name}]
     77    set mp.port     [lindex ${mp.ports} $idx]
     78    set mp.conflicts  [lreplace ${mp.names} $idx $idx]
     79
     80    if {[string compare ${mp.name} ${name}] == 0 && [string compare ${mp.name} ${subport}] == 0} {
     81
     82        description         The MySQL Connector/C++ for ${mp.port}.
     83        long_description    ${description} \
     84                            Standardized MySQL database driver for C++ development.
     85        depends_lib-append  port:${mp.port}
     86        configure.args-append \
     87                            -DMYSQLCPPCONN_DYNLOAD_MYSQL_LIB:FILEPATH=${prefix}/lib/${mp.port}/mysql/libmysqlclient.dylib \
     88                            -DMYSQL_CONFIG_EXECUTABLE:FILEPATH=${prefix}/lib/${mp.port}/bin/mysql_config
     89    } else {
     90
     91        subport ${mp.name} {
     92       
     93            description         The MySQL Connector/C++ for ${mp.port}.
     94            long_description    ${description} \
     95                                Standardized MySQL database driver for C++ development.
     96            depends_lib-append  port:${mp.port}
     97            configure.args-append \
     98                                -DMYSQLCPPCONN_DYNLOAD_MYSQL_LIB:FILEPATH=${prefix}/lib/${mp.port}/mysql/libmysqlclient.dylib \
     99                                -DMYSQL_CONFIG_EXECUTABLE:FILEPATH=${prefix}/lib/${mp.port}/bin/mysql_config
     100        }
     101    }
     102}
     103
     104subport mysql-connector-cpp {
     105
     106    replaced_by         mysql5-connector-cpp
     107    PortGroup           obsolete 1.0
    45108}
    46109
Note: See TracChangeset for help on using the changeset viewer.