mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
Port is not known to build, has `known_fail yes`, zero reported installations, no tickets in 7 years. Outdated since release of 8.0.17-8 on 2019-10-30. Other working MySQL ports are available. Closes: https://trac.macports.org/ticket/40018 Closes: https://trac.macports.org/ticket/45136 Closes: https://trac.macports.org/ticket/47614 See: https://trac.macports.org/ticket/52557
112 lines
4.2 KiB
Tcl
112 lines
4.2 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
PortGroup cmake 1.0
|
|
PortGroup boost 1.0
|
|
|
|
name mysql55-connector-cpp
|
|
set name_package mysql-connector-c++
|
|
# when updating, remove separate revision for mysql55-connector-cpp below
|
|
version 1.1.9
|
|
revision 1
|
|
set branch [join [lrange [split ${version} .] 0 1] .]
|
|
categories databases
|
|
platforms darwin
|
|
maintainers nomaintainer
|
|
license GPL-2
|
|
|
|
homepage https://www.mysql.com/products/connector/
|
|
master_sites mysql:Connector-C++/
|
|
|
|
distname ${name_package}-${version}
|
|
checksums rmd160 2445b7c3aab96e459bf8726963fbc7e203af7e6e \
|
|
sha256 3e31847a69a4e5c113b7c483731317ec4533858e3195d3a85026a0e2f509d2e4
|
|
|
|
boost.depends_type build
|
|
|
|
patch.pre_args-replace -p0 -p1
|
|
patchfiles patch-CMakeLists.txt.diff \
|
|
patch-cppconn-CMakeLists.txt.diff \
|
|
patch-driver-CMakeLists.txt.diff \
|
|
patch-examples-examples.h.diff \
|
|
patch-examples-pthreads.cpp.diff \
|
|
patch-examples-standalone_example.cpp.diff \
|
|
patch-examples-standalone_example_docs1.cpp.diff \
|
|
patch-examples-standalone_example_docs2.cpp.diff
|
|
|
|
post-extract {
|
|
file copy -force ${filespath}/examples-CMakeLists.txt \
|
|
${worksrcpath}/examples/CMakeLists.txt
|
|
}
|
|
|
|
post-patch {
|
|
reinplace "s,@NAME@,/${subport},g" \
|
|
${worksrcpath}/CMakeLists.txt \
|
|
${worksrcpath}/cppconn/CMakeLists.txt \
|
|
${worksrcpath}/driver/CMakeLists.txt \
|
|
${worksrcpath}/examples/CMakeLists.txt
|
|
|
|
reinplace "s,@DBPORT@,/${mp.port},g" \
|
|
${worksrcpath}/examples/CMakeLists.txt \
|
|
${worksrcpath}/examples/examples.h
|
|
|
|
reinplace "s,@PREFIX@,${prefix},g" \
|
|
${worksrcpath}/examples/CMakeLists.txt
|
|
}
|
|
|
|
configure.args-append \
|
|
-DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/${subport}
|
|
|
|
post-destroot {
|
|
xinstall -d ${destroot}${prefix}/share/${subport}
|
|
copy ${worksrcpath}/examples \
|
|
${destroot}${prefix}/share/${subport}/
|
|
|
|
foreach lib [glob -directory ${destroot}${prefix}/lib/${subport} -type f *.dylib] {
|
|
system "install_name_tool -id ${prefix}/lib/${subport}/[strsed ${lib} /^.*\\///] ${lib}"
|
|
}
|
|
}
|
|
|
|
set mp.ports {
|
|
mysql51
|
|
mysql55
|
|
mysql56
|
|
mysql57
|
|
mariadb
|
|
}
|
|
set mp.names {}
|
|
foreach mp.port ${mp.ports} {
|
|
lappend mp.names "${mp.port}-connector-cpp"
|
|
}
|
|
foreach mp.name ${mp.names} {
|
|
set idx [lsearch ${mp.names} ${mp.name}]
|
|
set mp.port [lindex ${mp.ports} $idx]
|
|
set mp.conflicts [lreplace ${mp.names} $idx $idx]
|
|
|
|
if {[string compare ${mp.name} ${name}] == 0 && [string compare ${mp.name} ${subport}] == 0} {
|
|
# remove revision here when port is updated
|
|
revision 1
|
|
description The MySQL Connector/C++ for ${mp.port}.
|
|
long_description {*}${description} \
|
|
Standardized MySQL database driver for C++ development.
|
|
depends_lib-append port:${mp.port}
|
|
configure.args-append \
|
|
-DMYSQLCPPCONN_DYNLOAD_MYSQL_LIB:FILEPATH=${prefix}/lib/${mp.port}/mysql/libmysqlclient.dylib \
|
|
-DMYSQL_CONFIG_EXECUTABLE:FILEPATH=${prefix}/lib/${mp.port}/bin/mysql_config
|
|
} else {
|
|
subport ${mp.name} {
|
|
description The MySQL Connector/C++ for ${mp.port}.
|
|
long_description {*}${description} \
|
|
Standardized MySQL database driver for C++ development.
|
|
depends_lib-append port:${mp.port}
|
|
configure.args-append \
|
|
-DMYSQLCPPCONN_DYNLOAD_MYSQL_LIB:FILEPATH=${prefix}/lib/${mp.port}/mysql/libmysqlclient.dylib \
|
|
-DMYSQL_CONFIG_EXECUTABLE:FILEPATH=${prefix}/lib/${mp.port}/bin/mysql_config
|
|
}
|
|
}
|
|
}
|
|
|
|
livecheck.type regex
|
|
livecheck.url [lindex ${master_sites} 0]
|
|
livecheck.regex "\"mysql-connector-c\\+\\+-(\\d\[\\d\\.\]*)\\${extract.suffix}\""
|