Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c++/, dev-db/mysql-connector-c++/files/
Date: Mon, 20 Jan 2020 19:26:50
Message-Id: 1579548387.bb8412d8423ff2a9e3626f5a15d6fb01e6979ec1.whissi@gentoo
1 commit: bb8412d8423ff2a9e3626f5a15d6fb01e6979ec1
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 20 19:15:36 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 20 19:26:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb8412d8
7
8 dev-db/mysql-connector-c++: bump to v8.0.19
9
10 Closes: https://bugs.gentoo.org/699464
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 dev-db/mysql-connector-c++/Manifest | 1 +
15 .../mysql-connector-c++-8.0.19-fix-build.patch | 307 +++++++++++++++++++++
16 ...connector-c++-8.0.19-fix-libressl-support.patch | 89 ++++++
17 .../mysql-connector-c++-8.0.19.ebuild | 44 +++
18 4 files changed, 441 insertions(+)
19
20 diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
21 index 8e7d1efe818..99ad91c7d61 100644
22 --- a/dev-db/mysql-connector-c++/Manifest
23 +++ b/dev-db/mysql-connector-c++/Manifest
24 @@ -3,3 +3,4 @@ DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507
25 DIST mysql-connector-c++-1.1.9.tar.gz 508255 BLAKE2B e2cd300946a873a94beab13d9d1cb64ecb5bd9a9a56ef2217b1f7aff1643adc9afc0aa22c2ff1e0f6b8318cd34d12a7fe95f0584c96c212307fa9bd0cb54a2a1 SHA512 ec4d6cb7f21d52e786de3bff951e65ea5ad7391ba097b599d0094d3e8356cf17f700dee618e38e79d7a9e562684a6c51cca95fb8e2e225942766d33f8d0a5646
26 DIST mysql-connector-c++-8.0.15-src.tar.gz 2210243 BLAKE2B 45e0ffa2134c9df5a7e311963c7f2c58b5d7cfc0eefd80a5dc323bbe34ba60d40c79154f932e19c5f8e18ae45d0b61d304b7b7daba4955f92f830cf20c718931 SHA512 9a217b8f61babe5dac405be19b12d34b22673e779433d880a3aa31ea2e128f93434599a3fe0c1150b3f7b8c4d03f595d545d8cc33342a60561a2f60bff71ef14
27 DIST mysql-connector-c++-8.0.18-src.tar.gz 3115736 BLAKE2B f28229593d20f4a401a3e9d0e636ee896a90fb7573f06d9b60340540d6c4d577b4f44daa287c7896a03a60d75dec343413cba981e63a22607ce60eb20f4de122 SHA512 f5b202677392bcf5c5bdd4c3433332e57aa20c1a140de81b57ce3ce69709661d572e2466ae022926fc220b20159c90f09f15b5e44f384529103a24fd592de60d
28 +DIST mysql-connector-c++-8.0.19-src.tar.gz 3137484 BLAKE2B 82a2900b0daa00bcfd72d562818ada25fe15901991a896a46ecdd9304e03066c4e7a3804287540559df1c74dbd1b3983b450ab783ee8cb7f0d7ec152f3cdc6b0 SHA512 5987ae31cda3a5db18ceded201ccbe66263b8ab7665ceacf70af6bb6b99130377b40514b96644b0768fd809b36ee02580520923c11c1edecccc75da15d7bb0bd
29
30 diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-build.patch
31 new file mode 100644
32 index 00000000000..b8976199afc
33 --- /dev/null
34 +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-build.patch
35 @@ -0,0 +1,307 @@
36 +--- a/CMakeLists.txt
37 ++++ b/CMakeLists.txt
38 +@@ -475,7 +475,7 @@ set_target_properties(connector PROPERTIES
39 +
40 +
41 + install(TARGETS connector
42 +- CONFIGURATIONS Release RelWithDebInfo
43 ++ CONFIGURATIONS Release RelWithDebInfo Gentoo
44 + ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
45 + RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
46 + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
47 +--- a/cdk/cmake/DepFindProtobuf.cmake
48 ++++ b/cdk/cmake/DepFindProtobuf.cmake
49 +@@ -48,229 +48,7 @@ if(TARGET Protobuf::pb)
50 + return()
51 + endif()
52 +
53 +-message(STATUS "Setting up Protobuf.")
54 +-
55 +-set(PB_SOURCE_DIR "${PROJECT_SOURCE_DIR}/protobuf")
56 +-set(PB_BINARY_DIR "${PROJECT_BINARY_DIR}/protobuf")
57 +-set(config_stamp "${PB_BINARY_DIR}/config.stamp")
58 +-set(build_stamp "${PB_BINARY_DIR}/build.stamp")
59 +-
60 +-
61 +-#
62 +-# Pick build configuration for the protobuf build. Normally we build using the
63 +-# same build configuration that is used for building CDK (Release/Debug/etc.).
64 +-# But we also support building CDK under non-standard build configuration
65 +-# named 'Static' (this is a dirty trick we use to simplify building our MSIs).
66 +-# Since protobuf does not know 'Static' build configuration, we build protobuf
67 +-# under 'Release' configuration in that case.
68 +-#
69 +-# We need to handle two cases. For some build systems, like Makefiles,
70 +-# the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
71 +-# variable. In that case we also set it during protobuf build configuration.
72 +-# Another case is a multi-configuration build system like MSVC. In this case
73 +-# we use generator expression to pick correct configuration when the build
74 +-# command is invoked below.
75 +-#
76 +-
77 +-set(build_type)
78 +-if(CMAKE_BUILD_TYPE)
79 +- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
80 +- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
81 +- else()
82 +- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
83 +- endif()
84 +-endif()
85 +-
86 +-set(CONFIG_EXPR
87 +- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
88 +-)
89 +-
90 +-set(set_arch)
91 +-if(CMAKE_GENERATOR_PLATFORM)
92 +- set(set_arch -A ${CMAKE_GENERATOR_PLATFORM})
93 +-endif()
94 +-
95 +-set(set_toolset)
96 +-if(CMAKE_GENERATOR_TOOLSET)
97 +- set(set_toolset -T ${CMAKE_GENERATOR_TOOLSET})
98 +-endif()
99 +-
100 +-if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
101 +-
102 +- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR} ${set_arch} ${set_toolset}")
103 +-
104 +- file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
105 +- file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
106 +-
107 +- # Dirty trick to speed up cmake set up time.
108 +- #file(
109 +- # COPY "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}"
110 +- # DESTINATION "${PB_BINARY_DIR}/CMakeFiles"
111 +- #)
112 +-
113 +- execute_process(
114 +- COMMAND ${CMAKE_COMMAND}
115 +- -G "${CMAKE_GENERATOR}"
116 +- ${set_arch}
117 +- ${set_toolset}
118 +- ${set_build_type}
119 +- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
120 +- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
121 +- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
122 +- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
123 +- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
124 +- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
125 +- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
126 +- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
127 +- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
128 +- ${PB_SOURCE_DIR}
129 +- WORKING_DIRECTORY ${PB_BINARY_DIR}
130 +- RESULT_VARIABLE protobuf_config
131 +- )
132 +-
133 +- if(protobuf_config)
134 +- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
135 +- endif()
136 +-
137 +- message("==== Protobuf build configured.")
138 +-
139 +-endif()
140 +-
141 +-
142 +-include(${PB_BINARY_DIR}/exports.cmake)
143 +-
144 +-#
145 +-# Protobuf library targets imported above (pb_protobuf
146 +-# and pb_protobuf-lite) are local to the directory from which
147 +-# they were imported. This is not good if cdk is used as
148 +-# a sub-project of a parent project, because the parent project
149 +-# must have access to these targets.
150 +-#
151 +-# For that reason below we create global protobuf/protobuf-lite targets
152 +-# and copy their locations from the imported targets.
153 +-#
154 +-# Note: we can't use ALIAS library because it does not work with imported
155 +-# targets
156 +-#
157 +-
158 +-add_library(Protobuf::pb-full STATIC IMPORTED GLOBAL)
159 +-add_library(Protobuf::pb-lite STATIC IMPORTED GLOBAL)
160 +-add_executable(Protobuf::protoc IMPORTED GLOBAL)
161 +-
162 +-set(TGT_protobuf Protobuf::pb-full)
163 +-set(TGT_protobuf-lite Protobuf::pb-lite)
164 +-set(TGT_protoc Protobuf::protoc)
165 +-
166 +-foreach(tgt protobuf protobuf-lite protoc)
167 +-
168 +- #message("processing: ${tgt}")
169 +-
170 +- set(loc_list)
171 +-
172 +- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
173 +-
174 +- #message("- CONF: ${CONF}")
175 +-
176 +- get_target_property(LOC pb_${tgt} IMPORTED_LOCATION_${CONF})
177 +-
178 +- if(LOC)
179 +-
180 +- #message("- setting imported location to: ${LOC}")
181 +- list(APPEND loc_list "${LOC}")
182 +-
183 +- set_target_properties(${TGT_${tgt}} PROPERTIES
184 +- IMPORTED_LOCATION_${CONF} "${LOC}"
185 +- )
186 +-
187 +- set_property(TARGET ${TGT_${tgt}} APPEND PROPERTY
188 +- IMPORTED_CONFIGURATIONS ${CONF}
189 +- )
190 +-
191 +- endif()
192 +-
193 +- endforeach(CONF)
194 +-
195 +- #
196 +- # To support 'Static' build configuration the targets imported from the
197 +- # Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
198 +- # 'Release' locations as Protobuf is built using 'Release' configuration in
199 +- # that case.
200 +- #
201 +-
202 +- get_target_property(LOC ${TGT_${tgt}} IMPORTED_LOCATION_RELEASE)
203 +- set_property(TARGET ${TGT_${tgt}} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
204 +-
205 +-endforeach(tgt)
206 +-
207 +-
208 +-#message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
209 +-set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "")
210 +-
211 +-set_target_properties(Protobuf::pb-lite PROPERTIES
212 +- INTERFACE_INCLUDE_DIRECTORIES "${PROTOBUF_INCLUDE_DIR}"
213 +-)
214 +-
215 +-set_target_properties(Protobuf::pb-full PROPERTIES
216 +- INTERFACE_LINK_LIBRARIES Protobuf::pb-lite
217 +-)
218 +-
219 +-# On UNIX Protobuf uses pthread library
220 +-if(UNIX)
221 +- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
222 +- INTERFACE_LINK_LIBRARIES pthread
223 +- )
224 +-endif()
225 +-
226 +-#
227 +-# Note: This is needed to correctly compile headers generated by protobuf
228 +-# with sunpro compiler.
229 +-#
230 +-
231 +-if(SUNPRO)
232 +- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
233 +- INTERFACE_COMPILE_DEFINITIONS SOLARIS_64BIT_ENABLED
234 +- )
235 +-endif()
236 +-
237 +-#
238 +-# Try using parallel builds for protobuf.
239 +-#
240 +-
241 +-include(ProcessorCount)
242 +-ProcessorCount(N)
243 +-
244 +-MESSAGE("Processor Count: ${N}")
245 +-
246 +-set(opt_build)
247 +-set(opt_tool)
248 +-if(NOT N EQUAL 0)
249 +- if(NOT CMAKE_VERSION VERSION_LESS 3.12)
250 +- set(opt_build --parallel ${N})
251 +- elseif(CMAKE_MAKE_PROGRAM MATCHES "make")
252 +- set(opt_tool -j${N})
253 +- endif()
254 +-endif()
255 +-
256 +-add_custom_command(OUTPUT "${build_stamp}"
257 +- COMMAND ${CMAKE_COMMAND} --build . ${opt_build} --config ${CONFIG_EXPR} -- ${opt_tool}
258 +- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
259 +- WORKING_DIRECTORY "${PB_BINARY_DIR}"
260 +- COMMENT "Building protobuf"
261 +-)
262 +-
263 +-add_custom_target(build_protobuf
264 +- SOURCES "${build_stamp}"
265 +-)
266 +-
267 +-set_target_properties(build_protobuf PROPERTIES FOLDER "Misc")
268 +-
269 +-add_dependencies(Protobuf::pb-full build_protobuf)
270 +-add_dependencies(Protobuf::pb-lite build_protobuf)
271 +-add_dependencies(Protobuf::protoc build_protobuf)
272 +-
273 +-# TODO: Handle lite/full version
274 +-
275 +-
276 ++find_package(Protobuf REQUIRED)
277 +
278 + # Standard PROTOBUF_GENERATE_CPP modified to our usage
279 +
280 +@@ -299,11 +77,11 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
281 + "${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
282 + COMMAND ${CMAKE_COMMAND}
283 + -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
284 +- COMMAND Protobuf::protoc
285 ++ COMMAND ${Protobuf_PROTOC_EXECUTABLE}
286 + ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
287 + -I ${ABS_PATH} ${ABS_FIL}
288 +- --proto_path=${PROJECT_SOURCE_DIR}/protobuf/protobuf-3.6.1/src
289 +- DEPENDS ${ABS_FIL} #${PROTOBUF_PROTOC_EXECUTABLE}
290 ++ --proto_path=${Protobuf_INCLUDE_DIR}
291 ++ DEPENDS ${ABS_FIL} #${Protobuf_PROTOC_EXECUTABLE}
292 + COMMENT "Running C++ protocol buffer compiler on ${FIL}"
293 + VERBATIM
294 + )
295 +--- a/cdk/core/CMakeLists.txt
296 ++++ b/cdk/core/CMakeLists.txt
297 +@@ -44,7 +44,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
298 +
299 + target_link_libraries(cdk
300 + PUBLIC cdk_mysqlx cdk_parser
301 +- PRIVATE Protobuf::pb-lite # required by codecc.cc
302 ++ PRIVATE protobuf # required by codecc.cc
303 + )
304 +
305 + add_coverage(cdk)
306 +--- a/cdk/protocol/mysqlx/CMakeLists.txt
307 ++++ b/cdk/protocol/mysqlx/CMakeLists.txt
308 +@@ -126,11 +126,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
309 + ${CMAKE_CURRENT_BINARY_DIR}
310 + )
311 +
312 +-if(use_full_protobuf)
313 +- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-full)
314 +-else()
315 +- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-lite)
316 +-endif()
317 ++target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf)
318 +
319 + target_link_libraries(cdk_proto_mysqlx PRIVATE cdk_foundation)
320 +
321 +--- a/jdbc.cmake
322 ++++ b/jdbc.cmake
323 +@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
324 + list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
325 + endif()
326 +
327 +-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
328 ++list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
329 +
330 + if(CMAKE_BUILD_TYPE)
331 + if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
332 +--- a/jdbc/CMakeLists.txt
333 ++++ b/jdbc/CMakeLists.txt
334 +@@ -272,7 +272,7 @@ set_target_properties(connector-jdbc
335 +
336 +
337 + install(TARGETS connector-jdbc
338 +- CONFIGURATIONS Release RelWithDebInfo
339 ++ CONFIGURATIONS Release RelWithDebInfo Gentoo
340 + ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT JDBCDev
341 + RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
342 + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
343
344 diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-libressl-support.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-libressl-support.patch
345 new file mode 100644
346 index 00000000000..fc6eb777063
347 --- /dev/null
348 +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-libressl-support.patch
349 @@ -0,0 +1,89 @@
350 +--- a/cdk/cmake/DepFindSSL.cmake
351 ++++ b/cdk/cmake/DepFindSSL.cmake
352 +@@ -88,7 +88,7 @@ function(main)
353 +
354 + set(OPENSSL_LIB_DIR "${OPENSSL_LIB_DIR}" CACHE INTERNAL "")
355 +
356 +- if(NOT OPENSSL_VERSION_MAJOR EQUAL 1)
357 ++ if(NOT OPENSSL_VERSION_MAJOR VERSION_GREATER_EQUAL 1)
358 + message(SEND_ERROR "OpenSSL version 1.x is required but version ${OPENSSL_VERSION} was found")
359 + else()
360 + message(STATUS "Using OpenSSL version: ${OPENSSL_VERSION}")
361 +@@ -182,42 +182,33 @@ function(find_openssl)
362 + set(OPENSSL_INCLUDE_DIR "${OPENSSL_INCLUDE_DIR}" PARENT_SCOPE)
363 + message("-- found OpenSSL headers at: ${OPENSSL_INCLUDE_DIR}")
364 +
365 +-
366 + # Verify version number. Version information looks like:
367 +- # #define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1a 20 Nov 2018"
368 +-
369 ++ # #define OPENSSL_VERSION_NUMBER 0x1000103fL
370 ++ # Encoded as MNNFFPPS: major minor fix patch status
371 + FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
372 + OPENSSL_VERSION_NUMBER
373 +- REGEX "#[ ]*define[\t ]+OPENSSL_VERSION_TEXT"
374 ++ REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
375 + )
376 +-
377 +- #message("== OPENSSL_VERSION_NUMBER: ${OPENSSL_VERSION_NUMBER}")
378 + STRING(REGEX REPLACE
379 +- "^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL[\t ]([0-9]+)\\.([0-9]+)\\.([0-9]+)([a-z]*)[\t ].*$"
380 +- "\\1;\\2;\\3;\\4"
381 +- version_list "${OPENSSL_VERSION_NUMBER}"
382 ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
383 ++ OPENSSL_VERSION_MAJOR "${OPENSSL_VERSION_NUMBER}"
384 ++ )
385 ++ STRING(REGEX REPLACE
386 ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
387 ++ OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_NUMBER}"
388 ++ )
389 ++ STRING(REGEX REPLACE
390 ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
391 ++ OPENSSL_VERSION_FIX "${OPENSSL_VERSION_NUMBER}"
392 + )
393 +- #message("-- OPENSSL_VERSION: ${version_list}")
394 +-
395 +- list(GET version_list 0 OPENSSL_VERSION_MAJOR)
396 +- math(EXPR OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR})
397 +-
398 +- list(GET version_list 1 OPENSSL_VERSION_MINOR)
399 +- math(EXPR OPENSSL_VERSION_MINOR ${OPENSSL_VERSION_MINOR})
400 +-
401 +- list(GET version_list 2 OPENSSL_VERSION_FIX)
402 +- math(EXPR OPENSSL_VERSION_FIX ${OPENSSL_VERSION_FIX})
403 +-
404 +- list(GET version_list 3 OPENSSL_VERSION_PATCH)
405 +-
406 +-
407 +
408 + set(OPENSSL_VERSION
409 +- "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH}"
410 ++ "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}"
411 + PARENT_SCOPE
412 + )
413 + set(OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR} PARENT_SCOPE)
414 +
415 ++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
416 +
417 + find_library(OPENSSL_LIBRARY
418 + NAMES ssl ssleay32 ssleay32MD libssl
419 +--- a/cdk/foundation/connection_openssl.cc
420 ++++ b/cdk/foundation/connection_openssl.cc
421 +@@ -211,7 +211,7 @@ static void throw_ssl_error(SSL* tls, int err)
422 + case SSL_ERROR_WANT_CONNECT:
423 + case SSL_ERROR_WANT_ACCEPT:
424 + case SSL_ERROR_WANT_X509_LOOKUP:
425 +-# if OPENSSL_VERSION_NUMBER >= 0x10100000L
426 ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
427 + case SSL_ERROR_WANT_ASYNC:
428 + case SSL_ERROR_WANT_ASYNC_JOB:
429 + # endif
430 +@@ -387,7 +387,7 @@ void TLS_helper::setup(SSL_CTX *ctx)
431 +
432 + SSL_CTX_set_cipher_list(ctx, m_cipher_list.c_str());
433 +
434 +-#if OPENSSL_VERSION_NUMBER>=0x1010100fL
435 ++#if HAVE_TLS1_3_VERSION
436 +
437 + /*
438 + Note: If TLSv1.3 is not enabled, there is no need to restrict
439
440 diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.19.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.19.ebuild
441 new file mode 100644
442 index 00000000000..fb1898b6062
443 --- /dev/null
444 +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.19.ebuild
445 @@ -0,0 +1,44 @@
446 +# Copyright 1999-2020 Gentoo Authors
447 +# Distributed under the terms of the GNU General Public License v2
448 +
449 +EAPI="7"
450 +
451 +CMAKE_MAKEFILE_GENERATOR=emake
452 +inherit cmake-utils
453 +
454 +DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
455 +HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
456 +URI_DIR="Connector-C++"
457 +SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
458 +
459 +LICENSE="Artistic GPL-2"
460 +SLOT="0"
461 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
462 +IUSE="+legacy libressl"
463 +
464 +RDEPEND="
465 + dev-libs/protobuf:=
466 + legacy? (
467 + dev-libs/boost:=
468 + >=dev-db/mysql-connector-c-6.1.8:=
469 + )
470 + !libressl? ( dev-libs/openssl:0= )
471 + libressl? ( dev-libs/libressl:0= )"
472 +DEPEND="${RDEPEND}"
473 +S="${WORKDIR}/${P}-src"
474 +
475 +PATCHES=(
476 + "${FILESDIR}"/${PN}-8.0.19-fix-build.patch
477 + "${FILESDIR}"/${PN}-8.0.19-fix-libressl-support.patch
478 +)
479 +
480 +src_configure() {
481 + local mycmakeargs=(
482 + -DWITH_SSL=system
483 + -DWITH_JDBC=$(usex legacy ON OFF)
484 + $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
485 + $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
486 + )
487 +
488 + cmake-utils_src_configure
489 +}