Change in core[master]: convert mysqlcppconn to gbuild and add to tail_build

Peter Foley (via Code Review) gerrit at gerrit.libreoffice.org
Mon Jan 28 08:44:36 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1900

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/00/1900/1

convert mysqlcppconn to gbuild and add to tail_build

Change-Id: I33a9ff3393b90c5b9f7d7fa85e8761c02160664f
---
M Module_tail_build.mk
M RepositoryExternal.mk
M RepositoryModule_ooo.mk
M configure.ac
A mysqlcppconn/Makefile
A mysqlcppconn/Module_mysqlcppconn.mk
A mysqlcppconn/StaticLibrary_mysqlcppconn.mk
A mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
A mysqlcppconn/binding_dynamic.h
A mysqlcppconn/binding_static.h
A mysqlcppconn/config.h
D mysqlcppconn/cppconn_config.pmk
D mysqlcppconn/makefile.mk
D mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-static.patch
D mysqlcppconn/mysql-connector-c++-1.1.0.patch
D mysqlcppconn/mysql_config.pmk
R mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
A mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch
M mysqlcppconn/prj/d.lst
D mysqlcppconn/prj/dmake
20 files changed, 328 insertions(+), 445 deletions(-)



diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 85adfab..b9e8356 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -123,6 +123,7 @@
 	$(call gb_Helper_optional,MDDS,mdds) \
 	Mesa \
 	$(call gb_Helper_optional,MORE_FONTS,more_fonts) \
+	$(call gb_Helper_optional,MYSQLCPPCONN,mysqlcppconn) \
 	$(call gb_Helper_optional,MYTHES,mythes) \
 	$(call gb_Helper_optional,NEON,neon) \
 	$(call gb_Helper_optional,NLPSOLVER,nlpsolver) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 5bd9442..9559f8e 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -183,6 +183,70 @@
 
 endef
 
