[Libreoffice-commits] core.git: connectivity/Library_mysqlc.mk external/mariadb-connector-c

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 6 16:01:21 UTC 2020


 connectivity/Library_mysqlc.mk                                      |    1 
 external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk   |   12 +++++++---
 external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk |   10 ++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 8c9b8c5970a08c2ef0ccddb7a691f3731d39175a
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu Nov 5 18:22:08 2020 +0100
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Fri Nov 6 17:00:44 2020 +0100

    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
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

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 e3a8d0fc69e7..dc1164a8a3a8 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,\
@@ -68,7 +71,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..a4b35c5e650a 100644
--- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
@@ -32,8 +32,14 @@ $(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)/' \
+		-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  \
 ))
 


More information about the Libreoffice-commits mailing list