From d32528402994d540138ffdf8ab2f3c19191b6448 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Aug 16 2007 11:50:33 +0000 Subject: - Enable microsoft access (mdb) support now that mdbtools is in Fedora --- diff --git a/libgda-1.9.100-configure.patch b/libgda-1.9.100-configure.patch deleted file mode 100644 index 3cca824..0000000 --- a/libgda-1.9.100-configure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- libgda-1.3.4/configure.in.configure 2005-07-08 16:44:14.000000000 +0200 -+++ libgda-1.3.4/configure.in 2005-11-27 20:55:37.000000000 +0100 -@@ -250,9 +250,9 @@ - mysqldir="" - if test $try_mysql = true - then -- AC_PATH_PROG(MYSQL_CONFIG, mysql_config) -+ AC_PATH_PROG(MYSQL_CONFIG, mysql_config, 'no', [${libdir}/mysql3/mysql:$PATH]) - -- if test x$MYSQL_CONFIG = x; then -+ if test x$MYSQL_CONFIG = xno; then - AC_MSG_CHECKING(for MySQL files) - for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql - do diff --git a/libgda-3.0.1-detect-sqlite.patch b/libgda-3.0.1-detect-sqlite.patch index 61ef9b4..54b8924 100644 --- a/libgda-3.0.1-detect-sqlite.patch +++ b/libgda-3.0.1-detect-sqlite.patch @@ -13,3 +13,19 @@ diff -up libgda-3.0.1/configure.in~ libgda-3.0.1/configure.in then AC_MSG_RESULT(Version $realvers of SQLite does not implement required pragmas, using embedded SQLite) have_sqlite=no +diff -up libgda-3.0.1/configure.sqlite libgda-3.0.1/configure +--- libgda-3.0.1/configure.sqlite 2007-05-04 23:42:33.000000000 +0200 ++++ libgda-3.0.1/configure 2007-08-16 13:18:24.000000000 +0200 +@@ -24884,10 +24884,11 @@ fi + if test x"$have_sqlite" = "xyes" + then + realvers=`sqlite3 -version` ++ minorvers=`sqlite3 -version | cut -d '.' -f 2` + microvers=`sqlite3 -version | cut -d '.' -f 3` + { echo "$as_me:$LINENO: checking for sqlite version" >&5 + echo $ECHO_N "checking for sqlite version... $ECHO_C" >&6; } +- if test $microvers -lt 100 ++ if test $minorvers -lt 4 -a $microvers -lt 100 + then + { echo "$as_me:$LINENO: result: Version $realvers of SQLite does not implement required pragmas" >&5 + echo "${ECHO_T}Version $realvers of SQLite does not implement required pragmas" >&6; } diff --git a/libgda-3.0.1-mdb-64bit.patch b/libgda-3.0.1-mdb-64bit.patch new file mode 100644 index 0000000..293fe16 --- /dev/null +++ b/libgda-3.0.1-mdb-64bit.patch @@ -0,0 +1,20 @@ +diff -up libgda-3.0.1/providers/mdb/gda-mdb-table.c~ libgda-3.0.1/providers/mdb/gda-mdb-table.c +--- libgda-3.0.1/providers/mdb/gda-mdb-table.c~ 2007-08-16 13:36:34.000000000 +0200 ++++ libgda-3.0.1/providers/mdb/gda-mdb-table.c 2007-08-16 13:36:34.000000000 +0200 +@@ -23,6 +23,7 @@ + + #include "gda-mdb-table.h" + #include ++#include + + GdaDataModel * + gda_mdb_table_new (GdaMdbConnection *mdb_cnc, const gchar *name) +@@ -40,7 +41,7 @@ gda_mdb_table_new (GdaMdbConnection *mdb + for (i = 0; i < mdb_cnc->mdb->num_catalog; i++) { + entry = g_ptr_array_index (mdb_cnc->mdb->catalog, i); + if (entry->object_type == MDB_TABLE +- && !strcmp (entry->object_type, name)) ++ && !strcmp (entry->object_name, name)) + break; + else + entry = NULL; diff --git a/libgda.spec b/libgda.spec index 943ce85..3742a31 100644 --- a/libgda.spec +++ b/libgda.spec @@ -41,18 +41,17 @@ Group: System Environment/Libraries License: LGPLv2+ URL: http://www.gnome-db.org/ Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.0/%{name}-%{version}.tar.bz2 -Patch0: libgda-1.9.100-configure.patch Patch1: libgda-3.0.0-man.patch Patch2: libgda-3.0.1-ldap.patch Patch3: libgda-3.0.1-detect-sqlite.patch +Patch4: libgda-3.0.1-mdb-64bit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pkgconfig >= 0.8 BuildRequires: glib2-devel >= 2.0.0 BuildRequires: libxslt-devel >= 1.0.9 BuildRequires: sqlite-devel >= 3.4.0 -BuildRequires: libxml2-devel ncurses-devel readline-devel -BuildRequires: db4-devel gamin-devel gtk-doc scrollkeeper groff gettext -BuildRequires: flex bison intltool autoconf +BuildRequires: libxml2-devel readline-devel db4-devel gamin-devel +BuildRequires: gtk-doc scrollkeeper gettext flex bison perl(XML::Parser) # note we do not provide these, they no longer exist Obsoletes: %{name}-sharp < %{epoch}:%{version}-%{release} Obsoletes: %{name}-sharp-devel < %{epoch}:%{version}-%{release} @@ -62,7 +61,7 @@ BuildRequires: freetds-devel %endif %if %{MYSQL} -BuildRequires: mysqlclient10-devel +BuildRequires: mysql-devel %endif %if %{POSTGRES} @@ -291,19 +290,16 @@ This package includes the pkgconfig file for the libgda LDAP provider. %prep %setup -q -%patch0 -p1 -b .configure %patch1 -p1 -b .man %patch2 -p1 -b .ldap %patch3 -p1 -b .sqlite +%patch4 -p1 -b .64bit # fix ppc64 postgres detection sed -i 's/x86_64\* | sparc64\*) lib="lib64";;/x86_64\* | sparc64\* | powerpc64\*) lib="lib64";;/' \ configure.in -# there is no need to run aclocal or automake again, this only causes -# problems (like getting intltool 0.36 m4 code in configure, while using -# 0.30 .in files to generate intltool) +# stop autoxxx rerunning because of our patches above touch aclocal.m4 touch `find -name Makefile.in` -autoconf %build