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/files/, dev-db/mysql-connector-c/
Date: Tue, 22 Jun 2021 23:49:35
Message-Id: 1624405481.c13941a25b42ec73772e396915b96294a51fd778.whissi@gentoo
1 commit: c13941a25b42ec73772e396915b96294a51fd778
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 22 23:44:33 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 22 23:44:41 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c13941a2
7
8 dev-db/mysql-connector-c: add OpenSSL 3.0.0 support
9
10 Closes: https://bugs.gentoo.org/797331
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 ...nector-c-8.0.25-add-OpenSSL-3.0.0-support.patch | 294 +++++++++++++++++++++
15 .../mysql-connector-c-8.0.25-r1.ebuild | 122 +++++++++
16 2 files changed, 416 insertions(+)
17
18 diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch
19 new file mode 100644
20 index 00000000000..f566e0fba5b
21 --- /dev/null
22 +++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.25-add-OpenSSL-3.0.0-support.patch
23 @@ -0,0 +1,294 @@
24 +From 3bf91fabf641f3f5114bf3893de40a31aae36e13 Mon Sep 17 00:00:00 2001
25 +From: Thomas Deutschmann <whissi@g.o>
26 +Date: Tue, 22 Jun 2021 23:56:54 +0200
27 +Subject: [PATCH 5/5] Add OpenSSL 3.0.0 support
28 +
29 +Signed-off-by: Thomas Deutschmann <whissi@g.o>
30 +---
31 + cmake/ssl.cmake | 59 +++++++++++++------
32 + mysys/my_md5.cc | 2 +
33 + .../bindings/xcom/xcom/xcom_ssl_transport.cc | 4 ++
34 + plugin/x/client/xconnection_impl.cc | 4 ++
35 + sql-common/client.cc | 2 +
36 + sql/mysqld.cc | 2 +
37 + sql/sys_vars.cc | 18 +++++-
38 + vio/viosslfactories.cc | 2 +
39 + 8 files changed, 74 insertions(+), 19 deletions(-)
40 +
41 +diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
42 +index 18c95dfac..dd2f7e657 100644
43 +--- a/cmake/ssl.cmake
44 ++++ b/cmake/ssl.cmake
45 +@@ -201,34 +201,59 @@ MACRO (MYSQL_CHECK_SSL)
46 + NAMES crypto libcrypto libeay32
47 + HINTS ${OPENSSL_ROOT_DIR}/lib)
48 +
49 +- IF(OPENSSL_INCLUDE_DIR)
50 ++ IF(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
51 + # Verify version number. Version information looks like:
52 + # #define OPENSSL_VERSION_NUMBER 0x1000103fL
53 + # Encoded as MNNFFPPS: major minor fix patch status
54 + FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
55 + OPENSSL_VERSION_NUMBER
56 +- REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
57 +- )
58 +- STRING(REGEX REPLACE
59 +- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
60 +- OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
61 +- )
62 +- STRING(REGEX REPLACE
63 +- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
64 +- OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
65 +- )
66 +- STRING(REGEX REPLACE
67 +- "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
68 +- OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
69 ++ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
70 + )
71 ++
72 ++ IF(OPENSSL_VERSION_NUMBER)
73 ++ STRING(REGEX REPLACE
74 ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
75 ++ OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
76 ++ )
77 ++ STRING(REGEX REPLACE
78 ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
79 ++ OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
80 ++ )
81 ++ STRING(REGEX REPLACE
82 ++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
83 ++ OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
84 ++ )
85 ++ ELSE()
86 ++ FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
87 ++ OPENSSL_VERSION_STR
88 ++ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*"
89 ++ )
90 ++
91 ++ STRING(REGEX REPLACE
92 ++ "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+)\\.[0-9]+\\.[0-9]+\".*$" "\\1"
93 ++ OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_STR}"
94 ++ )
95 ++ STRING(REGEX REPLACE
96 ++ "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.([0-9]+)\\.[0-9]+\".*$" "\\1"
97 ++ OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_STR}"
98 ++ )
99 ++ STRING(REGEX REPLACE
100 ++ "^.*OPENSSL_VERSION_STR[\t ]+\"[0-9]+\\.[0-9]+\\.([0-9]+)\".*$" "\\1"
101 ++ OPENSSL_FIX_VERSION "${OPENSSL_VERSION_STR}"
102 ++ )
103 ++ ENDIF()
104 + ENDIF()
105 +- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
106 ++
107 ++ INCLUDE(CheckSymbolExists)
108 ++
109 ++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
110 ++ IF(HAVE_TLS1_3_VERSION)
111 + ADD_DEFINITIONS(-DHAVE_TLSv13)
112 + ENDIF()
113 + IF(OPENSSL_INCLUDE_DIR AND
114 + OPENSSL_LIBRARY AND
115 + CRYPTO_LIBRARY AND
116 +- OPENSSL_MAJOR_VERSION STREQUAL "1"
117 ++ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
118 + )
119 + SET(OPENSSL_FOUND TRUE)
120 + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
121 +@@ -292,8 +317,6 @@ MACRO (MYSQL_CHECK_SSL)
122 + MESSAGE(STATUS "OPENSSL_MINOR_VERSION = ${OPENSSL_MINOR_VERSION}")
123 + MESSAGE(STATUS "OPENSSL_FIX_VERSION = ${OPENSSL_FIX_VERSION}")
124 +
125 +- INCLUDE(CheckSymbolExists)
126 +-
127 + CMAKE_PUSH_CHECK_STATE()
128 + SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
129 + CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
130 +diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
131 +index 86203619f..37ed3c8b2 100644
132 +--- a/mysys/my_md5.cc
133 ++++ b/mysys/my_md5.cc
134 +@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
135 + int compute_md5_hash(char *digest, const char *buf, int len) {
136 + int retval = 0;
137 + int fips_mode = 0;
138 ++#if defined(OPENSSL_FIPS)
139 + fips_mode = FIPS_mode();
140 ++#endif
141 + /* If fips mode is ON/STRICT restricted method calls will result into abort,
142 + * skipping call. */
143 + if (fips_mode == 0) {
144 +diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
145 +index 4ed9f9ac9..895443166 100644
146 +--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
147 ++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
148 +@@ -325,6 +325,7 @@ error:
149 + return 1;
150 + }
151 +
152 ++#if defined(OPENSSL_FIPS)
153 + #define OPENSSL_ERROR_LENGTH 512
154 + static int configure_ssl_fips_mode(const uint fips_mode) {
155 + int rc = -1;
156 +@@ -348,6 +349,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
157 + EXIT:
158 + return rc;
159 + }
160 ++#endif
161 +
162 + static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
163 + const char *ca_path) {
164 +@@ -544,10 +546,12 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file,
165 + int verify_server = SSL_VERIFY_NONE;
166 + int verify_client = SSL_VERIFY_NONE;
167 +
168 ++#if defined(OPENSSL_FIPS)
169 + if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
170 + G_ERROR("Error setting the ssl fips mode");
171 + goto error;
172 + }
173 ++#endif
174 +
175 + SSL_library_init();
176 + SSL_load_error_strings();
177 +diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
178 +index c1686c6d5..3ae34fdfd 100644
179 +--- a/plugin/x/client/xconnection_impl.cc
180 ++++ b/plugin/x/client/xconnection_impl.cc
181 +@@ -617,6 +617,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
182 + return XError(CR_SSL_CONNECTION_ERROR, buffer);
183 + }
184 +
185 ++#if defined(OPENSSL_FIPS)
186 + /**
187 + Set fips mode in openssl library,
188 + When we set fips mode ON/STRICT, it will perform following operations:
189 +@@ -656,6 +657,7 @@ int set_fips_mode(const uint32_t fips_mode,
190 + EXIT:
191 + return rc;
192 + }
193 ++#endif
194 +
195 + XError Connection_impl::activate_tls() {
196 + if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
197 +@@ -666,12 +668,14 @@ XError Connection_impl::activate_tls() {
198 + if (!m_context->m_ssl_config.is_configured())
199 + return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
200 +
201 ++#if defined(OPENSSL_FIPS)
202 + char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
203 + if (set_fips_mode(
204 + static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
205 + err_string) != 1) {
206 + return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
207 + }
208 ++#endif
209 + auto ssl_ctx_flags = process_tls_version(
210 + details::null_when_empty(m_context->m_ssl_config.m_tls_version));
211 +
212 +diff --git a/sql-common/client.cc b/sql-common/client.cc
213 +index 1316d54a7..554970378 100644
214 +--- a/sql-common/client.cc
215 ++++ b/sql-common/client.cc
216 +@@ -8019,6 +8019,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
217 + return 1;
218 + break;
219 + case MYSQL_OPT_SSL_FIPS_MODE: {
220 ++#if defined(OPENSSL_FIPS)
221 + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
222 + ENSURE_EXTENSIONS_PRESENT(&mysql->options);
223 + mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
224 +@@ -8030,6 +8031,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
225 + "Set Fips mode ON/STRICT failed, detail: '%s'.", ssl_err_string);
226 + return 1;
227 + }
228 ++#endif
229 + } break;
230 + case MYSQL_OPT_SSL_MODE:
231 + ENSURE_EXTENSIONS_PRESENT(&mysql->options);
232 +diff --git a/sql/mysqld.cc b/sql/mysqld.cc
233 +index 83643f76a..dfdc23ab7 100644
234 +--- a/sql/mysqld.cc
235 ++++ b/sql/mysqld.cc
236 +@@ -5134,12 +5134,14 @@ static void init_ssl() {
237 + }
238 +
239 + static int init_ssl_communication() {
240 ++#if defined(OPENSSL_FIPS)
241 + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
242 + int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
243 + if (ret_fips_mode != 1) {
244 + LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
245 + return 1;
246 + }
247 ++#endif
248 + if (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
249 + &server_main_callback, opt_initialize))
250 + return 1;
251 +diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
252 +index 3b8473bd1..c22c38305 100644
253 +--- a/sql/sys_vars.cc
254 ++++ b/sql/sys_vars.cc
255 +@@ -4614,6 +4614,7 @@ static Sys_var_ulong Sys_max_execution_time(
256 + HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
257 + VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
258 +
259 ++#if defined(OPENSSL_FIPS)
260 + static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
261 + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
262 + if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) {
263 +@@ -4624,15 +4625,30 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
264 + return false;
265 + }
266 + }
267 ++#endif
268 +
269 ++#if defined(OPENSSL_FIPS)
270 + static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
271 ++#else
272 ++static const char *ssl_fips_mode_names[] = {"OFF", 0};
273 ++#endif
274 + static Sys_var_enum Sys_ssl_fips_mode(
275 + "ssl_fips_mode",
276 + "SSL FIPS mode (applies only for OpenSSL); "
277 ++#if defined(OPENSSL_FIPS)
278 + "permitted values are: OFF, ON, STRICT",
279 ++#else
280 ++ "permitted values are: OFF",
281 ++#endif
282 + GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
283 + ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
284 +- ON_CHECK(nullptr), ON_UPDATE(update_fips_mode), nullptr);
285 ++ ON_CHECK(NULL),
286 ++#if defined(OPENSSL_FIPS)
287 ++ ON_UPDATE(update_fips_mode),
288 ++#else
289 ++ ON_UPDATE(NULL),
290 ++#endif
291 ++ NULL);
292 +
293 + static Sys_var_bool Sys_auto_generate_certs(
294 + "auto_generate_certs",
295 +diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
296 +index c25117bd0..11b466bcf 100644
297 +--- a/vio/viosslfactories.cc
298 ++++ b/vio/viosslfactories.cc
299 +@@ -472,6 +472,7 @@ void ssl_start() {
300 + }
301 + }
302 +
303 ++#if defined(OPENSSL_FIPS)
304 + /**
305 + Set fips mode in openssl library,
306 + When we set fips mode ON/STRICT, it will perform following operations:
307 +@@ -525,6 +526,7 @@ EXIT:
308 + @returns openssl current fips mode
309 + */
310 + uint get_fips_mode() { return FIPS_mode(); }
311 ++#endif
312 +
313 + long process_tls_version(const char *tls_version) {
314 + const char *separator = ",";
315 +--
316 +2.32.0
317 +
318
319 diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild
320 new file mode 100644
321 index 00000000000..1c00a985792
322 --- /dev/null
323 +++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25-r1.ebuild
324 @@ -0,0 +1,122 @@
325 +# Copyright 1999-2021 Gentoo Authors
326 +# Distributed under the terms of the GNU General Public License v2
327 +
328 +EAPI=7
329 +
330 +CMAKE_ECLASS=cmake
331 +inherit cmake-multilib flag-o-matic
332 +
333 +# wrap the config script
334 +MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
335 +
336 +DESCRIPTION="C client library for MariaDB/MySQL"
337 +HOMEPAGE="https://dev.mysql.com/downloads/"
338 +
339 +if [[ ${PV} == "9999" ]]; then
340 + EGIT_REPO_URI="https://github.com/mysql/mysql-server.git"
341 +
342 + inherit git-r3
343 +else
344 + SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
345 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
346 +
347 + S="${WORKDIR}/mysql-${PV}"
348 +fi
349 +
350 +LICENSE="GPL-2"
351 +SLOT="0/21"
352 +IUSE="ldap static-libs"
353 +
354 +RDEPEND="
355 + >=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
356 + app-arch/zstd:=[${MULTILIB_USEDEP}]
357 + sys-libs/zlib:=[${MULTILIB_USEDEP}]
358 + ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
359 + dev-libs/openssl:0=[${MULTILIB_USEDEP}]
360 +"
361 +DEPEND="${RDEPEND}"
362 +
363 +# Avoid file collisions, #692580
364 +RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
365 +RDEPEND+=" !=dev-db/mysql-5.7.23*"
366 +RDEPEND+=" !=dev-db/mysql-5.7.24*"
367 +RDEPEND+=" !=dev-db/mysql-5.7.25*"
368 +RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
369 +RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
370 +RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
371 +
372 +DOCS=( README )
373 +
374 +PATCHES=(
375 + "${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
376 + "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
377 + "${FILESDIR}"/${PN}-8.0.25-add-OpenSSL-3.0.0-support.patch
378 +)
379 +
380 +src_prepare() {
381 + sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "scripts/CMakeLists.txt" || die
382 +
383 + # All these are for the server only.
384 + # Disable rpm call which would trigger sandbox, #692368
385 + sed -i \
386 + -e '/MYSQL_CHECK_LIBEVENT/d' \
387 + -e '/MYSQL_CHECK_RAPIDJSON/d' \
388 + -e '/MYSQL_CHECK_ICU/d' \
389 + -e '/MYSQL_CHECK_EDITLINE/d' \
390 + -e '/MYSQL_CHECK_CURL/d' \
391 + -e '/ADD_SUBDIRECTORY(man)/d' \
392 + -e '/ADD_SUBDIRECTORY(share)/d' \
393 + -e '/INCLUDE(cmake\/boost/d' \
394 + -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
395 + CMakeLists.txt || die
396 +
397 + # Skip building clients
398 + echo > client/CMakeLists.txt || die
399 +
400 + # Forcefully disable auth plugin
401 + if ! use ldap ; then
402 + sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
403 + echo > libmysql/authentication_ldap/CMakeLists.txt || die
404 + fi
405 +
406 + cmake_src_prepare
407 +}
408 +
409 +multilib_src_configure() {
410 + CMAKE_BUILD_TYPE="RelWithDebInfo"
411 +
412 + # code is not C++17 ready, bug #786402
413 + append-cxxflags -std=c++14
414 +
415 + local mycmakeargs=(
416 + -DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
417 + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
418 + -DINSTALL_LAYOUT=RPM
419 + -DINSTALL_LIBDIR=$(get_libdir)
420 + -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
421 + -DENABLED_LOCAL_INFILE=ON
422 + -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
423 + -DWITH_LZ4=system
424 + -DWITH_NUMA=OFF
425 + -DWITH_SSL=system
426 + -DWITH_ZLIB=system
427 + -DWITH_ZSTD=system
428 + -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
429 + -DSHARED_LIB_PATCH_VERSION="0"
430 + -DCMAKE_POSITION_INDEPENDENT_CODE=ON
431 + -DWITHOUT_SERVER=ON
432 + )
433 +
434 + cmake_src_configure
435 +}
436 +
437 +multilib_src_install_all() {
438 + doman \
439 + man/my_print_defaults.1 \
440 + man/perror.1 \
441 + man/zlib_decompress.1
442 +
443 + if ! use static-libs ; then
444 + find "${ED}" -name "*.a" -delete || die
445 + fi
446 +}