summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-01-06 20:49:20 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-01-06 20:50:24 +0100
commit98a62031a548747cb66a8f6a5b24dc065aa8d8ac (patch)
tree433ba828c26879ee7607295ff6f54e00613670df /dev-db/mysql-connector-c++
parentmedia-gfx/imagemagick: drop old (diff)
downloadgentoo-98a62031a548747cb66a8f6a5b24dc065aa8d8ac.tar.gz
gentoo-98a62031a548747cb66a8f6a5b24dc065aa8d8ac.tar.bz2
gentoo-98a62031a548747cb66a8f6a5b24dc065aa8d8ac.zip
dev-db/mysql-connector-c++: bump to v1.1.11 & v8.0.13
Bug: https://bugs.gentoo.org/674450 Package-Manager: Portage-2.3.53, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-db/mysql-connector-c++')
-rw-r--r--dev-db/mysql-connector-c++/Manifest2
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch15
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch43
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.13-fix-build.patch329
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-1.1.11.ebuild63
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.13.ebuild40
6 files changed, 492 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index bcd51d9d1cff..9735622de440 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -1,2 +1,4 @@
+DIST mysql-connector-c++-1.1.11.tar.gz 504872 BLAKE2B 16a265ce291d18d3e76f6654b42271d8c6cc9329f047d9eb0c6cdfaea37e1c13f04932e595e4333882b26154f0940949bc9bdab9d8af8e25d2bfff43be0030fa SHA512 d6839ecda12d1f088f24b20c08f3e9a757e9907d3375dba39e0f247b6a11de59817739644201e74d782d4c900aa18bf60910fe60a9ee98a2c0138104fb55dc22
DIST mysql-connector-c++-1.1.9.tar.gz 508255 BLAKE2B e2cd300946a873a94beab13d9d1cb64ecb5bd9a9a56ef2217b1f7aff1643adc9afc0aa22c2ff1e0f6b8318cd34d12a7fe95f0584c96c212307fa9bd0cb54a2a1 SHA512 ec4d6cb7f21d52e786de3bff951e65ea5ad7391ba097b599d0094d3e8356cf17f700dee618e38e79d7a9e562684a6c51cca95fb8e2e225942766d33f8d0a5646
DIST mysql-connector-c++-8.0.11-src.tar.gz 2322951 BLAKE2B a1ea47c0440beae1892144186ad6b99a4519369845e1f37f5ce42088df6c29a458bd41840a1f9401dbd29827bc3a7c96ba34563a3a4cf3176e29e377cc254b9f SHA512 5113efb473b7cc63f680c04dacf5bee78d0a58ee20b41c8203edb92f8720c31c52c24de838996f25476eaa3d734c845531440317e82cb5e5f635bc03b057a148
+DIST mysql-connector-c++-8.0.13-src.tar.gz 2174609 BLAKE2B 5293ccfb7ad3bd6d50e0518db402d93f707535498ff1f608acc5c642cdc2c671601cbb7c14c7e6ec66fea8bdcb22effbb90e0ee2c207e8e82be7a2b446512f24 SHA512 0c260eff0002f5abc177049b9d050daf3b7860634355c10c02cb0ece18a3d1505454d67d8742d7e879c0cc6b44f8045f75e64d79bdd0bbfc211de9903abec902
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch
new file mode 100644
index 000000000000..4b8a4a983096
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch
@@ -0,0 +1,15 @@
+https://bugs.mysql.com/bug.php?id=90727
+
+--- a/FindMySQL.cmake
++++ b/FindMySQL.cmake
+@@ -700,8 +700,10 @@ endif()
+
+ # For dynamic linking use the built-in sys and strings
+ if(NOT MYSQLCLIENT_STATIC_LINKING)
++IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ list(APPEND SYS_LIBRARIES "mysql_sys")
+ list(APPEND SYS_LIBRARIES "mysql_strings")
++endif()
+ list(APPEND SYS_LIBRARIES ${MYSQL_LIBRARIES})
+ SET(MYSQL_LIBRARIES ${SYS_LIBRARIES})
+
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch
new file mode 100644
index 000000000000..2868a3c024af
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-mariadb.patch
@@ -0,0 +1,43 @@
+--- a/driver/mysql_connection.cpp
++++ b/driver/mysql_connection.cpp
+@@ -1067,6 +1067,7 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName, void * opti
+ proxy->get_character_set_info(&cs);
+ *(static_cast<int *>(optionValue)) = cs.mbmaxlen;
+ /* mysql_get_option() was added in mysql 5.7.3 version */
++#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ try {
+ if (GET_CONN_OPTION(optionName, optionValue, intOptions)) {
+@@ -1080,6 +1081,7 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName, void * opti
+ CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str());
+ throw e;
+ }
++#endif
+ }
+ }
+ /* }}} */
+@@ -1097,11 +1099,13 @@ MySQL_Connection::getClientOption(const sql::SQLString & optionName)
+ MY_CHARSET_INFO cs;
+ proxy->get_character_set_info(&cs);
+ return cs.dir ? sql::SQLString(cs.dir) : "";
++#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ const char* optionValue= NULL;
+ if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) {
+ return optionValue ? sql::SQLString(optionValue) : "";
+ }
++#endif
+ }
+ return "";
+ }
+--- a/driver/nativeapi/libmysql_static_proxy.cpp
++++ b/driver/nativeapi/libmysql_static_proxy.cpp
+@@ -325,7 +325,7 @@ LibmysqlStaticProxy::options(MYSQL * mysql, enum mysql_option option, const void
+ int
+ LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg)
+ {
+-#if MYSQL_VERSION_ID >= 50703
++#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
+ if (::mysql_get_option(mysql, option, arg)) {
+ throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()");
+ } else {
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.13-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.13-fix-build.patch
new file mode 100644
index 000000000000..9bc45d274d7d
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.13-fix-build.patch
@@ -0,0 +1,329 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8ba914a..e1127f1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -669,7 +669,7 @@ set_target_properties(connector PROPERTIES
+
+
+ install(TARGETS connector
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
+ RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
+@@ -740,6 +740,12 @@ TARGET_LINK_LIBRARIES(try connector)
+ SET_INTERFACE_OPTIONS(try devapi)
+ # ADD_GCOV(try)
+
++IF(WITH_SSL STREQUAL "system")
++ find_package(OpenSSL REQUIRED)
++ TARGET_LINK_LIBRARIES(try ${OPENSSL_LIBRARIES})
++ENDIF()
++
++
+ if(WITH_JDBC)
+
+ add_executable(try_jdbc EXCLUDE_FROM_ALL try_jdbc.cc)
+diff --git a/buildinfo.cmake b/buildinfo.cmake
+index cc57a2c..129afeb 100644
+--- a/buildinfo.cmake
++++ b/buildinfo.cmake
+@@ -112,4 +112,4 @@ if(WITH_JDBC)
+ endif()
+
+
+-install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION . COMPONENT Readme)
++#install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION . COMPONENT Readme)
+diff --git a/cdk/cmake/install_macros.cmake b/cdk/cmake/install_macros.cmake
+index 37c1061..39336cf 100644
+--- a/cdk/cmake/install_macros.cmake
++++ b/cdk/cmake/install_macros.cmake
+@@ -327,7 +327,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
+ DESTINATION ${ARG_DESTINATION}
+ ${RENAME_PARAM}
+ ${PERMISSIONS_${target_type}}
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ COMPONENT ${ARG_COMPONENT}
+ OPTIONAL)
+
+@@ -346,7 +346,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
+ INSTALL(FILES ${debug_pdb_target_location}
+ DESTINATION ${ARG_PDB_DESTINATION}
+ ${PDB_RENAME_PARAM}
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ COMPONENT ${ARG_COMPONENT}
+ OPTIONAL)
+ ENDIF()
+diff --git a/cdk/cmake/libutils.cmake b/cdk/cmake/libutils.cmake
+index 959fc5d..aec2d91 100644
+--- a/cdk/cmake/libutils.cmake
++++ b/cdk/cmake/libutils.cmake
+@@ -282,14 +282,7 @@ function(add_library_ex TARGET)
+ endforeach()
+
+ if(libs)
+-
+- if(${type} STREQUAL "STATIC")
+- merge_static_libraries(${TARGET} ${libs})
+- add_dependencies(${TARGET} ${libs})
+- else()
+ target_link_libraries(${TARGET} PRIVATE ${libs})
+- endif()
+-
+ endif()
+
+ #
+diff --git a/cdk/cmake/protobuf.cmake b/cdk/cmake/protobuf.cmake
+index 95ecc71..484687c 100644
+--- a/cdk/cmake/protobuf.cmake
++++ b/cdk/cmake/protobuf.cmake
+@@ -26,201 +26,8 @@
+ # along with this program; if not, write to the Free Software Foundation, Inc.,
+ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+-#
+-# Usage:
+-#
+-# INCLUDE(protobuf)
+-# [USE_FULL_PROTOBUF()]
+-#
+-# MYSQLX_PROTOBUF_GENERATE_CPP(SRCS HDRS <protobuf definitions>)
+-# ADD_LIBRARY(target ... ${SRCS})
+-#
+-
+-if(DEFINED WITH_PROTOBUF)
+-
+- #
+- # If WITH_PROTOBUF is defined, it should point at external location where
+- # protobuf libraries were built using our CMakeLists.txt (so that
+- # exports.cmake was produced).
+- #
+-
+- if (NOT EXISTS "${WITH_PROTOBUF}/exports.cmake")
+- message(FATAL_ERROR
+- "Valid protobuf build not found at the given location"
+- " (could not find exports.cmake): ${WITH_PROTOBUF}"
+- )
+- endif()
+-
+- message("Using protobuf build at: ${WITH_PROTOBUF}")
+-
+-else(DEFINED WITH_PROTOBUF)
+-
+- #
+- # If external WITH_PROTOBUF location is not given, then we arrange for
+- # building of protbuf from bundled sources in ${PROJECT_BINARY_DIR}/protobuf.
+- #
+-
+- message("Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}")
+- file(REMOVE "${PROJECT_BINARY_DIR}/protobuf/CMakeCache.txt")
+- file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/protobuf")
+-
+- #
+- # Pick build configuration for the protobuf build. Normally we build using the
+- # same build configuration that is used for building CDK (Release/Debug/etc.).
+- # But we also support building CDK under non-standard build configuration
+- # named 'Static' (this is a dirty trick we use to simplify building our MSIs).
+- # Since protobuf does not know 'Static' build configuration, we build protobuf
+- # under 'Release' configuration in that case.
+- #
+- # We need to handle two cases. For some build systems, like Makefiles,
+- # the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
+- # variable. In that case we also set it during protobuf build configuration.
+- # Another case is a multi-configuration build system like MSVC. In this case
+- # we use generator expression to pick correct configuration when the build
+- # command is invoked below.
+- #
+-
+- if(CMAKE_BUILD_TYPE)
+- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
+- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
+- else()
+- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
+- endif()
+- endif()
+-
+- set(CONFIG_EXPR
+- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
+- )
+-
+- execute_process(
+- COMMAND ${CMAKE_COMMAND}
+- -G "${CMAKE_GENERATOR}"
+- ${set_build_type}
+- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
+- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
+- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
+- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
+- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
+- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
+- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
+- ${PROJECT_SOURCE_DIR}/protobuf
+- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
+- RESULT_VARIABLE protobuf_config
+- )
+-
+- if(protobuf_config)
+- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
+- endif()
+-
+- set(WITH_PROTOBUF "${PROJECT_BINARY_DIR}/protobuf")
+-
+-endif(DEFINED WITH_PROTOBUF)
+-
+-# Import targets exported by protobuf
+-
+-include(${WITH_PROTOBUF}/exports.cmake)
+-
+-#
+-# Protobuf library targets imported above (pb_protobuf
+-# and pb_protobuf-lite) are local to the directory from which
+-# they were imported. This is not good if cdk is used as
+-# a sub-project of a parent project, because the parent project
+-# must have access to these targets.
+-#
+-# For that reason below we create global protobuf/protobuf-lite targets
+-# and copy their locations from the imported targets.
+-#
+-# Note: we can't use ALIAS library because it does not work with imported
+-# targets
+-#
+-
+-add_library(protobuf STATIC IMPORTED GLOBAL)
+-add_library(protobuf-lite STATIC IMPORTED GLOBAL)
+-
+-foreach(lib protobuf protobuf-lite)
+- #message("processing: ${lib}")
+-
+- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
+- #message("- CONF: ${CONF}")
+-
+- get_target_property(LOC pb_${lib} IMPORTED_LOCATION_${CONF})
+- if(LOC)
+- #message("- setting imported location to: ${LOC}")
+- set_target_properties(${lib} PROPERTIES
+- IMPORTED_LOCATION_${CONF} "${LOC}"
+- )
+- set_property(TARGET ${lib} APPEND PROPERTY
+- IMPORTED_CONFIGURATIONS ${CONF}
+- )
+- endif()
+-
+- endforeach(CONF)
+-
+-endforeach(lib)
+-
+-#
+-# To support 'Static' build configuration the targets imported from the
+-# Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
+-# 'Release' locations as Protobuf is built using 'Release' configuration in
+-# that case.
+-#
+-
+-foreach(tgt protobuf protobuf-lite pb_protoc)
+-
+- get_target_property(LOC ${tgt} IMPORTED_LOCATION_RELEASE)
+- set_property(TARGET ${tgt} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
+-
+-endforeach(tgt)
+-
+-
+-# protobuf depends on protobuf-lite
+-
+-set_target_properties(protobuf PROPERTIES
+- INTERFACE_LINK_LIBRARIES "protobuf-lite"
+-)
+-
+-
+-message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
+-
+-set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIR}
+- CACHE INTERNAL "Protobuf include path" FORCE)
+-set(PROTOBUF_PROTOC_EXECUTABLE pb_protoc
+- CACHE INTERNAL "Protobuf compiler" FORCE)
+-
+-#
+-# Custom target build_protobuf ensures that Protobuf project is built.
+-#
+-# Note: this depends on Protobuf project generating the stamp file
+-#
+-
+-if(NOT DEFINED PROTOBUF_BUILD_STAMP)
+- message(FATAL_ERROR "Protobuf build stamp file not defined")
+-endif()
+-
+-
+-if(CMAKE_VERSION VERSION_LESS 3.0)
+- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
+- COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIGURATION>
+- WORKING_DIRECTORY ${WITH_PROTOBUF}
+- COMMENT "Building protobuf using configuration: $(Configuration)"
+- )
+-else()
+- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
+- COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG_EXPR}
+- WORKING_DIRECTORY ${WITH_PROTOBUF}
+- COMMENT "Building protobuf using configuration: $(Configuration)"
+- )
+-endif()
+-
+-add_custom_target(build_protobuf
+- DEPENDS ${PROTOBUF_BUILD_STAMP}
+-)
+-
+-add_dependencies(protobuf build_protobuf)
+-add_dependencies(protobuf-lite build_protobuf)
+-add_dependencies(pb_protoc build_protobuf)
++#SET(Protobuf_USE_STATIC_LIBS ON)
++find_package(Protobuf REQUIRED)
+
+ #
+ # Choice between full and lite version of the library.
+diff --git a/cdk/protocol/mysqlx/crud.cc b/cdk/protocol/mysqlx/crud.cc
+index 5cb12dc..6d32e21 100644
+--- a/cdk/protocol/mysqlx/crud.cc
++++ b/cdk/protocol/mysqlx/crud.cc
+@@ -295,7 +295,7 @@ public:
+ class Placeholder_conv_imp
+ : public Args_conv
+ {
+- map<string, unsigned> m_map;
++ std::map<string, unsigned> m_map;
+
+ public:
+
+@@ -303,7 +303,7 @@ public:
+
+ unsigned conv_placeholder(const string &name)
+ {
+- map<string, unsigned>::const_iterator it = m_map.find(name);
++ std::map<string, unsigned>::const_iterator it = m_map.find(name);
+ if (it == m_map.end())
+ throw_error("Placeholder converter: Placeholder was not defined on args");
+ //throw Generic_error((boost::format("Placeholder %s was not defined on args.")
+@@ -314,7 +314,7 @@ public:
+
+ void add_placeholder(const string &name)
+ {
+- map<string, unsigned>::const_iterator it = m_map.find(name);
++ std::map<string, unsigned>::const_iterator it = m_map.find(name);
+ if (it != m_map.end())
+ throw_error("Placeholder converter: Redefined placeholder");
+ //throw Generic_error((boost::format("Redifined placeholder %s.")
+diff --git a/jdbc.cmake b/jdbc.cmake
+index 60898da..b5d8bf0 100644
+--- a/jdbc.cmake
++++ b/jdbc.cmake
+@@ -38,7 +38,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
+ list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
+ endif()
+
+-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
++list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
+
+ if(CMAKE_BUILD_TYPE)
+ if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.11.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.11.ebuild
new file mode 100644
index 000000000000..d7c1ec3619aa
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.11.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
+URI_DIR="Connector-C++"
+SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug examples gcov static-libs"
+
+DEPEND="virtual/libmysqlclient:=
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ !<dev-db/mysql-connector-c-6.1.8"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.6-fix-cmake.patch"
+ "${FILESDIR}/${PN}-1.1.11-fix-mariadb.patch"
+ "${FILESDIR}/${PN}-1.1.11-fix-cpp-linking.patch"
+)
+
+src_configure() {
+ # native lib/wrapper needs this!
+ append-flags "-fno-strict-aliasing"
+
+ local mycmakeargs=(
+ -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF
+ -DMYSQLCPPCONN_ICU_ENABLE=OFF
+ -DMYSQLCPPCONN_TRACE_ENABLE=$(usex debug ON OFF)
+ -DMYSQLCPPCONN_GCOV_ENABLE=$(usex gcov ON OFF)
+ -DINSTALL_DOCS="/usr/share/doc/${PF}"
+ -DMYSQL_CXX_LINKAGE=0
+ -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # static lib has wrong name so we need to rename it
+ if use static-libs; then
+ mv "${ED%/}"/usr/$(get_libdir)/libmysqlcppconn-static.a \
+ "${ED%/}"/usr/$(get_libdir)/libmysqlcppconn.a || die
+ else
+ rm -f "${ED%/}"/usr/$(get_libdir)/libmysqlcppconn-static.a
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*
+ fi
+}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.13.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.13.ebuild
new file mode 100644
index 000000000000..f823bf40e1c4
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.13.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit cmake-utils
+
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
+URI_DIR="Connector-C++"
+SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+legacy"
+
+RDEPEND="
+ dev-libs/openssl:0=
+ dev-libs/protobuf:=
+ legacy? (
+ dev-libs/boost:=
+ >=dev-db/mysql-connector-c-6.1.8:=
+ )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-8.0.13-fix-build.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSL=system
+ -DWITH_JDBC=$(usex legacy ON OFF)
+ )
+
+ cmake-utils_src_configure
+}