[libgda/f15/master] libgda-sqlite: fix sqlite loading (RHBZ #679291)
Haïkel Guémar
hguemar at fedoraproject.org
Fri Feb 25 10:46:19 UTC 2011
commit 0fb7b84f7dfe208db5e7955ce420b1241543876c
Author: Haikel Guemar <hguemar at fedoraproject.org>
Date: Fri Feb 25 11:44:01 2011 +0100
libgda-sqlite: fix sqlite loading (RHBZ #679291)
libgda-4.2.4-sqlite3.patch | 27 +++++++++++++++++++++++++++
libgda.spec | 8 +++++++-
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/libgda-4.2.4-sqlite3.patch b/libgda-4.2.4-sqlite3.patch
new file mode 100644
index 0000000..d6a151e
--- /dev/null
+++ b/libgda-4.2.4-sqlite3.patch
@@ -0,0 +1,27 @@
+diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
+index ebc0f93..58a6d88 100644
+--- a/libgda/sqlite/gda-sqlite-provider.c
++++ b/libgda/sqlite/gda-sqlite-provider.c
+@@ -548,6 +548,7 @@ GType
+ gda_sqlite_provider_get_type (void)
+ {
+ static GType type = 0;
++ int i = 0;
+
+ if (G_UNLIKELY (type == 0)) {
+ static GStaticMutex registering = G_STATIC_MUTEX_INIT;
+@@ -574,6 +575,14 @@ gda_sqlite_provider_get_type (void)
+ GModule *module2;
+
+ module2 = find_sqlite_library ("libsqlite3");
++ // fallback to common versionned libsqlite3
++ if (!module2) {
++ // think ahead, we might have to handle much more versions later
++ const gchar *sonames[] = { "libsqlite3.so.0", NULL };
++ for (i = 0; (sonames[i] != NULL) && (module2 == NULL); ++i) {
++ module2 = find_sqlite_library(sonames[i]);
++ }
++ }
+ if (module2)
+ load_symbols (module2);
+ if (s3r)
diff --git a/libgda.spec b/libgda.spec
index ca1a37f..defaeb3 100644
--- a/libgda.spec
+++ b/libgda.spec
@@ -20,7 +20,7 @@
Name: libgda
Epoch: 1
Version: 4.2.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Library for writing gnome database programs
Group: System Environment/Libraries
License: LGPLv2+
@@ -28,6 +28,7 @@ URL: http://www.gnome-db.org/
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/4.0/%{name}-%{version}.tar.bz2
Patch1: libgda-3.0.0-man.patch
Patch2: libgda-3.99.8-lib64.patch
+Patch3: libgda-4.2.4-sqlite3.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig >= 0.8
BuildRequires: glib2-devel >= 2.16
@@ -127,6 +128,7 @@ This package provides libgda graphical tools.
Summary: SQLite provider for libgda
Group: System Environment/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: sqlite%{?_isa} >= 3.6.O
Obsoletes: gda-sqlite < %{epoch}:%{version}-%{release}
Provides: gda-sqlite = %{epoch}:%{version}-%{release}
%description sqlite
@@ -250,6 +252,7 @@ This package includes the pkgconfig file for the libgda Java JDBC provider.
%setup -q
%patch1 -p1 -b .man
%patch2 -p1 -b .lib64
+%patch3 -p1 -b .sqlite3
# need to reconfigure autotools scripts against newer toolchain
#autoreconf -fi
@@ -476,6 +479,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Feb 22 2011 Haïkel Guémar <hguemar at fedoraproject.org> - 1:4.2.4-2
+- fix sqlite loading (RHBZ #673809)
+
* Thu Feb 17 2011 Haïkel Guémar <hguemar at fedoraproject.org> - 1:4.2.4-1
- upstream 4.2.4
More information about the scm-commits
mailing list