Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 95c7489ff6f919dd390c2f192e0dc712 > files > 1

mysql-workbench-5.2.33b-1.2.mga1.src.rpm

Index: configure.in
===================================================================
--- configure.in
+++ configure.in	2011-04-08 13:45:27.290652714 -0300
@@ -417,8 +417,6 @@
 res/sqlidedata/Makefile
 ext/Makefile
 ext/scintilla/gtk/Makefile
-ext/cppconn/Makefile
-ext/cppconn/driver/Makefile
 ext/vsqlite++/Makefile
 ext/vsqlite++/src/sqlite/Makefile
 backend/Makefile
Index: frontend/linux/workbench/Makefile.am
===================================================================
--- frontend/linux/workbench/Makefile.am
+++ frontend/linux/workbench/Makefile.am	2011-04-08 13:47:23.935508385 -0300
@@ -55,13 +55,11 @@
 	$(top_srcdir)/library/base/libwbbase.la\
 	$(top_srcdir)/library/grt/src/libgrt.la\
 	$(top_srcdir)/library/dbc/libcdbc.la\
-	$(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\
 	$(top_srcdir)/library/canvas/src/libmdcanvasgtk.la\
 	$(top_srcdir)/library/canvas/src/libmdcanvas.la\
-	$(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\
 	@CTEMPLATE_LIBS@\
 	@GNOME_LIBS@ @GRT_LIBS@ @PCRE_LIBS@ @GLIB_LIBS@ @CAIRO_LIBS@ @ZIP_LIBS@ @MYSQL_LIBS@ @SQLITE3_LIBS@\
-	-lX11
+	-lmysqlcppconn -lX11
 
 #precompiled.h.gch: precompiled.h
 #	$(CXXCOMPILE) precompiled.h -o precompiled.h.gch
Index: frontend/linux/workbench/Makefile.in
===================================================================
--- frontend/linux/workbench/Makefile.in
+++ frontend/linux/workbench/Makefile.in	2011-04-08 13:45:27.290652714 -0300
@@ -71,10 +71,8 @@
 	$(top_srcdir)/library/base/libwbbase.la \
 	$(top_srcdir)/library/grt/src/libgrt.la \
 	$(top_srcdir)/library/dbc/libcdbc.la \
-	$(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la \
 	$(top_srcdir)/library/canvas/src/libmdcanvasgtk.la \
-	$(top_srcdir)/library/canvas/src/libmdcanvas.la \
-	$(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la
+	$(top_srcdir)/library/canvas/src/libmdcanvas.la 
 binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(bin_SCRIPTS)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
@@ -315,13 +313,12 @@
 	$(top_srcdir)/library/base/libwbbase.la\
 	$(top_srcdir)/library/grt/src/libgrt.la\
 	$(top_srcdir)/library/dbc/libcdbc.la\
-	$(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\
 	$(top_srcdir)/library/canvas/src/libmdcanvasgtk.la\
 	$(top_srcdir)/library/canvas/src/libmdcanvas.la\
-	$(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\
 	@CTEMPLATE_LIBS@\
 	@GNOME_LIBS@ @GRT_LIBS@ @PCRE_LIBS@ @GLIB_LIBS@ @CAIRO_LIBS@ @ZIP_LIBS@ @MYSQL_LIBS@ @SQLITE3_LIBS@\
-	-lX11
+	-lmysqlcppconn -lX11
+
 
 mysql_workbench_bin_SOURCES = \
 main.cpp\
Index: library/dbc/src/driver_manager.cpp
===================================================================
--- library/dbc/src/driver_manager.cpp
+++ library/dbc/src/driver_manager.cpp	2011-04-08 13:45:27.290652714 -0300
@@ -145,6 +145,8 @@
 ConnectionWrapper DriverManager::getConnection(const db_mgmt_ConnectionRef &connectionProperties, ConnectionInitSlot connection_init_slot)
 {
   TunnelConnection* tunnel = NULL;
+  gchar *p = NULL;
+  GModule *gmodule = NULL;
   // 0. determine correct driver filename
   
   db_mgmt_DriverRef drv = connectionProperties->driver();
@@ -154,21 +156,20 @@
     library = drv->driverLibraryName();
   else
     throw SQLException("Invalid connection settings: undefined connection driver");
-#ifdef _WIN32
-  library.append(".dll");
-#elif defined(__APPLE__)
-  library.append(".dylib");
-#else
-  library.append(".so");
-#endif
+
+  // Patch : use library in standard path
+  p = g_module_build_path (NULL, library.c_str());
 
   // 1. find driver
 
-  GModule *gmodule= g_module_open((_driver_path + "/" + library).c_str(), G_MODULE_BIND_LOCAL);
+  if (p) {
+	  gmodule = g_module_open(std::string(p).append(".6").c_str(), G_MODULE_BIND_LOCAL);
+	  g_free(p);
+  }
   if (NULL == gmodule)
   {
     fprintf(stderr, "Error: %s", g_module_error());
-    throw SQLException(std::string("Database driver: Failed to open library '").append(_driver_path + "/" + library).append("'. Check settings.").c_str());
+    throw SQLException(std::string("Database driver: Failed to open library '").append(library).append("'. Check settings.").c_str());
   }
   
   Driver *(* get_driver_instance)()= NULL;
Index: ext/Makefile.am
===================================================================
--- ext/Makefile.am
+++ ext/Makefile.am	2011-04-08 13:45:27.291652738 -0300
@@ -4,7 +4,7 @@
 ctemplate_dirs=ctemplate 
 endif
 
-SUBDIRS=scintilla/gtk cppconn vsqlite++ $(ctemplate_dirs)
+SUBDIRS=scintilla/gtk vsqlite++ $(ctemplate_dirs)
 
 if BUNDLE_UTILITIES
 all-am:
Index: ext/Makefile.in
===================================================================
--- ext/Makefile.in
+++ ext/Makefile.in	2011-04-08 13:45:27.291652738 -0300
@@ -53,7 +53,7 @@
   distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = scintilla/gtk cppconn vsqlite++ ctemplate
+DIST_SUBDIRS = scintilla/gtk vsqlite++ ctemplate
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -217,7 +217,7 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 @BUILD_CTEMPLATE_FALSE@ctemplate_dirs = ctemplate 
-SUBDIRS = scintilla/gtk cppconn vsqlite++ $(ctemplate_dirs)
+SUBDIRS = scintilla/gtk vsqlite++ $(ctemplate_dirs)
 all: all-recursive
 
 .SUFFIXES:
Index: backend/wbprivate/sqlide/wb_sql_editor_form.cpp
===================================================================
--- backend/wbprivate/sqlide/wb_sql_editor_form.cpp
+++ backend/wbprivate/sqlide/wb_sql_editor_form.cpp	2011-04-08 13:45:27.292652762 -0300
@@ -50,7 +50,7 @@
 // this doesn't belong here, but there's no other workaround for having access to mysql_info
 // because of that we also need to link wbprivate directly to the connector, making their
 // dynamic loading pretty much useless
-#include <cppconn/../driver/mysql_connection.h>
+#include <mysql_connection.h>
 
 #include "base/boost_smart_ptr_helpers.h"