Modified MDB patch to make it work with mdbtools 0.5 and 0.6pre1 (bug #144554).
authorLeonardo Boshell <leonardop@gentoo.org>
Mon, 20 Nov 2006 22:33:27 +0000 (22:33 +0000)
committerLeonardo Boshell <leonardop@gentoo.org>
Mon, 20 Nov 2006 22:33:27 +0000 (22:33 +0000)
Package-Manager: portage-2.1.2_rc1-r7

gnome-extra/libgda/ChangeLog
gnome-extra/libgda/files/libgda-1.2.3-mdb_api.patch [new file with mode: 0644]
gnome-extra/libgda/libgda-1.2.3.ebuild

index 40d66c807c41c56c98275d971df9239ea7f0854b..1cb2ca4b9265424f6bafe846664e07e9c8612105 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for gnome-extra/libgda
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/ChangeLog,v 1.99 2006/09/05 20:48:34 tcort Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/ChangeLog,v 1.100 2006/11/20 22:33:27 leonardop Exp $
+
+  20 Nov 2006; Leonardo Boshell <leonardop@gentoo.org>
+  -files/libgda-1.2.1-mdb_fix.patch, +files/libgda-1.2.3-mdb_api.patch,
+  libgda-1.2.3.ebuild:
+  Modified MDB patch to make it work with mdbtools 0.5 and 0.6pre1 (bug
+  #144554).
 
   05 Sep 2006; Thomas Cort <tcort@gentoo.org> libgda-1.2.3.ebuild:
   Stable on alpha wrt Bug #142587.
diff --git a/gnome-extra/libgda/files/libgda-1.2.3-mdb_api.patch b/gnome-extra/libgda/files/libgda-1.2.3-mdb_api.patch
new file mode 100644 (file)
index 0000000..5ff920a
--- /dev/null
@@ -0,0 +1,34 @@
+diff -NurdB libgda-1.2.3/configure.in libgda-1.2.3-patched/configure.in
+--- libgda-1.2.3/configure.in  2005-10-27 04:18:24.000000000 -0500
++++ libgda-1.2.3-patched/configure.in  2006-11-20 16:51:29.000000000 -0500
+@@ -831,6 +831,15 @@
+               MDB_CFLAGS=-I${mdbdir}/include
+               MDB_LIBS="-L${mdbdir}/lib -lmdb -lmdbsql"
+               AC_DEFINE(HAVE_MDB, 1, [Have MDB])
++
++              AC_MSG_CHECKING(for MDB Tools version)
++              saved_CFLAGS="$CFLAGS"
++              CFLAGS="$LIBGDA_CFLAGS $MDB_CFLAGS"
++              AC_TRY_COMPILE([#include <mdbtools.h>],
++                      [MdbHandle *handle = mdb_open ("dummyfile");],
++                      AC_DEFINE(HAVE_MDB_05, 1, [Have mdbtools 0.5 API]) AC_MSG_RESULT([Using 0.5 API]),
++                      AC_MSG_RESULT([Using 0.6 API]))
++              CFLAGS="$saved_CFLAGS"
+       fi
+ fi
+diff -NurdB libgda-1.2.3/providers/mdb/gda-mdb-provider.c libgda-1.2.3-patched/providers/mdb/gda-mdb-provider.c
+--- libgda-1.2.3/providers/mdb/gda-mdb-provider.c      2004-12-28 08:26:11.000000000 -0500
++++ libgda-1.2.3-patched/providers/mdb/gda-mdb-provider.c      2006-11-20 15:56:25.000000000 -0500
+@@ -209,7 +209,11 @@
+       mdb_cnc = g_new0 (GdaMdbConnection, 1);
+       mdb_cnc->cnc = cnc;
+       mdb_cnc->server_version = NULL;
++#ifdef HAVE_MDB_05
++      mdb_cnc->mdb = mdb_open (filename);
++#else
+       mdb_cnc->mdb = mdb_open (filename, MDB_WRITABLE);
++#endif
+       if (!mdb_cnc->mdb) {
+               gda_connection_add_error_string (cnc, _("Could not open file %s"), filename);
+               g_free (mdb_cnc);
index ca78efb6b110bbdc8d71fdefcd32cbecfe9dcece..68558bf40d674d7cdac32e309245236fdc2d4ec9 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/libgda-1.2.3.ebuild,v 1.12 2006/09/05 20:48:34 tcort Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/libgda/libgda-1.2.3.ebuild,v 1.13 2006/11/20 22:33:27 leonardop Exp $
 
 inherit autotools eutils gnome2
 
@@ -66,7 +66,7 @@ src_unpack() {
        # Fix freetds API problems
        epatch "${FILESDIR}"/${P}-freetds_api_fixes.patch
        # Fix compilation of the mdb provider
-       epatch "${FILESDIR}"/${PN}-1.2.1-mdb_fix.patch
+       epatch "${FILESDIR}"/${P}-mdb_api.patch
 
        sed -n -e '/GTK_DOC_CHECK/,/IT_PROG_INTLTOOL/p' aclocal.m4 > gtk-doc.m4
        intltoolize --automake -c -f || die "intltoolize failed"