[Libreoffice-commits] core.git: 2 commits - mysqlc/Library_mysqlc.mk mysqlc/README

Lionel Elie Mamane lionel at mamane.lu
Fri Mar 1 00:58:13 PST 2013


 mysqlc/Library_mysqlc.mk |    4 -
 mysqlc/README            |  106 +++++++++++++++++++++--------------------------
 2 files changed, 50 insertions(+), 60 deletions(-)

New commits:
commit a42649c6743a54498375903b4357c4c0545fbab8
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Mar 1 09:55:05 2013 +0100

    fdo#60907 Use *one* variable for the MySQL library file
    
    as opposed to two with different values,
    which leads to trouble
    
    Change-Id: Ic603105187b6078bd46d6c253410af28e188c70f

diff --git a/mysqlc/Library_mysqlc.mk b/mysqlc/Library_mysqlc.mk
index d97328a..cf77bc0 100644
--- a/mysqlc/Library_mysqlc.mk
+++ b/mysqlc/Library_mysqlc.mk
@@ -35,15 +35,13 @@ $(eval $(call gb_Library_use_libraries,mysqlc,\
 	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)),-DMYSQL_LIB=\"$(LIBMYSQL)\") \
 	$(if $(filter NO,$(SYSTEM_MYSQL_CPPCONN)),\
 	-DCPPCONN_LIB=\"$(call gb_Library_get_runtime_filename,mysqlcppconn)\") \
 ))
commit c7ef87aa8db6d892491891dcda6bfbaa1ad1d0d2
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Mar 1 09:44:45 2013 +0100

    mysqlc/README was *very* out of date
    
    Change-Id: I3a50ec19d42aa08d1346c9d0bdc1045f4ce88cd0

diff --git a/mysqlc/README b/mysqlc/README
index 17345da..abc5b98 100644
--- a/mysqlc/README
+++ b/mysqlc/README
@@ -1,68 +1,60 @@
 The MySQL driver for LibreOffice.
 
-== Status ==
-
-The code is on a PREVIEW level. PREVIEW means pre-alpha.
-
+It ships as an extension (.oxt file).
 
 == Requirements ==
 
-The MySQL driver for OpenOffice.org (MySQL Connector/OpenOffice.org - C/OOo)
+The MySQL driver for LibreOffice (MySQL Connector/LibreOffice - C/LibO)
 requires two external libraries to be build:
 
  1) The MySQL Client Library (libmysql)
- 2) The MySQL Connector/C++ Library (libmysqlcppcon)
-
-At the time of writing neither of the two libraries are part of the CWS!
-Before you can build the MySQL driver for OpenOffice.org you must install
-the two required libraries on your system before you can compile the driver.
-
-You need the two libraries because the MySQL driver for OpenOffice.org
-does not feature an implementation of the MySQL Client Server
-communication protocol. The protocol implementation is part of the MySQL
-Client Library. And the SDBC(X) style OpenOffice.org driver is implemented as a
-wrapper of the MySQL Connector/C++ Library which implements a JDBC interface and
-in turn uses the C based MySQL Client Library.
-
-1) MySQL Client Library (libmysql)
-
-The MySQL Client Library (libmysql) is part of the MySQL Server. You need to
-download and install the MySQL Server. Use a binary distribution of
-MySQL 5.0.x or MySQL 5.1.x. Check the MySQL manual for instructions, e.g.
-for Unix:
-
- http://dev.mysql.com/doc/refman/5.1/en/installing-binary.html
-
+ 2) The MySQL Connector/C++ Library (libmysqlcppconn)
+
+libmysql is not included as an external and needs to be provided by
+the build environment, but libmysqlcppconn is provided as an external
+and will be automatically compiled if you pass
+"--without-system-mysql-cppconn" to autogen.sh.
+
+The MySQL driver for LibreOffice does not reimplement the MySQL
+Client/Server communication protocol. The protocol implementation is
+part of the MySQL Client Library. The SDBC(X) driver is implemented as
+a wrapper of the MySQL Connector/C++ Library which implements a
+JDBC-like interface (which suits SDBC(X) well) and which in turn uses
+the C based MySQL Client Library.
+
+== Variants ==
+
+If configured with --with-system-mysql, the driver will *not* ship a
+copy of the MySQL client C library and will expect it to be installed
+in a standard location on each system that it runs on. That is usually
+the right choice to create a native package/port for GNU/Linux, BSD,
+etc, where the packaging system handles dependencies and will ensure
+the availability of the MySQL client C library in the standard
+location.
+
+If configured with --with-libmysql-path, the driver will ship a copy
+of the MySQL client C library so that it works "out of the box" on any
+system. That is usually the right choice to create a stand-alone .oxt
+file that users can just install through the LibreOffice extensions
+manager, as is typical for Microsoft Windows and Apple MacOS X native
+(as opposed to MacPorts/fink/pkgsrc/...).
+
+== Installing the Requirements ==
+
+On modern/free-as-in-free-speech Unices, libmysql and libmysqlcppconn
+are probably available as a package/port. Install them using your
+distribution's tools. Make sure to install the development packages
+(whose name usually ends with -dev or -devel), and not only the
+libraries themselves. You can use --with-system-mysql or
+--with-libmysql-path=/usr/ (but not both).
+
+Else you can install the MySQL Client Library from official MySQL
+packages at http://dev.mysql.com/downloads/connector/c/ .
+They have source and binary distributions for several platforms.
+
+You can also install the MySQL Client Library (libmysql) as part of
+the MySQL Server, version 5.0 or later. Check the MySQL manual for
+instructions: http://dev.mysql.com/doc/refman/5.5/en/installing.html
 The typical installation path of the libmysql.so on Unix is
 /usr/local/mysql/lib/mysql/ .
 
-2) MySQL Connector/C++ (libmysqlcppcon)
-
-Download and install the latest version of the MySQL Connector/C++, see
-http://forge.mysql.com/wiki/Connector_C++ . Check out the source
-from the bzr repository.
-
-3) Tweaking library paths
-
-At the time of writing you might have to *manually* tweak library paths and
-library names by patching makefile.mk. This is a temporary hack. The makefile
-will be improved later.
-
-However, for the moment check the makefile.mk if the compilation fails due to
-"missing" libraries (= libraries not found). For example, check the following
-settings:
-
-  MYSQL_INCDIR=/usr/local/include
-  MYSQL_LIBDIR=/usr/local/lib
-  [...]
-  MYSQL_INCDIR=/usr/local/include
-  MYSQL_LIBDIR=/usr/local/lib
-  [...]
-  MYSQL_INC=-I$(MYSQL_INCDIR)
-  MYSQL_LIB=-L$(MYSQL_LIBDIR) -lmysqlclient -rdynamic -lz -lcrypt -lnsl -lm
-  MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/libmysqlclient.so.16
-  MYSQL_CPPCONN_LIBFILE=$(MYSQL_LIBDIR)$/libmysqlcppconn.so
-  [...]
-
-A common issue is libmysqlclient.so.15 vs. libmysqlclient.so.16 .
-


More information about the Libreoffice-commits mailing list