[Libreoffice-commits] .: 2 commits - config_host.mk.in configure.ac Module_tail_build.mk mysqlc/Configuration_mysql.mk mysqlc/Extension_mysql-connector-ooo.mk mysqlc/Library_mysqlc.mk mysqlc/Makefile mysqlc/Module_mysqlc.mk mysqlcppconn/binding_dynamic.h mysqlcppconn/binding_static.h mysqlcppconn/config.h mysqlcppconn/cppconn_config.pmk mysqlcppconn/Library_mysqlcppconn.mk mysqlcppconn/Makefile mysqlcppconn/makefile.mk mysqlcppconn/Module_mysqlcppconn.mk mysqlcppconn/mysql_config.pmk mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-static.patch mysqlcppconn/mysql-connector-c++-1.1.0.patch mysqlcppconn/patches mysqlcppconn/prj mysqlcppconn/UnpackedTarball_mysqlcppconn.mk mysqlc/prj mysqlc/source mysqlc/version.mk postprocess/prj RepositoryExternal.mk Repository.mk RepositoryModule_ooo.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jan 28 14:54:24 PST 2013


 Module_tail_build.mk                                                       |    2 
 Repository.mk                                                              |    1 
 RepositoryExternal.mk                                                      |   68 ++
 RepositoryModule_ooo.mk                                                    |    2 
 config_host.mk.in                                                          |    3 
 configure.ac                                                               |    9 
 mysqlc/Configuration_mysql.mk                                              |   15 
 mysqlc/Extension_mysql-connector-ooo.mk                                    |   34 +
 mysqlc/Library_mysqlc.mk                                                   |   64 ++
 mysqlc/Makefile                                                            |    7 
 mysqlc/Module_mysqlc.mk                                                    |   22 
 mysqlc/prj/build.lst                                                       |    3 
 mysqlc/prj/d.lst                                                           |    4 
 mysqlc/source/META-INF/manifest.xml                                        |   25 
 mysqlc/source/description.xml                                              |    2 
 mysqlc/source/exports.dxp                                                  |    2 
 mysqlc/source/makefile.mk                                                  |  269 ----------
 mysqlc/source/manifest.xml                                                 |   25 
 mysqlc/source/mysqlc_preparedstatement.cxx                                 |    4 
 mysqlc/version.mk                                                          |   21 
 mysqlcppconn/Library_mysqlcppconn.mk                                       |   69 ++
 mysqlcppconn/Makefile                                                      |    7 
 mysqlcppconn/Module_mysqlcppconn.mk                                        |   21 
 mysqlcppconn/UnpackedTarball_mysqlcppconn.mk                               |   28 +
 mysqlcppconn/binding_dynamic.h                                             |    2 
 mysqlcppconn/binding_static.h                                              |    2 
 mysqlcppconn/config.h                                                      |   34 +
 mysqlcppconn/cppconn_config.pmk                                            |   33 -
 mysqlcppconn/makefile.mk                                                   |   98 ---
 mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch         |   17 
 mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-static.patch          |    6 
 mysqlcppconn/mysql-connector-c++-1.1.0.patch                               |  237 --------
 mysqlcppconn/mysql_config.pmk                                              |   49 -
 mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch |   11 
 mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch                       |  104 +++
 mysqlcppconn/prj/d.lst                                                     |   15 
 postprocess/prj/build.lst                                                  |    2 
 37 files changed, 536 insertions(+), 781 deletions(-)

New commits:
commit b02d799732594eee67cab0f86dc3b09182f628a5
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Thu Jan 24 15:43:52 2013 -0500

    convert mysqlc to gbuild and add to tail_build
    
    Change-Id: Ia64bc884ed04a5d5652fb743f543a39e6b6bbcf2
    Reviewed-on: https://gerrit.libreoffice.org/1901
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index b9e8356..8ce4fb6 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -123,6 +123,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_build,\
 	$(call gb_Helper_optional,MDDS,mdds) \
 	Mesa \
 	$(call gb_Helper_optional,MORE_FONTS,more_fonts) \
+	$(call gb_Helper_optional,MYSQLC,mysqlc) \
 	$(call gb_Helper_optional,MYSQLCPPCONN,mysqlcppconn) \
 	$(call gb_Helper_optional,MYTHES,mythes) \
 	$(call gb_Helper_optional,NEON,neon) \
