]> git.pld-linux.org Git - packages/mysql-workbench.git/commitdiff
- use system mysql-connector-c++-devel; cleanup .la; package shared libs as executable
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 11 May 2012 20:19:07 +0000 (20:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql-workbench.spec -> 1.48
    system-cppconn.patch -> 1.1

mysql-workbench.spec
system-cppconn.patch [new file with mode: 0644]

index 31275637b64e9f076d147d2d7a03d90f80cef014..5f300a325df233ef268be9560e6cfd4161d3210c 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Extensible modeling tool for MySQL
 Summary(pl.UTF-8):     Narzędzie do modelowania baz danych dla MySQL-a
 Name:          mysql-workbench
 Version:       5.2.38
-Release:       1.5
+Release:       1.8
 License:       GPL v2
 Group:         Applications/Databases
 Source0:       ftp://ftp.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQLGUITools/%{name}-gpl-%{version}-src.tar.gz
@@ -17,6 +17,7 @@ Patch5:               pld-profile.patch
 Patch6:                get_local_ip_list.patch
 Patch7:                log_slow_queries.patch
 Patch8:                bashism.patch
+Patch9:                system-cppconn.patch
 URL:           http://wb.mysql.com/
 BuildRequires: OpenGL-devel
 BuildRequires: autoconf
@@ -35,6 +36,7 @@ BuildRequires:        libtool
 BuildRequires: libuuid-devel
 BuildRequires: libzip-devel
 BuildRequires: lua51-devel
+BuildRequires: mysql-connector-c++-devel >= 1.1.0
 BuildRequires: mysql-devel
 BuildRequires: pkgconfig
 BuildRequires: python-devel
@@ -73,12 +75,9 @@ skomplikowanych migracji do MySQL-a.
 %setup -q -n %{name}-gpl-%{version}-src
 %undos MySQLWorkbench.desktop.in
 # we use System provided libraries
-rm -r ext/boost
-rm -r ext/curl
-rm -r ext/libsigc++
-rm -r ext/yassl
-# rm -rf ext/cppconn
-# rm -rf ext/ctemplate
+rm -r ext/python/pexpect
+rm -r ext/cppconn
+rm -r ext/ctemplate
 # rm -rf library/tinyxml
 %patch0 -p1
 %patch1 -p1
@@ -89,6 +88,7 @@ rm -r ext/yassl
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 cp -p '%{SOURCE1}' res/mysql.profiles
 
 %build
@@ -114,6 +114,8 @@ rm -rf $RPM_BUILD_ROOT
        mimeinfodata_DATA= \
        DESTDIR=$RPM_BUILD_ROOT
 
+find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la'  | xargs rm -v
+
 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
 cp -p images/icons/MySQLWorkbench-128.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 
@@ -133,8 +135,16 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/%{name}-bin
 %{_datadir}/%{name}
 %{_datadir}/mime/packages/mysql-workbench.xml
-%{_libdir}/%{name}
 %{_iconsdir}/hicolor/*x*/apps/mysql-workbench.png
 %{_iconsdir}/hicolor/*x*/mimetypes/*.png
 %{_desktopdir}/%{name}.desktop
 %{_pixmapsdir}/%{name}.png
+
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/*.so*
+%dir %{_libdir}/%{name}/modules
+%{_libdir}/%{name}/modules/*.py
+%{_libdir}/%{name}/modules/*.lua
+%attr(755,root,root) %{_libdir}/%{name}/modules/*.so*
+%dir %{_libdir}/%{name}/plugins
+%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so*
diff --git a/system-cppconn.patch b/system-cppconn.patch
new file mode 100644 (file)
index 0000000..64f5b26
--- /dev/null
@@ -0,0 +1,93 @@
+diff -up mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp
+--- mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn     2010-09-20 19:11:07.100715204 +0200
++++ mysql-workbench-gpl-5.2.28-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp     2010-09-20 19:11:12.633514446 +0200
+@@ -47,7 +47,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 "boost_smart_ptr_helpers.h"
+--- mysql-workbench-gpl-5.2.38-src/configure.in~       2012-05-11 22:40:53.000000000 +0300
++++ mysql-workbench-gpl-5.2.38-src/configure.in        2012-05-11 22:41:05.998432764 +0300
+@@ -425,8 +425,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
+--- mysql-workbench-gpl-5.2.38-src/ext/Makefile.am~    2012-02-21 18:53:37.000000000 +0200
++++ mysql-workbench-gpl-5.2.38-src/ext/Makefile.am     2012-05-11 22:41:47.250338170 +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:
+diff -up mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp.cppconn mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp
+--- mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp.cppconn      2010-08-05 15:33:19.000000000 +0200
++++ mysql-workbench-gpl-5.2.26/library/dbc/src/driver_manager.cpp      2010-08-07 08:11:56.907643461 +0200
+@@ -145,6 +145,8 @@ TunnelConnection *DriverManager::getTunn
+ 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,21 @@ ConnectionWrapper DriverManager::getConn
+     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(".5").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;
+--- mysql-workbench-gpl-5.2.38-src/frontend/linux/workbench/Makefile.am~       2012-02-21 18:53:45.000000000 +0200
++++ mysql-workbench-gpl-5.2.38-src/frontend/linux/workbench/Makefile.am        2012-05-11 22:43:49.509318592 +0300
+@@ -54,12 +54,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)/ext/scintilla/gtk/libwbscintilla.la\
+       $(top_srcdir)/library/canvas/src/libmdcanvasgtk.la\
+       $(top_srcdir)/library/canvas/src/libmdcanvas.la\
+       @CTEMPLATE_LIBS@\
+       @GNOME_LIBS@ @GRT_LIBS@ @PCRE_LIBS@ @GLIB_LIBS@ @CAIRO_LIBS@ @ZIP_LIBS@ @MYSQL_LIBS@ @SQLITE3_LIBS@\
++      -lmysqlcppconn \
+       -lX11
+ #precompiled.h.gch: precompiled.h
This page took 0.062273 seconds and 4 git commands to generate.