aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-11-05 18:22:08 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2020-12-03 12:59:22 +0100
commit309c93686644d880c2d434e89049ded8cff033f9 (patch)
tree5423642eb3202840c5dd9ba9c301e2f90c95bca0
parent1cbc30c8194b5bef5e974e351b7b04ab5456496a (diff)
tdf#135202: Mysql use openssl libs to be able to use caching_sha2_pw
Change-Id: I7552b65022b725c6e87fef61478dc6e9c4322559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105376 (cherry picked from commit 8c9b8c5970a08c2ef0ccddb7a691f3731d39175a) mariadb-connector-c: fix makefile for GNU make 3.82 Old make thinks that ; terminates the recipe, have to escape it. (other changes are just cosmetic) (regression from 8c9b8c5970a08c2ef0ccddb7a691f3731d39175a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105516 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit ed564a411beb13a75a8f06d7cd040acad3e93dcb) Change-Id: Ifd86ef3f17257139a078d23cb5471b9599ab6556 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105359 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 482e5f8c2d2979b5d6c3b58194b8e37e7df7480e)
-rw-r--r--connectivity/Library_mysqlc.mk1
-rw-r--r--external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk12
-rw-r--r--external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk12
3 files changed, 19 insertions, 6 deletions
diff --git a/connectivity/Library_mysqlc.mk b/connectivity/Library_mysqlc.mk
index 0999b46d3eec..f765fb1e305f 100644
--- a/connectivity/Library_mysqlc.mk
+++ b/connectivity/Library_mysqlc.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Library_Library,mysqlc))
$(eval $(call gb_Library_use_externals,mysqlc,\
boost_headers \
mariadb-connector-c \
+ openssl \
))
$(eval $(call gb_Library_set_include,mysqlc,\
diff --git a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
index 86d127c2af62..768a43794432 100644
--- a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
@@ -21,8 +21,8 @@ $(eval $(call gb_StaticLibrary_set_include,mariadb-connector-c,\
# This is needed for MSVC 2008: it somehow finds a dlopen somewhere
# but the static library then contains unreferenced symbols.
# This macro enables a re-definition to native Win32 APIs in my_global.h.
-## TODO missing enable: -DHAVE_OPENSSL -D HAVE_COMPRESS
-## (but then need to add "-lssl -lcrypto -lz" to mysqlcppconn linking)
+## TODO missing enable: -D HAVE_COMPRESS
+## (but then need to add "-lz" to mysqlcppconn linking)
$(eval $(call gb_StaticLibrary_add_cflags,mariadb-connector-c,-DHAVE_DLOPEN -D ENABLED_LOCAL_INFILE -D LIBMARIADB -D THREAD -DSQLITE_ENABLE_COLUMN_METADATA=1))
ifeq ($(OS),WNT)
@@ -31,6 +31,9 @@ $(eval $(call gb_StaticLibrary_set_include,mariadb-connector-c,\
$$(INCLUDE) \
-I$(call gb_UnpackedTarball_get_dir,mariadb-connector-c)/win-iconv \
))
+else
+$(eval $(call gb_StaticLibrary_use_external,mariadb-connector-c,openssl_headers))
+$(eval $(call gb_StaticLibrary_add_cflags,mariadb-connector-c,-DHAVE_OPENSSL))
endif
$(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
@@ -69,7 +72,10 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
$(if $(filter $(OS),WNT), \
UnpackedTarball/mariadb-connector-c/libmariadb/win32_errmsg \
UnpackedTarball/mariadb-connector-c/libmariadb/secure/win_crypt \
- UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv) \
+ UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv \
+ , \
+ UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt \
+ ) \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
index 3d8ca9295131..2f679294f7c6 100644
--- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
@@ -32,9 +32,15 @@ $(eval $(call gb_UnpackedTarball_add_patches,mariadb-connector-c,\
# TODO are any "plugins" needed?
$(eval $(call gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
< libmariadb/ma_client_plugin.c.in sed \
- -e 's/@EXTERNAL_PLUGINS@/extern struct st_mysql_client_plugin pvio_socket_client_plugin;/' \
- -e 's/@BUILTIN_PLUGINS@/(struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA)/' \
- > libmariadb/ma_client_plugin.c \
+ -e 's/@EXTERNAL_PLUGINS@/ \
+ extern struct st_mysql_client_plugin pvio_socket_client_plugin\; \
+ extern struct st_mysql_client_plugin caching_sha2_password_client_plugin\; \
+ /' \
+ -e 's/@BUILTIN_PLUGINS@/ \
+ (struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA) \
+ (struct st_mysql_client_plugin *)\&caching_sha2_password_client_plugin$(COMMA) \
+ /' \
+ > libmariadb/ma_client_plugin.c \
))