[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - mysqlc/Library_mysqlc.mk mysqlc/Module_mysqlc.mk mysqlc/source Repository.mk RepositoryModule_host.mk

Miklos Vajna vmiklos at collabora.co.uk
Fri Jun 1 10:23:47 UTC 2018


 Repository.mk            |    2 +-
 RepositoryModule_host.mk |    2 +-
 mysqlc/Library_mysqlc.mk |    6 ++++++
 mysqlc/Module_mysqlc.mk  |    4 ++++
 mysqlc/source/dummy.cxx  |   20 ++++++++++++++++++++
 5 files changed, 32 insertions(+), 2 deletions(-)

New commits:
commit f75ea45883e9cf858b6bc859479a300e9219534b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Jun 1 09:18:20 2018 +0200

    mysqlc: add dummy library in the non-extension case
    
    To be replaced with a real library once we no longer depend on
    mysql-connector-cpp.
    
    Change-Id: I8aab8c7e33b7b27c0a8faef875fbc6938e1845c7
    Reviewed-on: https://gerrit.libreoffice.org/55161
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/Repository.mk b/Repository.mk
index 9dd0fc1c581b..19440f9e227c 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -391,6 +391,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 	mtfrenderer \
 	$(call gb_Helper_optional,DBCONNECTIVITY,mysql) \
 	odbc \
+	mysqlc \
 	odfflatxml \
 	offacc \
 	oox \
@@ -707,7 +708,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,UNOVERLIBS,ure, \
 
 $(eval $(call gb_Helper_register_libraries,EXTENSIONLIBS, \
 	active_native \
-	mysqlc \
 	passive_native \
 ))
 
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 3b530286114e..e415cc992505 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -81,7 +81,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	linguistic \
 	lotuswordpro \
 	$(call gb_Helper_optional,DESKTOP,l10ntools) \
-	$(call gb_Helper_optional,MARIADBC,mysqlc) \
+	mysqlc \
 	$(call gb_Helper_optional,NLPSOLVER,nlpsolver) \
 	o3tl \
 	$(call gb_Helper_optional,ODK,odk) \
diff --git a/mysqlc/Library_mysqlc.mk b/mysqlc/Library_mysqlc.mk
index 8eb207d4bd9e..6cb47081748e 100644
--- a/mysqlc/Library_mysqlc.mk
+++ b/mysqlc/Library_mysqlc.mk
@@ -9,6 +9,7 @@
 
 $(eval $(call gb_Library_Library,mysqlc))
 
+ifeq ($(ENABLE_MARIADBC),TRUE)
 $(eval $(call gb_Library_use_externals,mysqlc,\
 	boost_headers \
 	mysql-connector-cpp \
@@ -57,5 +58,10 @@ $(eval $(call gb_Library_add_exception_objects,mysqlc,\
 $(eval $(call gb_Library_set_componentfile,mysqlc,mysqlc/source/mysqlc))
 
 $(eval $(call gb_Library_set_external_code,mysqlc))
+else
+$(eval $(call gb_Library_add_exception_objects,mysqlc,\
+	mysqlc/source/dummy \
+))
+endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/mysqlc/Module_mysqlc.mk b/mysqlc/Module_mysqlc.mk
index 8274b0dc02e8..2577df5ffcdf 100644
--- a/mysqlc/Module_mysqlc.mk
+++ b/mysqlc/Module_mysqlc.mk
@@ -18,6 +18,10 @@ $(eval $(call gb_Module_add_targets,mysqlc,\
 	Extension_mysql-connector-ooo \
 ))
 
+else
+$(eval $(call gb_Module_add_targets,mysqlc,\
+	Library_mysqlc \
+))
 endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/mysqlc/source/dummy.cxx b/mysqlc/source/dummy.cxx
new file mode 100644
index 000000000000..05d4cc35b69e
--- /dev/null
+++ b/mysqlc/source/dummy.cxx
@@ -0,0 +1,20 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/types.h>
+
+using namespace com::sun::star;
+
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
+    const sal_Char* /*pImplementationName*/, void* /*pServiceManager*/, void* /*pRegistryKey*/)
+{
+    return nullptr;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list