summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-08-04 21:00:41 +0200
committerThomas Deutschmann <whissi@gentoo.org>2021-08-04 21:13:16 +0200
commita399535b6ea5a2411eb2d3a7511931d4b7f96dbb (patch)
tree27129105636c9cac045e68cbdc73d2c366cf144a /dev-db/mysql-connector-c++
parentdev-db/mysql-connector-c: bump to v8.0.26 (diff)
downloadgentoo-a399535b6ea5a2411eb2d3a7511931d4b7f96dbb.tar.gz
gentoo-a399535b6ea5a2411eb2d3a7511931d4b7f96dbb.tar.bz2
gentoo-a399535b6ea5a2411eb2d3a7511931d4b7f96dbb.zip
dev-db/mysql-connector-c++: bump to v8.0.26
Package-Manager: Portage-3.0.21, Repoman-3.0.3 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.26-fix-build.patch321
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.26.ebuild43
3 files changed, 365 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index 856ac8e36998..c5cd1cfc4341 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -6,3 +6,4 @@ DIST mysql-connector-c++-8.0.22-src.tar.gz 3795112 BLAKE2B c5d6f0ebeb4649857f321
DIST mysql-connector-c++-8.0.23-src.tar.gz 3798295 BLAKE2B 923eebbd7f9cde0252c84de4c70863b40c0dd93ad98a93e2ec14c935b2f3f0b0f251828a8bbbd0f23a5ec03491db06020294e19455901d15181c84fec9fb3d7f SHA512 f8eb8842e199d7373f4b55644720ac63b93eb33be19294c433f57aaf556ce1b5752223154194469fa28af52adebe930f0a7b4e8f62df92cc810b545aa7bab928
DIST mysql-connector-c++-8.0.24-src.tar.gz 3797356 BLAKE2B e509e04f6c93893948c573401188567bcbda91db0e608d53b1795593abf043117e1a525d3abe5c8396068a2ef750582cde15b64412e556e89762d08032abb602 SHA512 5507bc562e8263ee17efb9d4e2f52e471da75e73a1fc4dd1bc0a2ac1c2a593be889c4b042037cf6d3cbff854ae5cc865a8800251da475aed0f31710229af26f1
DIST mysql-connector-c++-8.0.25-src.tar.gz 3800065 BLAKE2B 67546b2d7d9de25ccb440c22bd58ee83e6fae78710e6dfa802cb0446bf5be433c56458424f0ee81c9a899bbfd5f464712d2d0b43dceb4205b492c7b1a79f7858 SHA512 44dd7f4296d666801be55642e53cb5181d9b5c3b080306975a48eb6280e555d9b924b42b14b44dffee4c54fab3f662a7b6bb6584d9a1ed710f0026788611c525
+DIST mysql-connector-c++-8.0.26-src.tar.gz 3980027 BLAKE2B 86ce0d94db588ed86ce7b21851f866da26268f7c9059b57697cbe1f5c5d031a3eada2f55042feb7b2888b538277c773215c0d19e8a1968ff70ce363e8f95bd77 SHA512 e3a08551a4245bf886cb7e3775a256fa379bb781b523a84d30e0d0c16cae73c808a3413b08b09998eba9c0ea3ede19e505b6392ed71712a8e9a2df31f07e4c79
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.26-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.26-fix-build.patch
new file mode 100644
index 000000000000..2c80085b6392
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.26-fix-build.patch
@@ -0,0 +1,321 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -467,7 +467,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,244 +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>>
+-)
+-
+-set(set_arch)
+-if(CMAKE_GENERATOR_PLATFORM)
+- set(set_arch -A ${CMAKE_GENERATOR_PLATFORM})
+-endif()
+-
+-set(set_toolset)
+-if(CMAKE_GENERATOR_TOOLSET)
+- set(set_toolset -T ${CMAKE_GENERATOR_TOOLSET})
+-endif()
+-
+-set(set_system_name)
+-if(CMAKE_SYSTEM_NAME)
+- set(set_system_name -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
+- if(CMAKE_SYSTEM_VERSION)
+- list(APPEND set_system_name -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION})
+- endif()
+-endif()
+-
+-set(set_system_processor)
+-if(CMAKE_SYSTEM_PROCESSOR)
+- set(set_system_processor -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR})
+-endif()
+-
+-if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
+-
+- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR} ${set_arch} ${set_toolset} ${set_system_name}")
+-
+- 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_arch}
+- ${set_toolset}
+- ${set_build_type}
+- ${set_system_name}
+- ${set_system_processor}
+- -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_libprotobuf Protobuf::pb-full)
+-set(TGT_libprotobuf-lite Protobuf::pb-lite)
+-set(TGT_protoc Protobuf::protoc)
+-
+-foreach(tgt libprotobuf libprotobuf-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()
+-
+-#
+-# Try using parallel builds for protobuf.
+-#
+-
+-include(ProcessorCount)
+-ProcessorCount(N)
+-
+-MESSAGE("Processor Count: ${N}")
+-
+-set(opt_build)
+-set(opt_tool)
+-if(NOT N EQUAL 0)
+- if(NOT CMAKE_VERSION VERSION_LESS 3.12)
+- set(opt_build --parallel ${N})
+- elseif(CMAKE_MAKE_PROGRAM MATCHES "make")
+- set(opt_tool -j${N})
+- endif()
+-endif()
+-
+-add_custom_command(OUTPUT "${build_stamp}"
+- COMMAND ${CMAKE_COMMAND} --build . ${opt_build} --config ${CONFIG_EXPR} -- ${opt_tool}
+- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
+- WORKING_DIRECTORY "${PB_BINARY_DIR}"
+- COMMENT "Building protobuf"
+-)
+-
+-add_custom_target(build_protobuf
+- SOURCES "${build_stamp}"
+-)
+-
+-set_target_properties(build_protobuf PROPERTIES FOLDER "Misc")
+-
+-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
+
+@@ -314,10 +77,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}
+- 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
+@@ -45,7 +45,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
+@@ -127,11 +127,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 zlib lz4 zstd)
+
+--- 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
+@@ -299,7 +299,7 @@ endif()
+
+
+ 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.26.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.26.ebuild
new file mode 100644
index 000000000000..c5ac6ef6bc72
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.26.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit cmake
+
+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"
+
+RDEPEND="
+ dev-libs/protobuf:=
+ legacy? (
+ dev-libs/boost:=
+ >=dev-db/mysql-connector-c-6.1.8:=
+ )
+ dev-libs/openssl:0=
+ "
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.26-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_src_configure
+}