From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- .../files/8.0.11-fix-build.patch | 276 +++++++++++++++++++++ .../mysql-connector-c++-1.1.3-fix-cmake.patch | 123 +++++++++ .../mysql-connector-c++-1.1.5-fix-mariadb.patch | 45 ++++ .../mysql-connector-c++-1.1.6-fix-cmake.patch | 23 ++ .../mysql-connector-c++-1.1.8-fix-mariadb.patch | 45 ++++ 5 files changed, 512 insertions(+) create mode 100644 dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch create mode 100644 dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch create mode 100644 dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch create mode 100644 dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch create mode 100644 dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch (limited to 'dev-db/mysql-connector-c++/files') diff --git a/dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch b/dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch new file mode 100644 index 000000000000..7449b910a9b0 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/8.0.11-fix-build.patch @@ -0,0 +1,276 @@ +diff -aurN a/buildinfo.cmake b/buildinfo.cmake +--- a/buildinfo.cmake 2018-04-08 15:10:57.000000000 -0400 ++++ b/buildinfo.cmake 2018-04-20 13:37:20.993266176 -0400 +@@ -112,4 +112,4 @@ + endif() + + +-install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION .) ++#install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION .) +diff -aurN a/cdk/cmake/install_macros.cmake b/cdk/cmake/install_macros.cmake +--- a/cdk/cmake/install_macros.cmake 2018-04-08 15:10:57.000000000 -0400 ++++ b/cdk/cmake/install_macros.cmake 2018-04-20 14:12:17.255877167 -0400 +@@ -327,7 +327,7 @@ + DESTINATION ${ARG_DESTINATION} + ${RENAME_PARAM} + ${PERMISSIONS_${target_type}} +- CONFIGURATIONS Release RelWithDebInfo ++ CONFIGURATIONS Release RelWithDebInfo Gentoo + COMPONENT ${ARG_COMPONENT} + OPTIONAL) + +@@ -346,7 +346,7 @@ + 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 -aurN a/cdk/cmake/libutils.cmake b/cdk/cmake/libutils.cmake +--- a/cdk/cmake/libutils.cmake 2018-04-08 15:10:57.000000000 -0400 ++++ b/cdk/cmake/libutils.cmake 2018-04-20 14:27:49.021432318 -0400 +@@ -275,14 +275,7 @@ + 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 -aurN a/cdk/cmake/protobuf.cmake b/cdk/cmake/protobuf.cmake +--- a/cdk/cmake/protobuf.cmake 2018-04-08 15:10:57.000000000 -0400 ++++ b/cdk/cmake/protobuf.cmake 2018-04-20 13:43:04.950466261 -0400 +@@ -36,142 +36,8 @@ + # ADD_LIBRARY(target ... ${SRCS}) + # + +-# +-# Configure Protobuf project in protobuf subfolder of build location. +-# +- +-message("Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}") +-file(REMOVE ${PROJECT_BINARY_DIR}/protobuf/CMakeCache.txt) +-file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf) +- +-# If specified, use the same build type for Protobuf +- +-if(CMAKE_BUILD_TYPE) +- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) +-endif() +- +-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} +- ${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() +- +-include(${PROJECT_BINARY_DIR}/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 blow we create global protobuf/protobuf-lite targets +-# and copy their loactions from the 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("- settig imported location to: ${LOC}") +- set(location "${LOC}") +- set_target_properties(${lib} PROPERTIES +- IMPORTED_LOCATION_${CONF} "${LOC}" +- ) +- set_property(TARGET ${lib} APPEND PROPERTY +- IMPORTED_CONFIGURATIONS ${CONF}) +- endif() +- +- endforeach(CONF) +- +- # For multi-configuration builders like MSVC, set a generic +- # location of the form /$(Configuration)/ which will +- # work with any configuration choosen at build time. +- # It is constructed from one of per-configurartion locations +- # determined above and saved in ${location}. The logic assumes +- # that the per-configration location is of the form +- # // +- +- if(CMAKE_CONFIGURATION_TYPES) +- +- get_filename_component(name "${location}" NAME) +- get_filename_component(LOC "${location}" PATH) +- get_filename_component(LOC "${LOC}" PATH) +- set(LOC "${LOC}/$(Configuration)/${name}") +- +- message("- setting generic location to: ${LOC}") +- set_target_properties(${lib} PROPERTIES +- IMPORTED_LOCATION "${LOC}" +- ) +- +- endif() +- +-endforeach(lib) +- +- +-# 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 $ +- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf +- COMMENT "Building protobuf using configuration: $" +- ) +-else() +- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP} +- COMMAND ${CMAKE_COMMAND} --build . --config $ +- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf +- COMMENT "Building protobuf using 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 -aurN a/cdk/protocol/mysqlx/crud.cc b/cdk/protocol/mysqlx/crud.cc +--- a/cdk/protocol/mysqlx/crud.cc 2018-04-08 15:10:57.000000000 -0400 ++++ b/cdk/protocol/mysqlx/crud.cc 2018-04-20 11:22:22.398040489 -0400 +@@ -295,7 +295,7 @@ + class Placeholder_conv_imp + : public Args_conv + { +- map m_map; ++ std::map m_map; + + public: + +@@ -303,7 +303,7 @@ + + unsigned conv_placeholder(const string &name) + { +- map::const_iterator it = m_map.find(name); ++ std::map::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 @@ + + void add_placeholder(const string &name) + { +- map::const_iterator it = m_map.find(name); ++ std::map::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 -aurN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2018-04-20 14:15:00.546645410 -0400 ++++ b/CMakeLists.txt 2018-04-20 13:26:16.888470928 -0400 +@@ -529,7 +529,7 @@ + + + install(TARGETS connector +- CONFIGURATIONS Release RelWithDebInfo ++ CONFIGURATIONS Release RelWithDebInfo Gentoo + ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" + RUNTIME DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" +@@ -576,6 +576,12 @@ + 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 try_jdbc.cc) +--- a/jdbc.cmake 2018-04-08 15:10:57.000000000 -0400 ++++ b/jdbc.cmake 2018-04-20 15:03:38.683674143 -0400 +@@ -20,7 +20,7 @@ + # Configure legacy connector build environment in ${JDBC_DIR} + # + +-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON) ++list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF) + + if(CMAKE_BUILD_TYPE) + list(APPEND jdbc_cmake_opts -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) +--- /var/tmp/portage/dev-db/mysql-connector-c++-8.0.11/work/mysql-connector-c++-8.0.11-src/jdbc/FindMySQL.cmake 2018-02-23 05:47:56.000000000 -0500 ++++ mysql-connector-c++-8.0.11-src/jdbc/FindMySQL.cmake 2018-04-20 15:13:42.204665429 -0400 +@@ -832,9 +832,11 @@ + IF(NOT WIN32) + _mysql_conf(MYSQL_COMPILER_VERSION "") + STRING(REGEX MATCH "Compiler:[a-zA-Z0-9\\. ]+" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION}) ++IF(MYSQL_COMPILER_VERSION) + STRING(REGEX REPLACE "Compiler: " "" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION}) + STRING(REGEX MATCH "[a-zA-Z0-9]+" MYSQL_COMPILER_ID ${MYSQL_COMPILER_VERSION}) + STRING(REGEX REPLACE "[a-zA-Z0-9]+ " "" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION}) ++ENDIF(MYSQL_COMPILER_VERSION) + ENDIF(NOT WIN32) + + ########################################################################## diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch new file mode 100644 index 000000000000..5f0669ca3381 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch @@ -0,0 +1,123 @@ +--- a/CMakeLists.txt 2014-05-04 21:27:59.000000000 -0400 ++++ b/CMakeLists.txt 2014-05-04 21:47:31.460572470 -0400 +@@ -38,7 +38,7 @@ + + if(COMMAND cmake_policy AND POLICY CMP0015) + cmake_policy(SET CMP0015 NEW) +-endif(COMMAND cmake_policy) ++endif(COMMAND cmake_policy AND POLICY CMP0015) + + #----------------- + # CPPFLAGS, CXXFLAGS and LDFLAGS from the environment +@@ -258,14 +258,14 @@ + ${CPACK_RESOURCE_FILE_LICENSE} + "${CMAKE_SOURCE_DIR}/Licenses_for_Third-Party_Components.txt" + "${CMAKE_SOURCE_DIR}/ANNOUNCEMENT" +- DESTINATION "." OPTIONAL) ++ DESTINATION "${INSTALL_DOCS}" OPTIONAL) + + SET(COMMON_IGNORE_FILES "/CMakeFiles/" "/Testing/" "/.bzr/" "_CPack_Packages/" + ".cmake$" "~" ".swp" ".log" ".gz" ".directory$" "CMakeCache.txt" "Makefile" + "install_manifest.txt") + SET(PRJ_COMMON_IGNORE_FILES ${COMMON_IGNORE_FILES} "ANNOUNCEMENT_102_ALPHA" "ANNOUNCEMENT_103_ALPHA" "ANNOUNCEMENT_104_BETA" "ANNOUNCEMENT_105_GA" "ANNOUNCEMENT_110_GA" "ANNOUNCEMENT_111_GA" "ANNOUNCEMENT_DRAFT" ) + +-SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "./cppconn/config.h$" "./driver/nativeapi/binding_config.h$") ++SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h$" "${CMAKE_CURRENT_SOURCE_DIR}/driver/nativeapi/binding_config.h$") + SET(CPACK_PACKAGE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "something_there" ) + SET(CPACK_SOURCE_GENERATOR "TGZ") + +@@ -292,10 +292,6 @@ + ADD_SUBDIRECTORY(cppconn) + ADD_SUBDIRECTORY(driver) + ADD_SUBDIRECTORY(examples) +-ADD_SUBDIRECTORY(test) +-ADD_SUBDIRECTORY(test/framework) +-ADD_SUBDIRECTORY(test/CJUnitTestsPort) +-ADD_SUBDIRECTORY(test/unit) + + IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + # see also README +--- a/FindMySQL.cm 2014-05-04 22:20:50.000000000 -0400 ++++ b/FindMySQL.cm 2014-05-04 22:21:40.325384447 -0400 +@@ -58,7 +58,7 @@ + EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags" + OUTPUT_VARIABLE _mysql_config_output + ) +- STRING(REGEX MATCHALL "-m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}") ++ STRING(REGEX MATCHALL " -m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}") + STRING(REGEX REPLACE "[\r\n]$" "" MYSQL_CXXFLAGS "${_mysql_config_output}") + # ADD_DEFINITIONS("${MYSQL_CXXFLAGS}") + ELSE (MYSQL_CONFIG_EXECUTABLE AND NOT WIN32) +diff -urN a/cppconn/CMakeLists.txt b/cppconn/CMakeLists.txt +--- a/cppconn/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ b/cppconn/CMakeLists.txt 2011-07-30 14:10:34.000000000 +0200 +@@ -55,7 +55,7 @@ + + SET(MYSQLCPPCONN_INSTALL_HEADERS + build_config.h +- config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/config.h + connection.h + datatype.h + driver.h +diff -urN mysql-connector-c++-1.1.0.old/driver/CMakeLists.txt mysql-connector-c++-1.1.0/driver/CMakeLists.txt +--- a/driver/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ b/driver/CMakeLists.txt 2011-07-30 13:20:36.000000000 +0200 +@@ -26,6 +26,9 @@ + + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/driver/nativeapi) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}) + MESSAGE(STATUS "BOOST_INCLUDE_DIRS=${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}") + +@@ -149,20 +152,22 @@ + nativeapi/native_statement_wrapper.h + nativeapi/mysql_native_resultset_wrapper.h + nativeapi/native_resultset_wrapper.h +- ../cppconn/warning.h +- ../cppconn/statement.h +- ../cppconn/sqlstring.h +- ../cppconn/resultset_metadata.h +- ../cppconn/resultset.h +- ../cppconn/prepared_statement.h +- ../cppconn/parameter_metadata.h +- ../cppconn/metadata.h +- ../cppconn/exception.h +- ../cppconn/driver.h +- ../cppconn/datatype.h +- ../cppconn/connection.h +- ../cppconn/config.h +- ../cppconn/build_config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/warning.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/sqlstring.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/prepared_statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/parameter_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/exception.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/driver.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/datatype.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/connection.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/build_config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/build_config.h + + ) + +@@ -271,8 +276,8 @@ + ) + ELSE(WIN32) + INSTALL(TARGETS mysqlcppconn mysqlcppconn-static +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + ENDIF(WIN32) + diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch new file mode 100644 index 000000000000..fa36e3bad936 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch @@ -0,0 +1,45 @@ +diff -aruN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp +--- a/driver/nativeapi/libmysql_static_proxy.cpp 2014-11-19 08:37:11.000000000 -0500 ++++ b/driver/nativeapi/libmysql_static_proxy.cpp 2015-02-21 22:19:50.119234140 -0500 +@@ -319,7 +319,7 @@ + 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 ) + if (::mysql_get_option(mysql, option, arg)) { + throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()"); + } else { +diff -aruN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp +--- a/driver/mysql_connection.cpp 2014-11-19 08:37:11.000000000 -0500 ++++ b/driver/mysql_connection.cpp 2015-02-21 22:28:48.920210376 -0500 +@@ -1015,6 +1015,7 @@ + MY_CHARSET_INFO cs; + proxy->get_character_set_info(&cs); + *(static_cast(optionValue)) = cs.mbmaxlen; ++#ifndef MARIADB_BASE_VERSION + /* mysql_get_option() was added in mysql 5.7.3 version */ + } else if ( proxy->get_server_version() >= 50703 ) { + try { +@@ -1029,6 +1030,7 @@ + CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str()); + throw e; + } ++#endif /* MARIADB_BASE_VERSION */ + } + } + /* }}} */ +@@ -1046,11 +1048,13 @@ + MY_CHARSET_INFO cs; + proxy->get_character_set_info(&cs); + return cs.dir ? sql::SQLString(cs.dir) : ""; ++#ifndef MARIADB_BASE_VERSION + } else if ( proxy->get_server_version() >= 50703 ) { + const char* optionValue= NULL; + if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) { + return optionValue ? sql::SQLString(optionValue) : ""; + } ++#endif /* MARIADB_BASE_VERSION */ + } + return ""; + } diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch new file mode 100644 index 000000000000..18d4e9a80410 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch @@ -0,0 +1,23 @@ +diff -aurN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2015-06-04 08:58:30.000000000 -0400 ++++ b/CMakeLists.txt 2015-07-21 10:41:59.081091000 -0400 +@@ -300,7 +300,7 @@ + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") + ENDIF(WIN32) + +-SET(DOC_DESTINATION ".") ++SET(DOC_DESTINATION ${INSTALL_DOCS}) + IF(RPM_LAYOUT) + SET(DOC_DESTINATION "share/doc/${CPACK_PACKAGE_NAME}-${MYSQLCPPCONN_VERSION}") + ENDIF() +@@ -373,10 +373,6 @@ + ADD_SUBDIRECTORY(cppconn) + ADD_SUBDIRECTORY(driver) + ADD_SUBDIRECTORY(examples) +-ADD_SUBDIRECTORY(test) +-ADD_SUBDIRECTORY(test/framework) +-ADD_SUBDIRECTORY(test/CJUnitTestsPort) +-ADD_SUBDIRECTORY(test/unit) + + IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + # see also README diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch new file mode 100644 index 000000000000..35ed218e18dc --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch @@ -0,0 +1,45 @@ +diff -aurN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp +--- a/driver/mysql_connection.cpp 2016-12-14 04:58:54.000000000 -0500 ++++ b/driver/mysql_connection.cpp 2017-01-26 16:33:58.086005627 -0500 +@@ -1023,6 +1023,7 @@ + proxy->get_character_set_info(&cs); + *(static_cast(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)) { +@@ -1036,6 +1037,7 @@ + CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str()); + throw e; + } ++#endif + } + } + /* }}} */ +@@ -1053,11 +1055,13 @@ + 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 ""; + } +diff -aurN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp +--- a/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:35:46.256038741 -0500 ++++ b/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:28:34.114915809 -0500 +@@ -319,7 +319,7 @@ + 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 { -- cgit v1.2.3