[packages/libgda5] - added mdb1.0 patch (adjust for mdbtools 1.0.x); release 5
qboosh
qboosh at pld-linux.org
Sun Feb 26 14:04:02 CET 2023
commit bc9b71de1562c5b8881912871288e2ef9b4b7bf2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Feb 26 14:05:43 2023 +0100
- added mdb1.0 patch (adjust for mdbtools 1.0.x); release 5
libgda-mdb1.0.patch | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++
libgda5.spec | 8 +++--
2 files changed, 93 insertions(+), 3 deletions(-)
---
diff --git a/libgda5.spec b/libgda5.spec
index e210673..4ce62ec 100644
--- a/libgda5.spec
+++ b/libgda5.spec
@@ -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},' \
diff --git a/libgda-mdb1.0.patch b/libgda-mdb1.0.patch
new file mode 100644
index 0000000..2ba556c
--- /dev/null
+++ b/libgda-mdb1.0.patch
@@ -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);
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libgda5.git/commitdiff/bc9b71de1562c5b8881912871288e2ef9b4b7bf2
More information about the pld-cvs-commit
mailing list