+ifeq ($(SYSTEM_MYSQL),YES)
+
+define gb_LinkTarget__use_mysql
+
+$(call gb_LinkTarget_add_defs,$(1),\
+	-DSYSTEM_MYSQL \
+)
+
+$(call gb_LinkTarget_add_libs,$(1),\
+	$(MYSQL_LIB) \
+)
+
+$(call gb_LinkTarget_set_include,$(1),\
+	$(MYSQL_INC) \
+	$$(INCLUDE) \
+)
+endef
+
+else
+
+define gb_LinkTarget__use_mysql
+
+$(call gb_LinkTarget_set_include,$(1),\
+	-I$(LIBMYSQL_PATH)/include \
+	$$(INCLUDE) \
+)
+
+endef
+
+endif
+
+ifeq ($(SYSTEM_MYSQL_CPPCONN),YES)
+
+define gb_LinkTarget__use_mysqlcppconn
+$(call gb_LinkTarget_add_libs,$(1),\
+	-lmysqlcppconn \
+)
+
+$(call gb_LinkTarget_add_defs,$(1),\
+	-DSYSTEM_MYSQL_CPPCONN` \
+)
+endef
+
+else
+
+$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
+	mysqlcppconn \
+))
+
+define gb_LinkTarget__use_mysqlcppconn
+
+$(call gb_LinkTarget_use_libraries,$(1),\
+	mysqlcppconn \
+)
+$(call gb_LinkTarget_set_include,$(1),\
+	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
+	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
+	$$(INCLUDE) \
+)
+
+endef
+
+endif
+
 ifeq ($(SYSTEM_ZLIB),YES)
 
 define gb_LinkTarget__use_zlib
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 002993e..6681e49 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -131,6 +131,7 @@
 	$(call gb_Helper_optional,MDDS,mdds) \
 	Mesa \
 	$(call gb_Helper_optional,MORE_FONTS,more_fonts) \
+	$(call gb_Helper_optional,MYSQLCPPCONN,mysqlcppconn) \
 	$(call gb_Helper_optional,MYTHES,mythes) \
 	$(call gb_Helper_optional,NEON,neon) \
 	$(call gb_Helper_optional,NLPSOLVER,nlpsolver) \
diff --git a/configure.ac b/configure.ac
index 7a29b48..ed776a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7804,7 +7804,8 @@
             AC_MSG_CHECKING([for $LIBMYSQL])
             if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then
                 AC_MSG_RESULT([found.])
-                LIBMYSQL_PATH=$with_libmysql_path
+                PathFormat "$with_libmysql_path"
+                LIBMYSQL_PATH="$formatted_path"
             else
                 AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.])
             fi
diff --git a/mysqlcppconn/Makefile b/mysqlcppconn/Makefile
new file mode 100644
index 0000000..ccb1c85
--- /dev/null
+++ b/mysqlcppconn/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlcppconn/Module_mysqlcppconn.mk b/mysqlcppconn/Module_mysqlcppconn.mk
new file mode 100644
index 0000000..ac81723
--- /dev/null
+++ b/mysqlcppconn/Module_mysqlcppconn.mk
@@ -0,0 +1,21 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_Module_Module,mysqlcppconn))
+
+ifeq ($(SYSTEM_MYSQL_CPPCONN),NO)
+
+$(eval $(call gb_Module_add_targets,mysqlcppconn,\
+	UnpackedTarball_mysqlcppconn \
+	StaticLibrary_mysqlcppconn \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlcppconn/StaticLibrary_mysqlcppconn.mk b/mysqlcppconn/StaticLibrary_mysqlcppconn.mk
new file mode 100644
index 0000000..fbe18bd
--- /dev/null
+++ b/mysqlcppconn/StaticLibrary_mysqlcppconn.mk
@@ -0,0 +1,62 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,mysqlcppconn))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,mysqlcppconn,mysqlcppconn))
+
+$(eval $(call gb_StaticLibrary_use_externals,mysqlcppconn, \
+	mysql \
+	boost_headers \
+))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,mysqlcppconn))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,mysqlcppconn,cpp))
+
+$(eval $(call gb_StaticLibrary_set_include,mysqlcppconn,\
+	$$(INCLUDE) \
+	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
+	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,mysqlcppconn,\
+	-DCPPCONN_LIB_BUILD \
+	$(if $(filter WNT,$(OS)),\
+	-DCPPDBC_WIN32 \
+	-D_CRT_SECURE_NO_WARNINGS \
+	-D_SCL_SECURE_NO_WARNINGS ) \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,mysqlcppconn,\
+	UnpackedTarball/mysqlcppconn/driver/mysql_art_resultset \
+	UnpackedTarball/mysqlcppconn/driver/mysql_art_rset_metadata \
+	UnpackedTarball/mysqlcppconn/driver/mysql_connection \
+	UnpackedTarball/mysqlcppconn/driver/mysql_debug \
+	UnpackedTarball/mysqlcppconn/driver/mysql_driver \
+	UnpackedTarball/mysqlcppconn/driver/mysql_metadata \
+	UnpackedTarball/mysqlcppconn/driver/mysql_parameter_metadata \
+	UnpackedTarball/mysqlcppconn/driver/mysql_prepared_statement \
+	UnpackedTarball/mysqlcppconn/driver/mysql_ps_resultset \
+	UnpackedTarball/mysqlcppconn/driver/mysql_ps_resultset_metadata \
+	UnpackedTarball/mysqlcppconn/driver/mysql_resultbind \
+	UnpackedTarball/mysqlcppconn/driver/mysql_resultset \
+	UnpackedTarball/mysqlcppconn/driver/mysql_resultset_metadata \
+	UnpackedTarball/mysqlcppconn/driver/mysql_statement \
+	UnpackedTarball/mysqlcppconn/driver/mysql_util \
+	UnpackedTarball/mysqlcppconn/driver/mysql_warning \
+	UnpackedTarball/mysqlcppconn/driver/nativeapi/mysql_client_api \
+	UnpackedTarball/mysqlcppconn/driver/nativeapi/library_loader \
+	UnpackedTarball/mysqlcppconn/driver/nativeapi/mysql_native_driver_wrapper \
+	UnpackedTarball/mysqlcppconn/driver/nativeapi/mysql_native_connection_wrapper \
+	UnpackedTarball/mysqlcppconn/driver/nativeapi/mysql_native_resultset_wrapper \
+	UnpackedTarball/mysqlcppconn/driver/nativeapi/mysql_native_statement_wrapper \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk b/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
new file mode 100644
index 0000000..542c384
--- /dev/null
+++ b/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
@@ -0,0 +1,28 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,mysqlcppconn))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,mysqlcppconn,$(MYSQLCPPCONN_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_file,mysqlcppconn,cppconn/config.h,mysqlcppconn/config.h))
+
+ifeq ($(SYSTEM_MYSQL),YES)
+$(eval $(call gb_UnpackedTarball_add_file,mysqlcppconn,driver/nativeapi/binding_config.h,mysqlcppconn/binding_static.h))
+else
+$(eval $(call gb_UnpackedTarball_add_file,mysqlcppconn,driver/nativeapi/binding_config.h,mysqlcppconn/binding_dynamic.h))
+endif
+$(eval $(call gb_UnpackedTarball_add_patches,mysqlcppconn,\
+	mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch \
+	$(if $(filter NO,$(SYSTEM_MYSQL)), \
+	mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch) \
+	mysqlcppconn/patches/default_to_protocol_tcp.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlcppconn/binding_dynamic.h b/mysqlcppconn/binding_dynamic.h
new file mode 100644
index 0000000..1ee8e37
--- /dev/null
+++ b/mysqlcppconn/binding_dynamic.h
@@ -0,0 +1,2 @@
+#define HAVE_DLFCN_H 1
+//#define MYSQLCLIENT_STATIC_BINDING 1
diff --git a/mysqlcppconn/binding_static.h b/mysqlcppconn/binding_static.h
new file mode 100644
index 0000000..85506c6
--- /dev/null
+++ b/mysqlcppconn/binding_static.h
@@ -0,0 +1,2 @@
+#define HAVE_DLFCN_H 1
+#define MYSQLCLIENT_STATIC_BINDING 1
diff --git a/mysqlcppconn/config.h b/mysqlcppconn/config.h
new file mode 100644
index 0000000..7c2d2eb
--- /dev/null
+++ b/mysqlcppconn/config.h
@@ -0,0 +1,34 @@
+#include <sal/types.h>
+
+#define HAVE_FUNCTION_STRTOL 1
+#define HAVE_FUNCTION_STRTOUL 1
+#define HAVE_FUNCTION_STRTOL 1
+#define HAVE_FUNCTION_STRTOULL 1
+
+#if defined(MACOSX) || defined(SOLARIS) || defined(LINUX)
+    #define HAVE_STDINT_H
+    #define HAVE_INTTYPES_H
+#endif
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+#if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && !defined(_MSC_VER)
+
+// if we do not have the standard C99 integer types, then define them based on the respective SAL types
+#if !defined(_SYS_TYPES_H)
+typedef sal_Int8    int8_t;
+typedef sal_Int16   int16_t;
+typedef sal_Int32   int32_t;
+#endif // !defined(_SYS_TYPES_H)
+typedef sal_uInt8   uint8_t;
+typedef sal_uInt16  uint16_t;
+typedef sal_uInt32  uint32_t;
+typedef sal_Int64   int64_t;
+typedef sal_uInt64  uint64_t;
+#endif // !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H)
diff --git a/mysqlcppconn/cppconn_config.pmk b/mysqlcppconn/cppconn_config.pmk
deleted file mode 100644
index b787c96..0000000
--- a/mysqlcppconn/cppconn_config.pmk
+++ /dev/null
@@ -1,33 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-#   OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-#     but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org.  If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJNAME = mysqlcppconn
-ENABLE_EXCEPTIONS = TRUE
-USE_LDUMP2 = TRUE
-EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
-
-CPPCONN_NATIVEAPI = cppconn_nativeapi
diff --git a/mysqlcppconn/makefile.mk b/mysqlcppconn/makefile.mk
deleted file mode 100644
index d7fa8a6..0000000
--- a/mysqlcppconn/makefile.mk
+++ /dev/null
@@ -1,98 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org.  If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=.
-
-PRJNAME=mysqlcppconn
-TARGET=so_mysqlcppconn
-
-EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE :	settings.mk
-
-# --- Files --------------------------------------------------------
-
-TARFILE_NAME=$(EXT_PROJECT_NAME)
-TARFILE_MD5=0981bda6548a8c8233ffce2b6e4b2a23
-ADDITIONAL_FILES=\
-                 driver$/makefile.mk \
-                 driver$/nativeapi$/makefile.mk \
-                 driver$/nativeapi$/binding_config.h \
-                 cppconn$/config.h
-
-CONVERTFILES=\
-                cppconn$/build_config.h
-
-# distro-specific builds want to link against a particular mysql library
-# then they do not require mysql-devel package at runtime
-# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate patch
-# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql library
-.IF "$(SYSTEM_MYSQL)" == "YES"
-MYSQL_BINDING=static
-.ELSE
-MYSQL_BINDING=dynamic
-.ENDIF
-
-PATCH_FILES=\
-    $(TARFILE_NAME).patch \
-    $(TARFILE_NAME)-mysql-binding-$(MYSQL_BINDING).patch \
-    patches/default_to_protocol_tcp.patch
-
-BUILD_DIR=driver
-BUILD_ACTION = \
-            cd nativeapi \
-         && $(MAKE) $(MFLAGS) $(CALLMACROS) \
-         && cd .. \
-         && $(MAKE) $(MFLAGS) $(CALLMACROS)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
-
-# --- post-build ---------------------------------------------------
-
-# "normalize" the output structure, in that the C/C++ headers are
-# copied to the canonic location in OUTPATH
-# The allows, later on, to use the standard mechanisms to deliver those
-# files, instead of delivering them out of OUTPATH/misc/build/..., which
-# could cause problems
-
-NORMALIZE_FLAG_FILE=so_normalized_$(TARGET)
-
-$(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE)
-    @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/driver$/mysql_driver.h $(INCCOM)
-    -@$(MKDIRHIER) $(INCCOM)$/cppconn
-    @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/cppconn$/* $(INCCOM)$/cppconn
-    @$(TOUCH) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
-
-normalize: $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
-
-$(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE) : normalize
diff --git a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-static.patch b/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-static.patch
deleted file mode 100644
index 3501024..0000000
--- a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-static.patch
+++ /dev/null
@@ -1,6 +0,0 @@
---- misc/mysql-connector-c++-1.1.0/driver/nativeapi/binding_config.h	2009-08-14 10:17:23.640625000 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/binding_config.h	2009-08-14 10:13:50.359375000 +0200
-@@ -1 +1,2 @@
--dummy
-+#define HAVE_DLFCN_H 1
-+#define MYSQLCLIENT_STATIC_BINDING 1
diff --git a/mysqlcppconn/mysql-connector-c++-1.1.0.patch b/mysqlcppconn/mysql-connector-c++-1.1.0.patch
deleted file mode 100644
index eb39eb4..0000000
--- a/mysqlcppconn/mysql-connector-c++-1.1.0.patch
+++ /dev/null
@@ -1,237 +0,0 @@
---- misc/mysql-connector-c++-1.1.0/cppconn/build_config.h	2010-09-10 11:47:47.000000000 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/cppconn/build_config.h	2011-11-12 00:45:19.000000000 +0100
-@@ -25,25 +25,23 @@
- #ifndef _SQL_BUILD_CONFIG_H_
- #define _SQL_BUILD_CONFIG_H_
- 
--#ifndef CPPCONN_PUBLIC_FUNC
-+#ifndef _SAL_TYPES_H_
-+#include <sal/types.h>
-+#endif
- 
--#if defined(_WIN32)
-  // mysqlcppconn_EXPORTS is added by cmake and defined for dynamic lib build only
-   #ifdef mysqlcppconn_EXPORTS
--    #define CPPCONN_PUBLIC_FUNC __declspec(dllexport)
-+    #define CPPCONN_PUBLIC_FUNC SAL_DLLPUBLIC_EXPORT
-   #else
-     // this is for static build
-     #ifdef CPPCONN_LIB_BUILD
-       #define CPPCONN_PUBLIC_FUNC
-     #else
-       // this is for clients using dynamic lib
--      #define CPPCONN_PUBLIC_FUNC __declspec(dllimport)
-+      #define CPPCONN_PUBLIC_FUNC SAL_DLLPUBLIC_IMPORT
-     #endif
-   #endif
--#else
--  #define CPPCONN_PUBLIC_FUNC
--#endif
- 
--#endif    //#ifndef CPPCONN_PUBLIC_FUNC
-+  #define CPPCONN_PUBLIC_EXCEPTION SAL_EXCEPTION_DLLPUBLIC_EXPORT
- 
- #endif    //#ifndef _SQL_BUILD_CONFIG_H_
---- misc/mysql-connector-c++-1.1.0/cppconn/config.h	2009-08-14 10:17:38.234375000 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/cppconn/config.h	2009-08-14 09:56:37.000000000 +0200
-@@ -1 +1,34 @@
--dummy
-+#include <sal/types.h>
-+
-+#define HAVE_FUNCTION_STRTOL 1
-+#define HAVE_FUNCTION_STRTOUL 1
-+#define HAVE_FUNCTION_STRTOL 1
-+#define HAVE_FUNCTION_STRTOULL 1
-+
-+#if defined(MACOSX) || defined(SOLARIS) || defined(LINUX)
-+    #define HAVE_STDINT_H
-+    #define HAVE_INTTYPES_H
-+#endif
-+
-+#ifdef HAVE_STDINT_H
-+#include <stdint.h>
-+#endif
-+
-+#ifdef HAVE_INTTYPES_H
-+#include <inttypes.h>
-+#endif
-+
-+#if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) 
-+
-+// if we do not have the standard C99 integer types, then define them based on the respective SAL types
-+#if !defined(_SYS_TYPES_H)
-+typedef sal_Int8    int8_t;
-+typedef sal_Int16   int16_t;
-+typedef sal_Int32   int32_t;
-+#endif // !defined(_SYS_TYPES_H)
-+typedef sal_uInt8   uint8_t;
-+typedef sal_uInt16  uint16_t;
-+typedef sal_uInt32  uint32_t;
-+typedef sal_Int64   int64_t;
-+typedef sal_uInt64  uint64_t;
-+#endif // !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H)
---- misc/mysql-connector-c++-1.1.0/cppconn/exception.h	2009-08-20 17:51:23.000000000 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/cppconn/exception.h	2009-09-11 09:41:41.076379817 +0200
-@@ -37,7 +37,7 @@
- #pragma warning(push)
- #pragma warning(disable: 4275)
- #endif
--class CPPCONN_PUBLIC_FUNC SQLException : public std::runtime_error
-+class CPPCONN_PUBLIC_EXCEPTION SQLException : public std::runtime_error
- {
- #ifdef _WIN32
- #pragma warning(pop)
-@@ -83,26 +83,26 @@
- 	MEMORY_ALLOC_OPERATORS(SQLException)
- };
- 
--struct CPPCONN_PUBLIC_FUNC MethodNotImplementedException : public SQLException
-+struct CPPCONN_PUBLIC_EXCEPTION MethodNotImplementedException : public SQLException
- {
- 	MethodNotImplementedException(const MethodNotImplementedException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
- 	MethodNotImplementedException(const std::string& reason) : SQLException(reason, "", 0) {}
- };
- 
--struct CPPCONN_PUBLIC_FUNC InvalidArgumentException : public SQLException
-+struct CPPCONN_PUBLIC_EXCEPTION InvalidArgumentException : public SQLException
- {
- 	InvalidArgumentException(const InvalidArgumentException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
- 	InvalidArgumentException(const std::string& reason) : SQLException(reason, "", 0) {}
- };
- 
--struct CPPCONN_PUBLIC_FUNC InvalidInstanceException : public SQLException
-+struct CPPCONN_PUBLIC_EXCEPTION InvalidInstanceException : public SQLException
- {
- 	InvalidInstanceException(const InvalidInstanceException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
- 	InvalidInstanceException(const std::string& reason) : SQLException(reason, "", 0) {}
- };
- 
- 
--struct CPPCONN_PUBLIC_FUNC NonScrollableException : public SQLException
-+struct CPPCONN_PUBLIC_EXCEPTION NonScrollableException : public SQLException
- {
- 	NonScrollableException(const NonScrollableException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
- 	NonScrollableException(const std::string& reason) : SQLException(reason, "", 0) {}
---- misc/mysql-connector-c++-1.1.0/driver/makefile.mk	2009-09-11 09:42:34.087202551 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/driver/makefile.mk	2009-09-11 09:42:25.902286382 +0200
-@@ -1,1 +1,64 @@
--dummy
-+PRJ=..$/..$/..$/..$/..
-+
-+.INCLUDE : $(PRJ)$/cppconn_config.pmk
-+
-+PRJINC=..
-+TARGET=$(PRJNAME)
-+
-+# --- Settings -----------------------------------------------------
-+
-+.INCLUDE :  settings.mk
-+
-+.INCLUDE : $(PRJ)$/mysql_config.pmk
-+
-+# --- Files --------------------------------------------------------
-+
-+.IF "$(OS)-$(RTL_ARCH)" == "LINUX-x86"
-+    SHL1NOCHECK=TRUE
-+.ENDIF
-+SHL1TARGET=$(TARGET)
-+
-+LIB1TARGET=$(SLB)$/$(PRJNAME).lib
-+LIB1OBJFILES+= \
-+        $(SLO)$/mysql_art_resultset.obj \
-+        $(SLO)$/mysql_art_rset_metadata.obj \
-+        $(SLO)$/mysql_connection.obj \
-+        $(SLO)$/mysql_debug.obj \
-+        $(SLO)$/mysql_driver.obj \
-+        $(SLO)$/mysql_metadata.obj \
-+        $(SLO)$/mysql_parameter_metadata.obj \
-+        $(SLO)$/mysql_prepared_statement.obj \
-+        $(SLO)$/mysql_ps_resultset.obj \
-+        $(SLO)$/mysql_ps_resultset_metadata.obj \
-+        $(SLO)$/mysql_resultbind.obj \
-+        $(SLO)$/mysql_resultset.obj \
-+        $(SLO)$/mysql_resultset_metadata.obj \
-+        $(SLO)$/mysql_statement.obj \
-+        $(SLO)$/mysql_util.obj \
-+        $(SLO)$/mysql_warning.obj \
-+
-+SHL1STDLIBS=\
-+       $(MYSQL_LIB)
-+
-+SHL1RPATH=OXT
-+SHL1IMPLIB=  i$(TARGET)
-+SHL1LIBS=    $(LIB1TARGET) $(SLB)$/$(CPPCONN_NATIVEAPI).lib
-+SHL1DEF=     $(MISC)$/$(SHL1TARGET).def
-+DEF1NAME=    $(SHL1TARGET)
-+DEF1DEPN=    $(MISC)$/$(SHL1TARGET).flt \
-+              $(LIB1TARGET)
-+DEFLIB1NAME=$(TARGET)
-+
-+# --- Targets ------------------------------------------------------
-+
-+.INCLUDE :  target.mk
-+
-+# --- filter file ------------------------------
-+
-+.IF "$(depend)"==""
-+$(MISC)$/$(SHL1TARGET).flt: makefile.mk
-+    @echo CLEAR_THE_FILE	> $@
-+	@echo _TI				>>$@
-+	@echo _real				>>$@
-+	@echo __CT				>>$@
-+.ENDIF # "$(depend)"==""
---- misc/mysql-connector-c++-1.1.0/driver/mysql_debug.h	2009-08-13 17:13:46.000000000 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/driver/mysql_debug.h	2009-08-14 09:56:37.015625000 +0200
-@@ -25,16 +25,6 @@
- 
- 
- 
--#if defined(WE_HAVE_VARARGS_MACRO_SUPPORT) && (CPPCONN_TRACE_ENABLED || defined(SAL_DLLPRIVATE))
--	#define CPP_ENTER(msg)			const boost::shared_ptr< MySQL_DebugLogger > __l = this->logger;(void)__l;\
--									MySQL_DebugEnterEvent __this_func(__LINE__, __FILE__, msg, this->logger)
--	#define CPP_ENTER_WL(l, msg)	const boost::shared_ptr< MySQL_DebugLogger > __l = (l);(void)__l;\
--									MySQL_DebugEnterEvent __this_func(__LINE__, __FILE__, msg, (l))
--	#define CPP_INFO(msg)		{if (__l) __l->log("INF", msg); }
--	#define CPP_INFO_FMT(...)	{if (__l) __l->log_va("INF", __VA_ARGS__); }
--	#define CPP_ERR(msg)		{if (__l) __l->log("ERR", msg); }
--	#define CPP_ERR_FMT(...)	{if (__l) __l->log_va("ERR", __VA_ARGS__); }
--#else
- 	#define CPP_ENTER(msg)
- 	#define CPP_ENTER_WL(l, msg)
- 	#define CPP_INFO(msg)
-@@ -42,7 +32,6 @@
- 	#define CPP_ENTER_WL(l, msg)
- 	static inline void CPP_INFO_FMT(...) {}
- 	static inline void CPP_ERR_FMT(...) {}
--#endif
- 
- #include <stack>
- #include "mysql_util.h"
---- misc/mysql-connector-c++-1.1.0/driver/nativeapi/makefile.mk	2009-08-17 21:32:53.694119382 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/makefile.mk	2009-08-17 21:32:50.534346360 +0200
-@@ -1 +1,24 @@
--dummy
-+PRJ=..$/..$/..$/..$/..$/..
-+PRJINC=..$/..
-+
-+.INCLUDE : $(PRJ)$/cppconn_config.pmk
-+
-+TARGET=$(CPPCONN_NATIVEAPI)
-+
-+# --- Settings -----------------------------------------------------
-+
-+.INCLUDE :  settings.mk
-+
-+.INCLUDE : $(PRJ)$/mysql_config.pmk
-+
-+LIB1TARGET=$(SLB)$/$(TARGET).lib
-+LIB1OBJFILES+= \
-+        $(SLO)$/mysql_client_api.obj \
-+        $(SLO)$/library_loader.obj \
-+        $(SLO)$/mysql_native_driver_wrapper.obj \
-+        $(SLO)$/mysql_native_connection_wrapper.obj \
-+        $(SLO)$/mysql_native_resultset_wrapper.obj \
-+        $(SLO)$/mysql_native_statement_wrapper.obj \
-+
-+# --- Targets ------------------------------------------------------
-+.INCLUDE :  target.mk
diff --git a/mysqlcppconn/mysql_config.pmk b/mysqlcppconn/mysql_config.pmk
deleted file mode 100644
index 65a866d..0000000
--- a/mysqlcppconn/mysql_config.pmk
+++ /dev/null
@@ -1,49 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-#   OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-#     but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org.  If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-.IF "$(SYSTEM_MYSQL)" == "YES"
-  CFLAGS+=-DSYSTEM_MYSQL
-.ELSE
-  .IF "$(LIBMYSQL_PATH)" == ""
-    alltar:
-      @echo "need to have LIBMYSQL_PATH set to the location where libmysql (also known as 'MySQL Connector/C') is installed"
-      @force_dmake_to_error
-  .ENDIF
-.ENDIF
-
-.IF "$(OS)"=="WNT"
-
-CFLAGS+=-DCPPDBC_WIN32 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
-
-.ENDIF  # "$(OS)"=="WNT"
-
-.IF "$(SYSTEM_MYSQL)" != "YES"
-    MYSQL_INC+=-I$(LIBMYSQL_PATH)$/include
-.ENDIF
-
-CFLAGS+=-I$(PRJINC) -I$(PRJINC)$/cppconn -I$(WORKDIR)/UnpackedTarball/boost $(MYSQL_INC) -DCPPCONN_LIB_BUILD
-
diff --git a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch b/mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
similarity index 64%
rename from mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
rename to mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
index 80a87c8..0644dbb 100644
--- a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
+++ b/mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
@@ -1,9 +1,3 @@
---- misc/mysql-connector-c++-1.1.0/driver/nativeapi/binding_config.h	2009-08-14 10:17:23.640625000 +0200
-+++ misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/binding_config.h	2009-08-14 10:13:50.359375000 +0200
-@@ -1 +1,2 @@
--dummy
-+#define HAVE_DLFCN_H 1
-+//#define MYSQLCLIENT_STATIC_BINDING 1
 --- misc/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h	2010-09-10 11:47:47.000000000 +0200
 +++ misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h	2011-12-08 20:22:29.000000000 +0100
 @@ -107,6 +107,8 @@
diff --git a/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch b/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch
new file mode 100644
index 0000000..722aa92
--- /dev/null
+++ b/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch
@@ -0,0 +1,104 @@
+--- misc/mysql-connector-c++-1.1.0/cppconn/build_config.h	2010-09-10 11:47:47.000000000 +0200
++++ misc/build/mysql-connector-c++-1.1.0/cppconn/build_config.h	2011-11-12 00:45:19.000000000 +0100
+@@ -25,25 +25,23 @@
+ #ifndef _SQL_BUILD_CONFIG_H_
+ #define _SQL_BUILD_CONFIG_H_
+ 
+-#ifndef CPPCONN_PUBLIC_FUNC
++#ifndef _SAL_TYPES_H_
++#include <sal/types.h>
++#endif
+ 
+-#if defined(_WIN32)
+  // mysqlcppconn_EXPORTS is added by cmake and defined for dynamic lib build only
+   #ifdef mysqlcppconn_EXPORTS
+-    #define CPPCONN_PUBLIC_FUNC __declspec(dllexport)
++    #define CPPCONN_PUBLIC_FUNC SAL_DLLPUBLIC_EXPORT
+   #else
+     // this is for static build
+     #ifdef CPPCONN_LIB_BUILD
+       #define CPPCONN_PUBLIC_FUNC
+     #else
+       // this is for clients using dynamic lib
+-      #define CPPCONN_PUBLIC_FUNC __declspec(dllimport)
++      #define CPPCONN_PUBLIC_FUNC SAL_DLLPUBLIC_IMPORT
+     #endif
+   #endif
+-#else
+-  #define CPPCONN_PUBLIC_FUNC
+-#endif
+ 
+-#endif    //#ifndef CPPCONN_PUBLIC_FUNC
++  #define CPPCONN_PUBLIC_EXCEPTION SAL_EXCEPTION_DLLPUBLIC_EXPORT
+ 
+ #endif    //#ifndef _SQL_BUILD_CONFIG_H_
+--- misc/mysql-connector-c++-1.1.0/cppconn/exception.h	2009-08-20 17:51:23.000000000 +0200
++++ misc/build/mysql-connector-c++-1.1.0/cppconn/exception.h	2009-09-11 09:41:41.076379817 +0200
+@@ -37,7 +37,7 @@
+ #pragma warning(push)
+ #pragma warning(disable: 4275)
+ #endif
+-class CPPCONN_PUBLIC_FUNC SQLException : public std::runtime_error
++class CPPCONN_PUBLIC_EXCEPTION SQLException : public std::runtime_error
+ {
+ #ifdef _WIN32
+ #pragma warning(pop)
+@@ -83,26 +83,26 @@
+ 	MEMORY_ALLOC_OPERATORS(SQLException)
+ };
+ 
+-struct CPPCONN_PUBLIC_FUNC MethodNotImplementedException : public SQLException
++struct CPPCONN_PUBLIC_EXCEPTION MethodNotImplementedException : public SQLException
+ {
+ 	MethodNotImplementedException(const MethodNotImplementedException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
+ 	MethodNotImplementedException(const std::string& reason) : SQLException(reason, "", 0) {}
+ };
+ 
+-struct CPPCONN_PUBLIC_FUNC InvalidArgumentException : public SQLException
++struct CPPCONN_PUBLIC_EXCEPTION InvalidArgumentException : public SQLException
+ {
+ 	InvalidArgumentException(const InvalidArgumentException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
+ 	InvalidArgumentException(const std::string& reason) : SQLException(reason, "", 0) {}
+ };
+ 
+-struct CPPCONN_PUBLIC_FUNC InvalidInstanceException : public SQLException
++struct CPPCONN_PUBLIC_EXCEPTION InvalidInstanceException : public SQLException
+ {
+ 	InvalidInstanceException(const InvalidInstanceException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
+ 	InvalidInstanceException(const std::string& reason) : SQLException(reason, "", 0) {}
+ };
+ 
+ 
+-struct CPPCONN_PUBLIC_FUNC NonScrollableException : public SQLException
++struct CPPCONN_PUBLIC_EXCEPTION NonScrollableException : public SQLException
+ {
+ 	NonScrollableException(const NonScrollableException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
+ 	NonScrollableException(const std::string& reason) : SQLException(reason, "", 0) {}
+--- misc/mysql-connector-c++-1.1.0/driver/mysql_debug.h	2009-08-13 17:13:46.000000000 +0200
++++ misc/build/mysql-connector-c++-1.1.0/driver/mysql_debug.h	2009-08-14 09:56:37.015625000 +0200
+@@ -25,16 +25,6 @@
+ 
+ 
+ 
+-#if defined(WE_HAVE_VARARGS_MACRO_SUPPORT) && (CPPCONN_TRACE_ENABLED || defined(SAL_DLLPRIVATE))
+-	#define CPP_ENTER(msg)			const boost::shared_ptr< MySQL_DebugLogger > __l = this->logger;(void)__l;\
+-									MySQL_DebugEnterEvent __this_func(__LINE__, __FILE__, msg, this->logger)
+-	#define CPP_ENTER_WL(l, msg)	const boost::shared_ptr< MySQL_DebugLogger > __l = (l);(void)__l;\
+-									MySQL_DebugEnterEvent __this_func(__LINE__, __FILE__, msg, (l))
+-	#define CPP_INFO(msg)		{if (__l) __l->log("INF", msg); }
+-	#define CPP_INFO_FMT(...)	{if (__l) __l->log_va("INF", __VA_ARGS__); }
+-	#define CPP_ERR(msg)		{if (__l) __l->log("ERR", msg); }
+-	#define CPP_ERR_FMT(...)	{if (__l) __l->log_va("ERR", __VA_ARGS__); }
+-#else
+ 	#define CPP_ENTER(msg)
+ 	#define CPP_ENTER_WL(l, msg)
+ 	#define CPP_INFO(msg)
+@@ -42,7 +32,6 @@
+ 	#define CPP_ENTER_WL(l, msg)
+ 	static inline void CPP_INFO_FMT(...) {}
+ 	static inline void CPP_ERR_FMT(...) {}
+-#endif
+ 
+ #include <stack>
+ #include "mysql_util.h"
+
diff --git a/mysqlcppconn/prj/d.lst b/mysqlcppconn/prj/d.lst
index 5541358..e69de29 100644
--- a/mysqlcppconn/prj/d.lst
+++ b/mysqlcppconn/prj/d.lst
@@ -1,15 +0,0 @@
-# mirror the dir structure a make install would create
-mkdir: %_DEST%\inc\mysqlcppconn
-mkdir: %_DEST%\inc\mysqlcppconn\cppconn
-
-..\%__SRC%\inc\*.h %_DEST%\inc\mysqlcppconn\*.h
-..\%__SRC%\inc\cppconn\*.h %_DEST%\inc\mysqlcppconn\cppconn\*.h
-
-..\%__SRC%\bin\*.dll %_DEST%\bin\*.dll
-
- ..\%__SRC%\lib\lib*.so* %_DEST%\lib
-..\%__SRC%\lib\*.sl %_DEST%\lib\*.sl
-..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib
-..\%__SRC%\lib\*.dylib.* %_DEST%\lib\*.dylib.*
-..\%__SRC%\lib\*.a %_DEST%\lib\*.a
-..\%__SRC%\lib\i*.lib %_DEST%\lib
diff --git a/mysqlcppconn/prj/dmake b/mysqlcppconn/prj/dmake
deleted file mode 100644
index e69de29..0000000
--- a/mysqlcppconn/prj/dmake
+++ /dev/null

-- 
To view, visit https://gerrit.libreoffice.org/1900
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33a9ff3393b90c5b9f7d7fa85e8761c02160664f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Peter Foley <pefoley2 at verizon.net>


More information about the LibreOffice mailing list