1 |
commit: 518c23ba49e0623d758c8420234b937bcde4276d |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 20 18:10:47 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 20 19:26:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=518c23ba |
7 |
|
8 |
dev-db/mysql-connector-c: bump to v8.0.19 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/697934 |
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 |
...onnector-c-8.0.19-do-not-install-comp_err.patch | 12 + |
16 |
.../files/mysql-connector-c-8.0.19-libressl.patch | 297 +++++++++++++++++++++ |
17 |
.../mysql-connector-c-8.0.19.ebuild | 111 ++++++++ |
18 |
4 files changed, 421 insertions(+) |
19 |
|
20 |
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest |
21 |
index c716740b2d3..545daa75efd 100644 |
22 |
--- a/dev-db/mysql-connector-c/Manifest |
23 |
+++ b/dev-db/mysql-connector-c/Manifest |
24 |
@@ -1,3 +1,4 @@ |
25 |
DIST mysql-boost-8.0.17.tar.gz 189322239 BLAKE2B f9f46e5fdc3e9869b203626bc09edfbcdbabcd68eba43f9c6a33b9a52cffb3a32f39704c6d22a66899aac16fa2efb271c5dc7af7522768b45542ac8dc615cd8a SHA512 a278ee263670cb1f79d67c4b87c4b88632569c3b20a4297a6e77d550155db20902f22992ea851cf59ea523bb97d5e08707e3457f71a678e9f1ac2fa4ca5b7a2d |
26 |
DIST mysql-boost-8.0.18.tar.gz 194953221 BLAKE2B e3622cccd8f60487a5e643e522e9cdc763d63ad2a5eda86a7a7db37f48a4e1288fea88ef7097c6c4b51bd5e8fd8ba26a5b8aea3501ae847180066e2d0aa2b5dc SHA512 180091ad3e74e2afa28ecb914850e6b4e8c92b8981f32b161f53381b92120d87dbd2c2fc073feb2543bb71702bac7368e9fb992821cfd3e3ca888019423b89f5 |
27 |
+DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01 |
28 |
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6 |
29 |
|
30 |
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-do-not-install-comp_err.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-do-not-install-comp_err.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..94329eeeb3c |
33 |
--- /dev/null |
34 |
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-do-not-install-comp_err.patch |
35 |
@@ -0,0 +1,12 @@ |
36 |
+diff --git a/utilities/CMakeLists.txt b/utilities/CMakeLists.txt |
37 |
+index c855f8ab..0ebef451 100644 |
38 |
+--- a/utilities/CMakeLists.txt |
39 |
++++ b/utilities/CMakeLists.txt |
40 |
+@@ -27,6 +27,7 @@ IF(NOT CMAKE_CROSSCOMPILING) |
41 |
+ comp_err.cc |
42 |
+ COMPONENT Server |
43 |
+ LINK_LIBRARIES mysys |
44 |
++ SKIP_INSTALL |
45 |
+ ) |
46 |
+ ENDIF() |
47 |
+ |
48 |
|
49 |
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch |
50 |
new file mode 100644 |
51 |
index 00000000000..1fc949ae856 |
52 |
--- /dev/null |
53 |
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.19-libressl.patch |
54 |
@@ -0,0 +1,297 @@ |
55 |
+--- a/cmake/ssl.cmake |
56 |
++++ b/cmake/ssl.cmake |
57 |
+@@ -229,13 +229,14 @@ MACRO (MYSQL_CHECK_SSL) |
58 |
+ OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}" |
59 |
+ ) |
60 |
+ ENDIF() |
61 |
+- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0") |
62 |
++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION) |
63 |
++ IF(HAVE_TLS1_3_VERSION) |
64 |
+ ADD_DEFINITIONS(-DHAVE_TLSv13) |
65 |
+ ENDIF() |
66 |
+ IF(OPENSSL_INCLUDE_DIR AND |
67 |
+ OPENSSL_LIBRARY AND |
68 |
+ CRYPTO_LIBRARY AND |
69 |
+- OPENSSL_MAJOR_VERSION STREQUAL "1" |
70 |
++ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1" |
71 |
+ ) |
72 |
+ SET(OPENSSL_FOUND TRUE) |
73 |
+ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl |
74 |
+--- a/mysys/my_md5.cc |
75 |
++++ b/mysys/my_md5.cc |
76 |
+@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf, |
77 |
+ int compute_md5_hash(char *digest, const char *buf, int len) { |
78 |
+ int retval = 0; |
79 |
+ int fips_mode = 0; |
80 |
++#ifndef LIBRESSL_VERSION_NUMBER |
81 |
+ fips_mode = FIPS_mode(); |
82 |
++#endif |
83 |
+ /* If fips mode is ON/STRICT restricted method calls will result into abort, |
84 |
+ * skipping call. */ |
85 |
+ if (fips_mode == 0) { |
86 |
+--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c |
87 |
++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c |
88 |
+@@ -329,6 +329,7 @@ error: |
89 |
+ return 1; |
90 |
+ } |
91 |
+ |
92 |
++#ifndef LIBRESSL_VERSION_NUMBER |
93 |
+ #define OPENSSL_ERROR_LENGTH 512 |
94 |
+ static int configure_ssl_fips_mode(const uint fips_mode) { |
95 |
+ int rc = -1; |
96 |
+@@ -352,6 +353,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) { |
97 |
+ EXIT: |
98 |
+ return rc; |
99 |
+ } |
100 |
++#endif |
101 |
+ |
102 |
+ static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file, |
103 |
+ const char *ca_path) { |
104 |
+@@ -555,10 +557,12 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file, |
105 |
+ int verify_server = SSL_VERIFY_NONE; |
106 |
+ int verify_client = SSL_VERIFY_NONE; |
107 |
+ |
108 |
++#ifndef LIBRESSL_VERSION_NUMBER |
109 |
+ if (configure_ssl_fips_mode(ssl_fips_mode) != 1) { |
110 |
+ G_ERROR("Error setting the ssl fips mode"); |
111 |
+ goto error; |
112 |
+ } |
113 |
++#endif |
114 |
+ |
115 |
+ SSL_library_init(); |
116 |
+ SSL_load_error_strings(); |
117 |
+@@ -622,7 +626,7 @@ error: |
118 |
+ void xcom_cleanup_ssl() { |
119 |
+ if (!xcom_use_ssl()) return; |
120 |
+ |
121 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
122 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) |
123 |
+ ERR_remove_thread_state(0); |
124 |
+ #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ |
125 |
+ } |
126 |
+--- a/plugin/x/client/xconnection_impl.cc |
127 |
++++ b/plugin/x/client/xconnection_impl.cc |
128 |
+@@ -520,6 +520,7 @@ XError Connection_impl::get_ssl_error(const int error_id) { |
129 |
+ return XError(CR_SSL_CONNECTION_ERROR, buffer); |
130 |
+ } |
131 |
+ |
132 |
++#ifndef LIBRESSL_VERSION_NUMBER |
133 |
+ /** |
134 |
+ Set fips mode in openssl library, |
135 |
+ When we set fips mode ON/STRICT, it will perform following operations: |
136 |
+@@ -559,6 +560,7 @@ int set_fips_mode(const uint32_t fips_mode, |
137 |
+ EXIT: |
138 |
+ return rc; |
139 |
+ } |
140 |
++#endif |
141 |
+ |
142 |
+ XError Connection_impl::activate_tls() { |
143 |
+ if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET); |
144 |
+@@ -569,12 +571,14 @@ XError Connection_impl::activate_tls() { |
145 |
+ if (!m_context->m_ssl_config.is_configured()) |
146 |
+ return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true}; |
147 |
+ |
148 |
++#ifndef LIBRESSL_VERSION_NUMBER |
149 |
+ char err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; |
150 |
+ if (set_fips_mode( |
151 |
+ static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode), |
152 |
+ err_string) != 1) { |
153 |
+ return XError{CR_SSL_CONNECTION_ERROR, err_string, true}; |
154 |
+ } |
155 |
++#endif |
156 |
+ auto ssl_ctx_flags = process_tls_version( |
157 |
+ details::null_when_empty(m_context->m_ssl_config.m_tls_version)); |
158 |
+ |
159 |
+--- a/router/src/http/src/tls_client_context.cc |
160 |
++++ b/router/src/http/src/tls_client_context.cc |
161 |
+@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) { |
162 |
+ |
163 |
+ void TlsClientContext::cipher_suites(const std::string &ciphers) { |
164 |
+ // TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites() |
165 |
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1) |
166 |
++#ifdef TLS1_3_VERSION |
167 |
+ if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) { |
168 |
+ throw TlsError("set-cipher-suites"); |
169 |
+ } |
170 |
+--- a/router/src/http/src/tls_context.cc |
171 |
++++ b/router/src/http/src/tls_context.cc |
172 |
+@@ -91,7 +91,7 @@ static int o11x_version(TlsVersion version) { |
173 |
+ return TLS1_1_VERSION; |
174 |
+ case TlsVersion::TLS_1_2: |
175 |
+ return TLS1_2_VERSION; |
176 |
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1) |
177 |
++#ifdef TLS1_3_VERSION |
178 |
+ case TlsVersion::TLS_1_3: |
179 |
+ return TLS1_3_VERSION; |
180 |
+ #endif |
181 |
+@@ -120,9 +120,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) { |
182 |
+ switch (min_version) { |
183 |
+ default: |
184 |
+ // unknown, leave all disabled |
185 |
++#ifdef TLS1_3_VERSION |
186 |
+ // fallthrough |
187 |
+ case TlsVersion::TLS_1_3: |
188 |
+ opts |= SSL_OP_NO_TLSv1_2; |
189 |
++#endif |
190 |
+ // fallthrough |
191 |
+ case TlsVersion::TLS_1_2: |
192 |
+ opts |= SSL_OP_NO_TLSv1_1; |
193 |
+@@ -170,8 +172,10 @@ TlsVersion TlsContext::min_version() const { |
194 |
+ return TlsVersion::TLS_1_1; |
195 |
+ case TLS1_2_VERSION: |
196 |
+ return TlsVersion::TLS_1_2; |
197 |
++#ifdef TLS1_3_VERSION |
198 |
+ case TLS1_3_VERSION: |
199 |
+ return TlsVersion::TLS_1_3; |
200 |
++#endif |
201 |
+ case 0: |
202 |
+ return TlsVersion::AUTO; |
203 |
+ default: |
204 |
+@@ -230,7 +234,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const { |
205 |
+ } |
206 |
+ |
207 |
+ int TlsContext::security_level() const { |
208 |
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) |
209 |
++#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \ |
210 |
++ !defined(LIBRESSL_VERSION_NUMBER) |
211 |
+ return SSL_CTX_get_security_level(ssl_ctx_.get()); |
212 |
+ #else |
213 |
+ return 0; |
214 |
+--- a/router/src/http/src/tls_server_context.cc |
215 |
++++ b/router/src/http/src/tls_server_context.cc |
216 |
+@@ -166,7 +166,8 @@ void TlsServerContext::init_tmp_dh(const std::string &dh_params) { |
217 |
+ } |
218 |
+ |
219 |
+ } else { |
220 |
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) |
221 |
++#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \ |
222 |
++ !defined(LIBRESSL_VERSION_NUMBER) |
223 |
+ dh2048.reset(DH_get_2048_256()); |
224 |
+ #else |
225 |
+ /* |
226 |
+--- a/sql-common/client.cc |
227 |
++++ b/sql-common/client.cc |
228 |
+@@ -7730,7 +7730,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, |
229 |
+ #endif |
230 |
+ break; |
231 |
+ case MYSQL_OPT_SSL_FIPS_MODE: { |
232 |
+-#if defined(HAVE_OPENSSL) |
233 |
++#if defined(HAVE_OPENSSL) && !defined(LIBRESSL_VERSION_NUMBER) |
234 |
+ char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; |
235 |
+ ENSURE_EXTENSIONS_PRESENT(&mysql->options); |
236 |
+ mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg); |
237 |
+--- a/sql/mysqld.cc |
238 |
++++ b/sql/mysqld.cc |
239 |
+@@ -4818,7 +4818,7 @@ static int init_thread_environment() { |
240 |
+ |
241 |
+ static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED; |
242 |
+ |
243 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
244 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) |
245 |
+ #define FILE_LINE_ARGS |
246 |
+ #else |
247 |
+ #define FILE_LINE_ARGS , const char *, int |
248 |
+@@ -4854,12 +4854,14 @@ static void init_ssl() { |
249 |
+ } |
250 |
+ |
251 |
+ static int init_ssl_communication() { |
252 |
++#ifndef LIBRESSL_VERSION_NUMBER |
253 |
+ char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; |
254 |
+ int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string); |
255 |
+ if (ret_fips_mode != 1) { |
256 |
+ LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string); |
257 |
+ return 1; |
258 |
+ } |
259 |
++#endif |
260 |
+ if (SslAcceptorContext::singleton_init(opt_use_ssl)) return 1; |
261 |
+ |
262 |
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L |
263 |
+--- a/sql/sys_vars.cc |
264 |
++++ b/sql/sys_vars.cc |
265 |
+@@ -4417,6 +4417,7 @@ static Sys_var_ulong Sys_max_execution_time( |
266 |
+ HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG), |
267 |
+ VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1)); |
268 |
+ |
269 |
++#ifndef LIBRESSL_VERSION_NUMBER |
270 |
+ static bool update_fips_mode(sys_var *, THD *, enum_var_type) { |
271 |
+ char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; |
272 |
+ if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) { |
273 |
+@@ -4427,15 +4428,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) { |
274 |
+ return false; |
275 |
+ } |
276 |
+ } |
277 |
++#endif |
278 |
+ |
279 |
++#if defined(LIBRESSL_VERSION_NUMBER) |
280 |
++static const char *ssl_fips_mode_names[] = {"OFF", 0}; |
281 |
++#else |
282 |
+ static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0}; |
283 |
++#endif |
284 |
+ static Sys_var_enum Sys_ssl_fips_mode( |
285 |
+ "ssl_fips_mode", |
286 |
+ "SSL FIPS mode (applies only for OpenSSL); " |
287 |
++#ifndef LIBRESSL_VERSION_NUMBER |
288 |
+ "permitted values are: OFF, ON, STRICT", |
289 |
++#else |
290 |
++ "permitted values are: OFF", |
291 |
++#endif |
292 |
+ GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE), |
293 |
+ ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, |
294 |
+- ON_CHECK(NULL), ON_UPDATE(update_fips_mode), NULL); |
295 |
++ ON_CHECK(NULL), |
296 |
++#ifndef LIBRESSL_VERSION_NUMBER |
297 |
++ ON_UPDATE(update_fips_mode), |
298 |
++#else |
299 |
++ ON_UPDATE(NULL), |
300 |
++#endif |
301 |
++ NULL); |
302 |
+ |
303 |
+ #if defined(HAVE_OPENSSL) |
304 |
+ static Sys_var_bool Sys_auto_generate_certs( |
305 |
+--- a/vio/viossl.cc |
306 |
++++ b/vio/viossl.cc |
307 |
+@@ -45,7 +45,7 @@ |
308 |
+ BIO_set_callback_ex was added in openSSL 1.1.1 |
309 |
+ For older openSSL, use the deprecated BIO_set_callback. |
310 |
+ */ |
311 |
+-#if OPENSSL_VERSION_NUMBER >= 0x10101000L |
312 |
++#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER) |
313 |
+ #define HAVE_BIO_SET_CALLBACK_EX |
314 |
+ #endif |
315 |
+ |
316 |
+@@ -637,7 +637,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, |
317 |
+ #if !defined(DBUG_OFF) |
318 |
+ { |
319 |
+ STACK_OF(SSL_COMP) *ssl_comp_methods = NULL; |
320 |
+- ssl_comp_methods = SSL_COMP_get_compression_methods(); |
321 |
++ ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods(); |
322 |
+ n = sk_SSL_COMP_num(ssl_comp_methods); |
323 |
+ DBUG_PRINT("info", ("Available compression methods:\n")); |
324 |
+ if (n == 0) |
325 |
+@@ -645,7 +645,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, |
326 |
+ else |
327 |
+ for (j = 0; j < n; j++) { |
328 |
+ SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j); |
329 |
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
330 |
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) |
331 |
+ DBUG_PRINT("info", (" %d: %s\n", c->id, c->name)); |
332 |
+ #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ |
333 |
+ DBUG_PRINT("info", |
334 |
+--- a/vio/viosslfactories.cc |
335 |
++++ b/vio/viosslfactories.cc |
336 |
+@@ -420,6 +420,7 @@ void ssl_start() { |
337 |
+ } |
338 |
+ } |
339 |
+ |
340 |
++#ifndef LIBRESSL_VERSION_NUMBER |
341 |
+ /** |
342 |
+ Set fips mode in openssl library, |
343 |
+ When we set fips mode ON/STRICT, it will perform following operations: |
344 |
+@@ -473,6 +474,7 @@ EXIT: |
345 |
+ @returns openssl current fips mode |
346 |
+ */ |
347 |
+ uint get_fips_mode() { return FIPS_mode(); } |
348 |
++#endif |
349 |
+ |
350 |
+ long process_tls_version(const char *tls_version) { |
351 |
+ const char *separator = ","; |
352 |
|
353 |
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 |
354 |
new file mode 100644 |
355 |
index 00000000000..4064f2093f9 |
356 |
--- /dev/null |
357 |
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.19.ebuild |
358 |
@@ -0,0 +1,111 @@ |
359 |
+# Copyright 1999-2020 Gentoo Authors |
360 |
+# Distributed under the terms of the GNU General Public License v2 |
361 |
+ |
362 |
+EAPI=7 |
363 |
+ |
364 |
+inherit cmake-multilib |
365 |
+ |
366 |
+# wrap the config script |
367 |
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) |
368 |
+ |
369 |
+DESCRIPTION="C client library for MariaDB/MySQL" |
370 |
+HOMEPAGE="https://dev.mysql.com/downloads/" |
371 |
+LICENSE="GPL-2" |
372 |
+ |
373 |
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz" |
374 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
375 |
+ |
376 |
+SLOT="0/21" |
377 |
+IUSE="ldap libressl static-libs" |
378 |
+ |
379 |
+RDEPEND=" |
380 |
+ >=app-arch/lz4-0_p131:= |
381 |
+ sys-libs/zlib:=[${MULTILIB_USEDEP}] |
382 |
+ ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] ) |
383 |
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) |
384 |
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) |
385 |
+ " |
386 |
+DEPEND="${RDEPEND}" |
387 |
+ |
388 |
+# Avoid file collisions, #692580 |
389 |
+RDEPEND+=" !<dev-db/mysql-5.6.45-r1" |
390 |
+RDEPEND+=" !=dev-db/mysql-5.7.23*" |
391 |
+RDEPEND+=" !=dev-db/mysql-5.7.24*" |
392 |
+RDEPEND+=" !=dev-db/mysql-5.7.25*" |
393 |
+RDEPEND+=" !=dev-db/mysql-5.7.26-r0" |
394 |
+RDEPEND+=" !=dev-db/mysql-5.7.27-r0" |
395 |
+RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1" |
396 |
+ |
397 |
+DOCS=( README ) |
398 |
+ |
399 |
+S="${WORKDIR}/mysql-${PV}" |
400 |
+ |
401 |
+PATCHES=( |
402 |
+ "${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch |
403 |
+ "${FILESDIR}"/${PN}-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch |
404 |
+ "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch |
405 |
+ "${FILESDIR}"/${PN}-8.0.19-libressl.patch |
406 |
+) |
407 |
+ |
408 |
+src_prepare() { |
409 |
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die |
410 |
+ |
411 |
+ # All these are for the server only. |
412 |
+ # Disable rpm call which would trigger sandbox, #692368 |
413 |
+ sed -i \ |
414 |
+ -e '/MYSQL_CHECK_LIBEVENT/d' \ |
415 |
+ -e '/MYSQL_CHECK_RAPIDJSON/d' \ |
416 |
+ -e '/MYSQL_CHECK_ICU/d' \ |
417 |
+ -e '/MYSQL_CHECK_EDITLINE/d' \ |
418 |
+ -e '/MYSQL_CHECK_CURL/d' \ |
419 |
+ -e '/ADD_SUBDIRECTORY(man)/d' \ |
420 |
+ -e '/ADD_SUBDIRECTORY(share)/d' \ |
421 |
+ -e '/INCLUDE(cmake\/boost/d' \ |
422 |
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \ |
423 |
+ CMakeLists.txt || die |
424 |
+ |
425 |
+ # Skip building clients |
426 |
+ echo > client/CMakeLists.txt || die |
427 |
+ |
428 |
+ # Forcefully disable auth plugin |
429 |
+ if ! use ldap ; then |
430 |
+ sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die |
431 |
+ echo > libmysql/authentication_ldap/CMakeLists.txt || die |
432 |
+ fi |
433 |
+ |
434 |
+ cmake-utils_src_prepare |
435 |
+} |
436 |
+ |
437 |
+multilib_src_configure() { |
438 |
+ local mycmakeargs=( |
439 |
+ -DINSTALL_LAYOUT=RPM |
440 |
+ -DINSTALL_LIBDIR=$(get_libdir) |
441 |
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF |
442 |
+ -DWITH_DEFAULT_FEATURE_SET=OFF |
443 |
+ -DENABLED_LOCAL_INFILE=ON |
444 |
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock" |
445 |
+ -DWITH_ZLIB=system |
446 |
+ -DWITH_SSL=system |
447 |
+ -DWITH_NUMA=OFF |
448 |
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient |
449 |
+ -DSHARED_LIB_PATCH_VERSION="0" |
450 |
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON |
451 |
+ -DWITHOUT_SERVER=ON |
452 |
+ ) |
453 |
+ cmake-utils_src_configure |
454 |
+} |
455 |
+ |
456 |
+multilib_src_install() { |
457 |
+ cmake-utils_src_install |
458 |
+} |
459 |
+ |
460 |
+multilib_src_install_all() { |
461 |
+ doman \ |
462 |
+ man/my_print_defaults.1 \ |
463 |
+ man/perror.1 \ |
464 |
+ man/zlib_decompress.1 |
465 |
+ |
466 |
+ if ! use static-libs ; then |
467 |
+ find "${ED}" -name "*.a" -delete || die |
468 |
+ fi |
469 |
+} |