diff --git a/Repository.mk b/Repository.mk
index 19e9c4d..6cb7c1c 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -572,6 +572,7 @@ $(eval $(call gb_Helper_register_libraries,UNOLIBS_OOO, \
     migrationoo3 \
     msforms \
     mtfrenderer \
+    mysqlc \
     nullcanvas \
     OGLTrans \
     passwordcontainer \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index cc31f35..404732e 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -222,7 +222,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 )
 
 $(call gb_LinkTarget_add_defs,$(1),\
-	-DSYSTEM_MYSQL_CPPCONN` \
+	-DSYSTEM_MYSQL_CPPCONN \
 )
 endef
 
@@ -237,6 +237,10 @@ define gb_LinkTarget__use_mysqlcppconn
 $(call gb_LinkTarget_use_libraries,$(1),\
 	mysqlcppconn \
 )
+$(call gb_LinkTarget_add_defs,$(1),\
+	-DCPPCONN_LIB_BUILD \
+)
+
 $(call gb_LinkTarget_set_include,$(1),\
 	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
 	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 6681e49..60a0f4e 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -131,6 +131,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 	$(call gb_Helper_optional,MDDS,mdds) \
 	Mesa \
 	$(call gb_Helper_optional,MORE_FONTS,more_fonts) \
+	$(call gb_Helper_optional,MYSQLC,mysqlc) \
 	$(call gb_Helper_optional,MYSQLCPPCONN,mysqlcppconn) \
 	$(call gb_Helper_optional,MYTHES,mythes) \
 	$(call gb_Helper_optional,NEON,neon) \
diff --git a/config_host.mk.in b/config_host.mk.in
index ddbff72..d980a86 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -404,6 +404,9 @@ export MSVC80_DLL_DIR=@MSVC80_DLL_DIR@
 export MYSQL_DEFINES=@MYSQL_DEFINES@
 export MYSQL_INC=@MYSQL_INC@
 export MYSQL_LIB=@MYSQL_LIB@
+export MYSQLC_MAJOR=@MYSQLC_MAJOR@
+export MYSQLC_MINOR=@MYSQLC_MINOR@
+export MYSQLC_MICRO=@MYSQLC_MICRO@
 export MYTHES_CFLAGS=$(gb_SPACE)@MYTHES_CFLAGS@
 export MYTHES_LIBS=$(gb_SPACE)@MYTHES_LIBS@
 export NEON_CFLAGS=$(gb_SPACE)@NEON_CFLAGS@
diff --git a/configure.ac b/configure.ac
index ed776a6..a1dbc23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7759,12 +7759,18 @@ AC_MSG_CHECKING([whether to build the MySQL Connector extension])
 if test "x$enable_ext_mysql_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
     AC_MSG_RESULT([yes])
     ENABLE_MYSQLC=YES
+    MYSQLC_MAJOR=1
+    MYSQLC_MINOR=0
+    MYSQLC_MICRO=1
     BUILD_TYPE="$BUILD_TYPE MYSQLC"
 else
     AC_MSG_RESULT([no])
     ENABLE_MYSQLC=NO
 fi
 AC_SUBST(ENABLE_MYSQLC)
+AC_SUBST(MYSQLC_MAJOR)
+AC_SUBST(MYSQLC_MINOR)
+AC_SUBST(MYSQLC_MICRO)
 
 if test "$ENABLE_MYSQLC" = "YES"; then
 
diff --git a/mysqlc/Configuration_mysql.mk b/mysqlc/Configuration_mysql.mk
new file mode 100644
index 0000000..5c21154
--- /dev/null
+++ b/mysqlc/Configuration_mysql.mk
@@ -0,0 +1,15 @@
+# -*- 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_Configuration_Configuration,mysql,nodeliver))
+
+$(eval $(call gb_Configuration_add_localized_datas,mysql,mysqlc/source/registry/data,\
+	org/openoffice/Office/DataAccess/Drivers.xcu \
+))
+
diff --git a/mysqlc/Extension_mysql-connector-ooo.mk b/mysqlc/Extension_mysql-connector-ooo.mk
new file mode 100644
index 0000000..65f2b0d
--- /dev/null
+++ b/mysqlc/Extension_mysql-connector-ooo.mk
@@ -0,0 +1,34 @@
+# -*- 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_Extension_Extension,mysql-connector-ooo,mysqlc/source))
+
+$(eval $(call gb_Extension_add_library,mysql-connector-ooo,mysqlc))
+
+$(eval $(call gb_Extension_add_file,mysql-connector-ooo,registry/data/org/openoffice/Office/DataAccess/Drivers.xcu,$(call gb_XcuFile_for_extension,mysqlc/source/registry/data/org/openoffice/Office/DataAccess/Drivers.xcu)))
+
+$(eval $(call gb_Extension_add_files,mysql-connector-ooo,images,\
+    $(SRCDIR)/icon-themes/galaxy/desktop/res/extension_32.png \
+))
+
+ifeq ($(SYSTEM_MYSQL_CPPCON),NO)
+$(eval $(call gb_Extension_add_files,mysql-connector-ooo,,\
+	$(call gb_Library_get_target,mysqlcppcon) \
+))
+endif
+
+# HACK: comes from Library_mysql.mk
+ifeq ($(SYSTEM_MYSQL),NO)
+$(eval $(call gb_Extension_add_files,mysql-connector-ooo,,\
+	$(LIBMYSQL_PATH)/lib/$(MYSQL_LIBFILE) \
+))
+endif
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlc/Library_mysqlc.mk b/mysqlc/Library_mysqlc.mk
new file mode 100644
index 0000000..edcc366
--- /dev/null
+++ b/mysqlc/Library_mysqlc.mk
@@ -0,0 +1,64 @@
+# -*- 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_Library_Library,mysqlc))
+
+$(eval $(call gb_Library_set_warnings_not_errors,mysqlc))
+
+$(eval $(call gb_Library_use_externals,mysqlc,\
+	boost_headers \
+	mysql \
+	mysqlcppconn \
+))
+
+ifeq ($(SYSTEM_MYSQL_CPPCONN),NO)
+$(eval $(call gb_Library_add_libs,mysqlc,\
+	$(if $(filter-out WNT,$(OS)),$(if $(filter MACOSX SOLARIS,$(OS)),-lz -lm,\
+	-rdynamic -lz -lcrypt -lnsl -lm)) \
+))
+endif
+
+$(eval $(call gb_Library_use_sdk_api,mysqlc))
+
+$(eval $(call gb_Library_use_libraries,mysqlc,\
+	cppu \
+	sal \
+	salhelper \
+	cppuhelper \
+))
+
+MYSQL_LIBFILE :=$(if $(filter WNT,$(OS)),libmysql.dll,\
+	$(if $(filter MACOSX,$(OS)),libmysql.16.dylib,libmysql.so.16))
+
+$(eval $(call gb_Library_add_defs,mysqlc,\
+	-DCPPDBC_EXPORTS \
+	-DCPPCON_LIB_BUILD \
+	-DMYSQLC_VERSION_MAJOR=$(MYSQLC_MAJOR) \
+	-DMYSQLC_VERSION_MINOR=$(MYSQLC_MINOR) \
+	-DMYSQLC_VERSION_MICRO=$(MYSQLC_MICRO) \
+	$(if $(filter NO,$(SYSTEM_MYSQL)),-DMYSQL_LIB=\"$(MYSQL_LIBFILE)\") \
+	$(if $(filter NO,$(SYSTEM_MYSQL_CPPCONN)),\
+	-DCPPCONN_LIB=\"$(call gb_Library_get_runtime_filename,mysqlcppconn)\") \
+))
+
+$(eval $(call gb_Library_add_exception_objects,mysqlc,\
+	mysqlc/source/mysqlc_driver \
+	mysqlc/source/mysqlc_services \
+	mysqlc/source/mysqlc_connection \
+	mysqlc/source/mysqlc_resultset \
+	mysqlc/source/mysqlc_resultsetmetadata \
+	mysqlc/source/mysqlc_statement \
+	mysqlc/source/mysqlc_preparedstatement \
+	mysqlc/source/mysqlc_databasemetadata \
+	mysqlc/source/mysqlc_types \
+	mysqlc/source/mysqlc_general \
+	mysqlc/source/mysqlc_propertyids \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlc/Makefile b/mysqlc/Makefile
new file mode 100644
index 0000000..ccb1c85
--- /dev/null
+++ b/mysqlc/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/mysqlc/Module_mysqlc.mk b/mysqlc/Module_mysqlc.mk
new file mode 100644
index 0000000..f4fa114
--- /dev/null
+++ b/mysqlc/Module_mysqlc.mk
@@ -0,0 +1,22 @@
+# -*- 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,mysqlc))
+
+ifeq ($(ENABLE_MYSQLC),YES)
+
+$(eval $(call gb_Module_add_targets,mysqlc,\
+	Configuration_mysql \
+	Library_mysqlc \
+	Extension_mysql-connector-ooo \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/mysqlc/prj/build.lst b/mysqlc/prj/build.lst
index 3cbb4e6..90affce 100644
--- a/mysqlc/prj/build.lst
+++ b/mysqlc/prj/build.lst
@@ -1,3 +1,2 @@
 mc	mysqlc	:	solenv MYSQLCPPCONN:mysqlcppconn offapi cppu soltools cppuhelper readlicense_oo NULL
-ch	mysqlc              usr1    -	all mc_mkout NULL
-mc	mysqlc\source       nmake   -   all mc_source NULL
+mc	mysqlc\prj       nmake   -   all mc_mysqlc NULL
diff --git a/mysqlc/prj/d.lst b/mysqlc/prj/d.lst
index a173c35..e69de29 100644
--- a/mysqlc/prj/d.lst
+++ b/mysqlc/prj/d.lst
@@ -1,4 +0,0 @@
-# Extensions
-
-..\%__SRC%\bin\*.oxt %_DEST%\bin\*.oxt
-
diff --git a/mysqlc/prj/dmake b/mysqlc/prj/dmake
deleted file mode 100644
index e69de29..0000000
diff --git a/mysqlc/source/META-INF/manifest.xml b/mysqlc/source/META-INF/manifest.xml
new file mode 100644
index 0000000..7c7ffb2
--- /dev/null
+++ b/mysqlc/source/META-INF/manifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
+<!--
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
+  <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
+                       manifest:full-path="mysqlc.unoSHARED_EXTENSION"/>
+    <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+                 manifest:full-path="registry/data/org/openoffice/Office/DataAccess/Drivers.xcu"/>
+</manifest:manifest>
diff --git a/mysqlc/source/delzip b/mysqlc/source/delzip
deleted file mode 100644
index e69de29..0000000
diff --git a/mysqlc/source/description.xml b/mysqlc/source/description.xml
index b19e3da..cd5c3c0 100644
--- a/mysqlc/source/description.xml
+++ b/mysqlc/source/description.xml
@@ -20,7 +20,7 @@
     xmlns:xlink="http://www.w3.org/1999/xlink">
 
     <identifier value="UPDATED_IDENTIFIER"/>
-    <version value="#VERSION#" />
+    <version value="1.0.1" />
     <platform value="UPDATED_SUPPORTED_PLATFORM" />
     <display-name>
         <name lang="en-US">MySQL Connector</name>
diff --git a/mysqlc/source/exports.dxp b/mysqlc/source/exports.dxp
deleted file mode 100644
index 51703a0..0000000
--- a/mysqlc/source/exports.dxp
+++ /dev/null
@@ -1,2 +0,0 @@
-component_writeInfo
-component_getFactory
diff --git a/mysqlc/source/makefile.mk b/mysqlc/source/makefile.mk
deleted file mode 100644
index 6402e13..0000000
--- a/mysqlc/source/makefile.mk
+++ /dev/null
@@ -1,269 +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=mysqlc
-
-.INCLUDE : $(PRJ)$/version.mk
-
-TARGET=mysqlc
-ENABLE_EXCEPTIONS=TRUE
-VISIBILITY_HIDDEN = TRUE
-LIBTARGET=NO
-EXTENSIONNAME:=mysql-connector-ooo
-
-EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE :  settings.mk
-
-#-------------------------------------------------------------------
-
-#---- extension version
-EXTENSION_VERSION_BASE=$(MYSQLC_VERSION_MAJOR).$(MYSQLC_VERSION_MINOR).$(MYSQLC_VERSION_MICRO)
-    EXTENSION_VERSION=$(EXTENSION_VERSION_BASE)
-
-#---- extension title package name
-EXTENSION_ZIPNAME:=$(EXTENSIONNAME)
-
-#-------------------------------------------------------------------
-
-# The headers delivered from C/C++ have a habit of putting a ";" after the closing bracked of a namespace, which
-# yields a warning with Solaris' compiler. Until this is fixed in C/C++, silence this warning
-.IF "$(OS)" == "SOLARIS"
-    CFLAGSWARNCXX+=,wemptydecl
-    CFLAGSWARNCXX:=$(CFLAGSWARNCXX:s/ ,/,/)
-.ENDIF
-
-#-------------------------------------------------------------------
-.IF "$(ENABLE_MYSQLC)" != "YES"
- at all:
-    @echo "Mysql native driver extension build disabled."
-.ENDIF
-
-# use the static version
-.IF "$(OS)"=="WNT"
-  MYSQL_LIBDIR=$(LIBMYSQL_PATH)$/lib
-  MYSQL_INCDIR=$(LIBMYSQL_PATH)$/include
-.ELSE
-  .IF "$(SYSTEM_MYSQL)" != "YES"
-    MYSQL_LIBDIR=$(LIBMYSQL_PATH)$/lib
-    MYSQL_INCDIR=$(LIBMYSQL_PATH)$/include
-  .ENDIF
-.ENDIF
-
-.IF "$(SYSTEM_MYSQL)" == "YES"
-CFLAGS+=-DSYSTEM_MYSQL
-.ENDIF
-
-.IF "$(SYSTEM_MYSQL_CPPCONN)" == "YES"
-CFLAGS+=-DSYSTEM_MYSQL_CPPCONN
-.ENDIF
-
-CDEFS+=-DCPPDBC_EXPORTS -DCPPCONN_LIB_BUILD
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-CDEFS += -DCPPCONN_LIB=\"$(DLLPRE)mysqlcppconn$(DLLPOST)\"
-.ENDIF
-
-# --------------- MySQL settings ------------------
-.IF "$(OS)"=="WNT"
-  MYSQL_INC=-I$(SOLARINCDIR)$/mysqlcppconn -I$(SOLARINCDIR)$/mysqlcppconn/cppconn -I$(MYSQL_INCDIR)
-  MYSQL_LIB=$(MYSQL_LIBDIR)$/libmysql.lib
-  MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/libmysql.dll
-  MYSQL_CPPCONNFILE=$(SOLARBINDIR)$/$(DLLPRE)mysqlcppconn$(DLLPOST)
-.ELSE
-  .IF "$(SYSTEM_MYSQL)" != "YES"
-    MYSQL_INC+=-I$(MYSQL_INCDIR)
-    .IF "$(OS)"=="MACOSX"
-      MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/$(DLLPRE)mysql.16$(DLLPOST)
-    .ELSE
-      MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/$(DLLPRE)mysql$(DLLPOST).16
-    .ENDIF
-  .ENDIF
-
-  .IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-    .IF "$(OS)"=="MACOSX" || "$(OS)" == "SOLARIS"
-      MYSQL_LIB+=-lz -lm
-    .ELSE
-      MYSQL_LIB+=-rdynamic -lz -lcrypt -lnsl -lm
-    .ENDIF
-    MYSQL_CPPCONNFILE=$(SOLARLIBDIR)$/$(DLLPRE)mysqlcppconn$(DLLPOST)
-  .ELSE
-    MYSQL_CPPCONN_LIB+=-lmysqlcppconn
-  .ENDIF
-.ENDIF
-
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-  MYSQL_INC+=-I$(SOLARINCDIR)$/mysqlcppconn -I$(SOLARINCDIR)$/mysqlcppconn/cppconn
-.ENDIF
-
-CFLAGS+=-I..$/..$/inc $(MYSQL_INC) \
-	-I$(WORKDIR)/UnpackedTarball/boost \
-    -DMYSQLC_VERSION_MAJOR=$(MYSQLC_VERSION_MAJOR) \
-    -DMYSQLC_VERSION_MINOR=$(MYSQLC_VERSION_MINOR) \
-    -DMYSQLC_VERSION_MICRO=$(MYSQLC_VERSION_MICRO) \
-    $(MYSQL_DEFINES)
-
-# provide the name of the MySQL client lib to the C++ code
-.IF "$(SYSTEM_MYSQL)" != "YES"
-CDEFS += -DMYSQL_LIB=\"$(MYSQL_LIBFILE:f)\"
-.ENDIF
-
-#--------------------------------------------------
-
-SHL1DLLPRE=
-SHL1TARGET=$(TARGET).uno
-LIB1TARGET=$(SLB)$/$(SHL1TARGET).lib
-LIB1OBJFILES= \
-        $(SLO)$/mysqlc_driver.obj \
-        $(SLO)$/mysqlc_services.obj  \
-        $(SLO)$/mysqlc_connection.obj \
-        $(SLO)$/mysqlc_resultset.obj \
-        $(SLO)$/mysqlc_resultsetmetadata.obj \
-        $(SLO)$/mysqlc_statement.obj \
-        $(SLO)$/mysqlc_preparedstatement.obj \
-        $(SLO)$/mysqlc_databasemetadata.obj \
-        $(SLO)$/mysqlc_types.obj \
-        $(SLO)$/mysqlc_general.obj \
-        $(SLO)$/mysqlc_propertyids.obj
-
-SHL1STDLIBS= \
-        $(MYSQL_LIB)                \
-        $(MYSQL_CPPCONN_LIB)        \
-        $(CPPULIB)                  \
-        $(SALLIB)                   \
-        $(SALHELPERLIB)             \
-        $(CPPUHELPERLIB)
-
-SHL1LIBS=	$(LIB1TARGET)
-SHL1DEF=	$(MISC)$/$(SHL1TARGET).def
-SHL1RPATH=OXT
-DEF1NAME=	$(SHL1TARGET)
-DEF1EXPORTFILE=	exports.dxp
-
-# create Extension -----------------------------
-
-# DESCRIPTION_SRC is the source file which is copied into the extension
-# It is defaulted to "description.xml", but we want to pre-process it, so we use an intermediate
-# file
-DESCRIPTION_SRC = $(MISC)$/description.xml
-
-COMPONENT_XCU=\
-        registry$/data$/org$/openoffice$/Office$/DataAccess$/Drivers.xcu
-
-COMPONENT_MERGED_XCU= \
-        $(foreach,i,$(COMPONENT_XCU) $(EXTENSIONDIR)$/$i)
-
-COMPONENT_LIBRARY = \
-            $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST)
-
-COMPONENT_MYSQL_LIBFILE = \
-            $(EXTENSIONDIR)$/$(MYSQL_LIBFILE:f) 
-
-COMPONENT_MYSQL_CPPCONN_FILE=\
-            $(EXTENSIONDIR)$/$(MYSQL_CPPCONNFILE:f)
-
-COMPONENT_LIBRARIES=\
-            $(COMPONENT_LIBRARY)
-
-COMPONENT_IMAGES= \
-    $(EXTENSIONDIR)$/images$/extension_32.png
-
-# ........ component description ........
-# one file for each WITH_LANG token
-COMPONENT_DESCRIPTIONS=$/$(foreach,lang,$(alllangiso) description-$(lang).txt)
-COMPONENT_DESCRIPTIONS_PACKDEP= \
-    $(foreach,i,$(COMPONENT_DESCRIPTIONS) $(EXTENSIONDIR)$/$i)
-
-# ........ dependencies for packaging the extension ........
-EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES) $(COMPONENT_DESCRIPTIONS_PACKDEP) $(COMPONENT_MERGED_XCU)
-
-.IF "$(SYSTEM_MYSQL)" != "YES"
-EXTENSION_PACKDEPS+=$(COMPONENT_MYSQL_LIBFILE)
-.ENDIF
-
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-EXTENSION_PACKDEPS+=$(COMPONENT_MYSQL_CPPCONN_FILE)
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-.INCLUDE : extension_pre.mk
-.INCLUDE : target.mk
-.INCLUDE : extension_post.mk
-
-$(COMPONENT_IMAGES) : $(SRC_ROOT)/$(RSCDEFIMG)$/desktop$/res$/$$(@:f)
-    @@-$(MKDIRHIER) $(@:d)
-    $(COPY) $< $@
-
-# xcu files: copy
-# the following is a hack for now - need to find out the generic mechanism later
-
-$(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/DataAccess$/Drivers.xcu : .$/registry$/data$/org$/openoffice$/Office$/DataAccess$/Drivers.xcu
-    @@-$(MKDIRHIER) $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/DataAccess
-    @$(COPY) $< $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/DataAccess$/Drivers.xcu > $(NULLDEV)
-
-$(COMPONENT_DESCRIPTIONS_PACKDEP) : $(DESCRIPTION)
-
-$(DESCRIPTION_SRC): description.xml
-    +-$(RM) $@
-.IF "$(WITH_LANG)" != ""
-    $(XRMEX) -p $(PRJNAME) -i $< -o $@ -m $(mktmp $(foreach,lang,$(subst,en-US, $(WITH_LANG_LIST)) $(SRCDIR)/translations/source/$(lang)/$(PRJNAME)$/$(PATH_IN_MODULE).po)) -l all
-    $(SED) "s/#VERSION#/$(EXTENSION_VERSION)/" < $@ > $@.new
-    mv $@.new $@
-    @$(COPY) $(@:d)/description-*.txt $(EXTENSIONDIR)
-.ELSE
-    $(SED) "s/#VERSION#/$(EXTENSION_VERSION)/" < $< > $@
-.ENDIF
-    @$(COPY) description-en-US.txt $(EXTENSIONDIR)
-
-.IF "$(SYSTEM_MYSQL)" != "YES" 
-# --- the MySQL client lib needs to be copied
-$(COMPONENT_MYSQL_LIBFILE): $(MYSQL_LIBFILE)
-    @@-$(MKDIRHIER) $(@:d)
-    @$(COPY) $< $@ > $(NULLDEV)
-    .IF "$(OS)" == "MACOSX"
-        $(XCRUN) install_name_tool -id @__________________________________________________OOO/$(MYSQL_LIBFILE:f) $@
-    .ENDIF
-.ENDIF
-
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-# --- the MySQL cppconn lib needs to be copied
-$(COMPONENT_MYSQL_CPPCONN_FILE): $(MYSQL_CPPCONNFILE)
-    @@-$(MKDIRHIER) $(@:d)
-    @$(COPY) $< $@ > $(NULLDEV)
-    .IF "$(OS)" == "MACOSX"
-        $(XCRUN) install_name_tool -change $(MYSQL_LIBFILE:f) @loader_path/$(MYSQL_LIBFILE:f) $@
-    .ENDIF
-.ENDIF
-
-.IF "$(OS)" == "MACOSX"
-$(EXTENSION_TARGET): adjust_libmysql_path
-
-adjust_libmysql_path: $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST)
-    $(XCRUN) install_name_tool -change $(MYSQL_LIBFILE:f) @loader_path/$(MYSQL_LIBFILE:f) $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST)
-.ENDIF
diff --git a/mysqlc/source/manifest.xml b/mysqlc/source/manifest.xml
deleted file mode 100644
index 7c7ffb2..0000000
--- a/mysqlc/source/manifest.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
-<!--
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
-  <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
-                       manifest:full-path="mysqlc.unoSHARED_EXTENSION"/>
-    <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
-                 manifest:full-path="registry/data/org/openoffice/Office/DataAccess/Drivers.xcu"/>
-</manifest:manifest>
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx
index c01a79c..dc0ebc0 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -35,6 +35,10 @@
 
 #include <stdio.h>
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 using namespace connectivity::mysqlc;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
diff --git a/mysqlc/version.mk b/mysqlc/version.mk
deleted file mode 100644
index 3340fe85..0000000
--- a/mysqlc/version.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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/.
-#
-# This file incorporates work covered by the following license notice:
-#
-#   Licensed to the Apache Software Foundation (ASF) under one or more
-#   contributor license agreements. See the NOTICE file distributed
-#   with this work for additional information regarding copyright
-#   ownership. The ASF licenses this file to you under the Apache
-#   License, Version 2.0 (the "License"); you may not use this file
-#   except in compliance with the License. You may obtain a copy of
-#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-
-MYSQLC_VERSION_MAJOR=1
-MYSQLC_VERSION_MINOR=0
-MYSQLC_VERSION_MICRO=1
diff --git a/postprocess/prj/build.lst b/postprocess/prj/build.lst
index 2ba45e2..143147b 100644
--- a/postprocess/prj/build.lst
+++ b/postprocess/prj/build.lst
@@ -1,2 +1,2 @@
-po      postprocess     ::      HELP:helpcontent2 ODK:odk MYSQLC:mysqlc DESKTOP:setup_native sysui tail_build NULL
+po      postprocess     ::      HELP:helpcontent2 ODK:odk DESKTOP:setup_native sysui tail_build NULL
 po	postprocess\prj		nmake	-	all	po_prj NULL
commit c322d509231f9e1220fb86be68f13c5f4b135ccb
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Wed Jan 23 16:29:08 2013 -0500

    convert mysqlcppconn to gbuild and add to tail_build
    
    Change-Id: I33a9ff3393b90c5b9f7d7fa85e8761c02160664f
    Reviewed-on: https://gerrit.libreoffice.org/1900
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

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 @@ $(eval $(call gb_Module_add_moduledirs,tail_build,\
 	$(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..cc31f35 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -183,6 +183,70 @@ $(call gb_LinkTarget_add_libs,$(1),-liconv)
 
 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_libraries,OOOLIBS,\
+	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 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 	$(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 @@ if test "$ENABLE_MYSQLC" = "YES"; then
             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/Library_mysqlcppconn.mk b/mysqlcppconn/Library_mysqlcppconn.mk
new file mode 100644
index 0000000..6ebc036
--- /dev/null
+++ b/mysqlcppconn/Library_mysqlcppconn.mk
@@ -0,0 +1,69 @@
+# -*- 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_Library_Library,mysqlcppconn))
+
+$(eval $(call gb_Library_use_unpacked,mysqlcppconn,mysqlcppconn))
+
+$(eval $(call gb_Library_use_externals,mysqlcppconn, \
+	mysql \
+	boost_headers \
+))
+
+$(eval $(call gb_Library_set_warnings_not_errors,mysqlcppconn))
+
+$(eval $(call gb_Library_set_generated_cxx_suffix,mysqlcppconn,cpp))
+
+$(eval $(call gb_Library_set_include,mysqlcppconn,\
+	$$(INCLUDE) \
+	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
+	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
+))
+
+# HACK: generate import lib for msvc
+ifeq ($(COM),MSC)
+$(eval $(call gb_Library_add_ldflags,mysqlcppconn,\
+	/EXPORT:sql_mysql_get_driver_instance \
+))
+endif
+
+$(eval $(call gb_Library_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_Library_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/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..01acff0
--- /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 \
+	Library_mysqlcppconn \
+))
+
+endif
+
+# 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-dynamic.patch b/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
deleted file mode 100644
index 80a87c8..0000000
--- a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
+++ /dev/null
@@ -1,17 +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
---- 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 @@
- 
- typedef MYSQL_RES * (STDCALL *ptr2mysql_use_result)(MYSQL *);
- 
-+typedef unsigned long (STDCALL *ptr2mysql_realescapestring)(MYSQL *, char *, const char *, unsigned long);
-+
- /* Prepared Statement stmt_* functions */
- typedef my_ulonglong (STDCALL *ptr2mysql_stmt_affected_rows)(MYSQL_STMT *);
- 
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/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch b/mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
new file mode 100644
index 0000000..0644dbb
--- /dev/null
+++ b/mysqlcppconn/patches/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
@@ -0,0 +1,11 @@
+--- 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 @@
+ 
+ typedef MYSQL_RES * (STDCALL *ptr2mysql_use_result)(MYSQL *);
+ 
++typedef unsigned long (STDCALL *ptr2mysql_realescapestring)(MYSQL *, char *, const char *, unsigned long);
++
+ /* Prepared Statement stmt_* functions */
+ typedef my_ulonglong (STDCALL *ptr2mysql_stmt_affected_rows)(MYSQL_STMT *);
+ 
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


More information about the Libreoffice-commits mailing list