summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-11-06 15:18:28 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-11-06 15:26:18 +0100
commit42b7c22b0e9c098503c47f62831a4afb885919e0 (patch)
tree7a2b661563c613ae4a4564dc63f46ca234c66748 /dev-db/mysql-connector-c++
parentnet-mail/pflogsumm: remove mask (diff)
downloadgentoo-42b7c22b0e9c098503c47f62831a4afb885919e0.tar.gz
gentoo-42b7c22b0e9c098503c47f62831a4afb885919e0.tar.bz2
gentoo-42b7c22b0e9c098503c47f62831a4afb885919e0.zip
dev-db/mysql-connector-c++: bump to v8.0.18
Closes: https://bugs.gentoo.org/699408 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-db/mysql-connector-c++')
-rw-r--r--dev-db/mysql-connector-c++/Manifest1
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch275
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.18.ebuild43
3 files changed, 319 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index 53c1ce4d540f..0d436369fb64 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -5,3 +5,4 @@ DIST mysql-connector-c++-8.0.11-src.tar.gz 2322951 BLAKE2B a1ea47c0440beae189214
DIST mysql-connector-c++-8.0.13-src.tar.gz 2174609 BLAKE2B 5293ccfb7ad3bd6d50e0518db402d93f707535498ff1f608acc5c642cdc2c671601cbb7c14c7e6ec66fea8bdcb22effbb90e0ee2c207e8e82be7a2b446512f24 SHA512 0c260eff0002f5abc177049b9d050daf3b7860634355c10c02cb0ece18a3d1505454d67d8742d7e879c0cc6b44f8045f75e64d79bdd0bbfc211de9903abec902
DIST mysql-connector-c++-8.0.15-src.tar.gz 2210243 BLAKE2B 45e0ffa2134c9df5a7e311963c7f2c58b5d7cfc0eefd80a5dc323bbe34ba60d40c79154f932e19c5f8e18ae45d0b61d304b7b7daba4955f92f830cf20c718931 SHA512 9a217b8f61babe5dac405be19b12d34b22673e779433d880a3aa31ea2e128f93434599a3fe0c1150b3f7b8c4d03f595d545d8cc33342a60561a2f60bff71ef14
DIST mysql-connector-c++-8.0.17-src.tar.gz 3111144 BLAKE2B d828ea0a37344719ff57017c7602597e8d419456d17313bddeaa1b69c239405ba584be2961ce833f2961b6b87ff7b29560be30d3a7412955c5b7db2399802ae9 SHA512 63b3e6e4c8bae3fd9bf23342f3684cc290b98d9fcf8af1e4eb5936ad37afce1169ea0cac211be1eff6827a0517cf56f4d215fbe2165a47591d940c77e1ecfa87
+DIST mysql-connector-c++-8.0.18-src.tar.gz 3115736 BLAKE2B f28229593d20f4a401a3e9d0e636ee896a90fb7573f06d9b60340540d6c4d577b4f44daa287c7896a03a60d75dec343413cba981e63a22607ce60eb20f4de122 SHA512 f5b202677392bcf5c5bdd4c3433332e57aa20c1a140de81b57ce3ce69709661d572e2466ae022926fc220b20159c90f09f15b5e44f384529103a24fd592de60d
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch
new file mode 100644
index 000000000000..484220442ab8
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch
@@ -0,0 +1,275 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -463,7 +463,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
+--- a/cdk/cmake/DepFindProtobuf.cmake
++++ b/cdk/cmake/DepFindProtobuf.cmake
+@@ -48,197 +48,7 @@ if(TARGET Protobuf::pb)
+ return()
+ endif()
+
+-message(STATUS "Setting up Protobuf.")
+-
+-set(PB_SOURCE_DIR "${PROJECT_SOURCE_DIR}/protobuf")
+-set(PB_BINARY_DIR "${PROJECT_BINARY_DIR}/protobuf")
+-set(config_stamp "${PB_BINARY_DIR}/config.stamp")
+-set(build_stamp "${PB_BINARY_DIR}/build.stamp")
+-
+-
+-#
+-# 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.
+-#
+-
+-set(build_type)
+-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>>
+-)
+-
+-
+-if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
+-
+- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}")
+-
+- file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
+- file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
+-
+- # Dirty trick to speed up cmake set up time.
+- #file(
+- # COPY "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}"
+- # DESTINATION "${PB_BINARY_DIR}/CMakeFiles"
+- #)
+-
+- 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}
+- ${PB_SOURCE_DIR}
+- WORKING_DIRECTORY ${PB_BINARY_DIR}
+- RESULT_VARIABLE protobuf_config
+- )
+-
+- if(protobuf_config)
+- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
+- endif()
+-
+- message("==== Protobuf build configured.")
+-
+-endif()
+-
+-
+-include(${PB_BINARY_DIR}/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::pb-full STATIC IMPORTED GLOBAL)
+-add_library(Protobuf::pb-lite STATIC IMPORTED GLOBAL)
+-add_executable(Protobuf::protoc IMPORTED GLOBAL)
+-
+-set(TGT_protobuf Protobuf::pb-full)
+-set(TGT_protobuf-lite Protobuf::pb-lite)
+-set(TGT_protoc Protobuf::protoc)
+-
+-foreach(tgt protobuf protobuf-lite protoc)
+-
+- #message("processing: ${tgt}")
+-
+- set(loc_list)
+-
+- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
+-
+- #message("- CONF: ${CONF}")
+-
+- get_target_property(LOC pb_${tgt} IMPORTED_LOCATION_${CONF})
+-
+- if(LOC)
+-
+- #message("- setting imported location to: ${LOC}")
+- list(APPEND loc_list "${LOC}")
+-
+- set_target_properties(${TGT_${tgt}} PROPERTIES
+- IMPORTED_LOCATION_${CONF} "${LOC}"
+- )
+-
+- set_property(TARGET ${TGT_${tgt}} APPEND PROPERTY
+- IMPORTED_CONFIGURATIONS ${CONF}
+- )
+-
+- endif()
+-
+- endforeach(CONF)
+-
+- #
+- # 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.
+- #
+-
+- get_target_property(LOC ${TGT_${tgt}} IMPORTED_LOCATION_RELEASE)
+- set_property(TARGET ${TGT_${tgt}} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
+-
+-endforeach(tgt)
+-
+-
+-#message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
+-set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "")
+-
+-set_target_properties(Protobuf::pb-lite PROPERTIES
+- INTERFACE_INCLUDE_DIRECTORIES "${PROTOBUF_INCLUDE_DIR}"
+-)
+-
+-set_target_properties(Protobuf::pb-full PROPERTIES
+- INTERFACE_LINK_LIBRARIES Protobuf::pb-lite
+-)
+-
+-# On UNIX Protobuf uses pthread library
+-if(UNIX)
+- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
+- INTERFACE_LINK_LIBRARIES pthread
+- )
+-endif()
+-
+-#
+-# Note: This is needed to correctly compile headers generated by protobuf
+-# with sunpro compiler.
+-#
+-
+-if(SUNPRO)
+- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
+- INTERFACE_COMPILE_DEFINITIONS SOLARIS_64BIT_ENABLED
+- )
+-endif()
+-
+-
+-add_custom_command(OUTPUT "${build_stamp}"
+- COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG_EXPR}
+- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
+- WORKING_DIRECTORY "${PB_BINARY_DIR}"
+- COMMENT "Building protobuf"
+-)
+-
+-add_custom_target(build_protobuf
+- SOURCES "${build_stamp}"
+-)
+-
+-add_dependencies(Protobuf::pb-full build_protobuf)
+-add_dependencies(Protobuf::pb-lite build_protobuf)
+-add_dependencies(Protobuf::protoc build_protobuf)
+-
+-# TODO: Handle lite/full version
+-
++find_package(Protobuf REQUIRED)
+
+
+ # Standard PROTOBUF_GENERATE_CPP modified to our usage
+@@ -268,11 +78,11 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
+ "${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
+ COMMAND ${CMAKE_COMMAND}
+ -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
+- COMMAND Protobuf::protoc
++ COMMAND ${Protobuf_PROTOC_EXECUTABLE}
+ ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
+ -I ${ABS_PATH} ${ABS_FIL}
+- --proto_path=${PROJECT_SOURCE_DIR}/protobuf/protobuf-3.6.1/src
+- DEPENDS ${ABS_FIL} #${PROTOBUF_PROTOC_EXECUTABLE}
++ --proto_path=${Protobuf_INCLUDE_DIR}
++ DEPENDS ${ABS_FIL} #${Protobuf_PROTOC_EXECUTABLE}
+ COMMENT "Running C++ protocol buffer compiler on ${FIL}"
+ VERBATIM
+ )
+--- a/cdk/core/CMakeLists.txt
++++ b/cdk/core/CMakeLists.txt
+@@ -44,7 +44,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
+
+ target_link_libraries(cdk
+ PUBLIC cdk_mysqlx cdk_parser
+- PRIVATE Protobuf::pb-lite # required by codecc.cc
++ PRIVATE protobuf # required by codecc.cc
+ )
+
+ add_coverage(cdk)
+--- a/cdk/protocol/mysqlx/CMakeLists.txt
++++ b/cdk/protocol/mysqlx/CMakeLists.txt
+@@ -125,11 +125,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+-if(use_full_protobuf)
+- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-full)
+-else()
+- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-lite)
+-endif()
++target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf)
+
+ target_link_libraries(cdk_proto_mysqlx PRIVATE cdk_foundation)
+
+--- a/jdbc.cmake
++++ b/jdbc.cmake
+@@ -66,7 +66,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]")
+--- a/jdbc/CMakeLists.txt
++++ b/jdbc/CMakeLists.txt
+@@ -272,7 +272,7 @@ set_target_properties(connector-jdbc
+
+
+ install(TARGETS connector-jdbc
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT JDBCDev
+ RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.18.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.18.ebuild
new file mode 100644
index 000000000000..bc937af3de44
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.18.ebuild
@@ -0,0 +1,43 @@
+# 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="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+legacy libressl"
+
+RDEPEND="
+ dev-libs/protobuf:=
+ legacy? (
+ dev-libs/boost:=
+ >=dev-db/mysql-connector-c-6.1.8:=
+ )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-8.0.18-fix-build.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSL=system
+ -DWITH_JDBC=$(usex legacy ON OFF)
+ $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
+ $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
+ )
+
+ cmake-utils_src_configure
+}