]> git.pld-linux.org Git - packages/libgda5.git/commitdiff
- added mdb1.0 patch (adjust for mdbtools 1.0.x); release 5 master auto/th/libgda5-5.2.10-5
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 Feb 2023 13:05:43 +0000 (14:05 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 26 Feb 2023 13:05:43 +0000 (14:05 +0100)
libgda-mdb1.0.patch [new file with mode: 0644]
libgda5.spec

diff --git a/libgda-mdb1.0.patch b/libgda-mdb1.0.patch
new file mode 100644 (file)
index 0000000..2ba556c
--- /dev/null
@@ -0,0 +1,88 @@
+--- libgda-5.2.10/providers/mdb/gda-mdb.h.orig 2020-11-08 21:23:20.000000000 +0100
++++ libgda-5.2.10/providers/mdb/gda-mdb.h      2023-02-26 10:42:51.906430710 +0100
+@@ -39,6 +39,7 @@ typedef struct {
+       GdaConnection  *cnc;
+       MdbHandle      *mdb;
+       gchar          *server_version;
++      gchar          *filename;
+ } MdbConnectionData;
+ #endif
+--- libgda-5.2.10/providers/mdb/gda-mdb-provider.c.orig        2020-11-08 21:23:20.000000000 +0100
++++ libgda-5.2.10/providers/mdb/gda-mdb-provider.c     2023-02-26 10:44:46.039145733 +0100
+@@ -63,8 +63,6 @@ static const gchar *gda_mdb_provider_get
+ static GObjectClass *parent_class = NULL;
+-static GMutex mdb_init_mutex;
+-static gint loaded_providers = 0;
+ char *g_input_ptr;
+ /* 
+@@ -95,7 +93,6 @@ gda_mdb_provider_class_init (GdaMdbProvi
+ static void
+ gda_mdb_provider_init (GdaMdbProvider *myprv, GdaMdbProviderClass *klass)
+ {
+-      mdb_set_date_fmt ("%Y-%m-%d %H:%M:%S");
+ }
+ static void
+@@ -107,13 +104,6 @@ gda_mdb_provider_finalize (GObject *obje
+       /* chain to parent class */
+       parent_class->finalize (object);
+-
+-      /* call MDB exit function if there are no more providers */
+-      g_mutex_lock (&mdb_init_mutex);
+-      loaded_providers--;
+-      if (loaded_providers == 0)
+-              mdb_exit ();
+-      g_mutex_unlock (&mdb_init_mutex);
+ }
+ GType
+@@ -148,12 +138,6 @@ gda_mdb_provider_new (void)
+ {
+       GdaMdbProvider *provider;
+-      g_mutex_lock (&mdb_init_mutex);
+-      if (loaded_providers == 0) 
+-              mdb_init ();
+-      loaded_providers++;
+-      g_mutex_unlock (&mdb_init_mutex);
+-
+       provider = g_object_new (gda_mdb_provider_get_type (), NULL);
+       return GDA_SERVER_PROVIDER (provider);
+ }
+@@ -304,6 +288,7 @@ gda_mdb_provider_open_connection (GdaSer
+       cdata = g_new0 (MdbConnectionData, 1);
+       cdata->cnc = cnc;
+       cdata->server_version = NULL;
++      cdata->filename = filename;
+ #ifdef MDB_WITH_WRITE_SUPPORT
+       cdata->mdb = mdb_open (filename, MDB_WRITABLE);
+ #else
+@@ -314,6 +299,7 @@ gda_mdb_provider_open_connection (GdaSer
+               gda_mdb_free_cnc_data (cdata);
+               return FALSE;
+       }
++      mdb_set_date_fmt (cdata->mdb, "%Y-%m-%d %H:%M:%S");
+       /* open virtual connection */
+         if (! GDA_SERVER_PROVIDER_CLASS (parent_class)->open_connection (GDA_SERVER_PROVIDER (provider), cnc, params,
+@@ -577,7 +563,7 @@ gda_mdb_provider_get_database (GdaServer
+       if (!cdata)
+               return NULL;
+-      return (const gchar *) cdata->mdb->f->filename;
++      return (const gchar *) cdata->filename;
+ }
+ /*
+@@ -587,5 +573,6 @@ static void
+ gda_mdb_free_cnc_data (MdbConnectionData *cdata)
+ {
+       g_free (cdata->server_version);
++      g_free (cdata->filename);
+       g_free (cdata);
+ }
index e210673885d4efdc0be4b4851f2166d4a5067142..4ce62ecd51039fd0dca7e9f31bc7098cc32bbdb7 100644 (file)
@@ -22,7 +22,7 @@ Summary:      GNU Data Access library
 Summary(pl.UTF-8):     Biblioteka GNU Data Access
 Name:          libgda5
 Version:       5.2.10
-Release:       4
+Release:       5
 License:       LGPL v2+/GPL v2+
 Group:         Libraries
 Source0:       https://download.gnome.org/sources/libgda/5.2/libgda-%{version}.tar.xz
@@ -34,6 +34,7 @@ Patch3:               %{name}-db.patch
 Patch4:                %{name}-yelp.patch
 Patch5:                java-arch.patch
 Patch6:                java8.patch
+Patch7:                libgda-mdb1.0.patch
 Patch8:                %{name}-sqlite.patch
 URL:           https://www.gnome-db.org/
 %{?with_firebird:BuildRequires:        Firebird-devel}
@@ -64,7 +65,7 @@ BuildRequires:        libsoup-devel >= 2.24.0
 BuildRequires: libtool >= 2:2.2.6
 BuildRequires: libxml2-devel >= 1:2.6.26
 BuildRequires: libxslt-devel >= 1.1.17
-%{?with_mdb:BuildRequires:     mdbtools-devel >= 0.6-0.pre1.7}
+%{?with_mdb:BuildRequires:     mdbtools-devel >= 1.0}
 %{?with_mysql:BuildRequires:   mysql-devel}
 %{?with_ldap:BuildRequires:    openldap-devel}
 BuildRequires: openssl-devel
@@ -281,7 +282,7 @@ Summary:    GDA MDB provider
 Summary(pl.UTF-8):     Źródło danych MDB
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      mdbtools-libs >= 0.6
+Requires:      mdbtools-libs >= 1.0
 
 %description provider-mdb
 This package contains the GDA MDB provider.
@@ -398,6 +399,7 @@ Plik katalogu oraz ikony libgda dla Glade.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 %patch8 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
This page took 0.200943 seconds and 4 git commands to generate.