From cc4507b505d7c30ba54c57f942a2634c3a0202ca Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 07:02:08 +0100 Subject: [PATCH] update to 0.7 [release 0.7-1mamba;Sun Mar 10 2013] --- README.md | 2 + mdbtools-0.6pre1-gcc4.patch | 13 ++++ mdbtools-0.6pre1-ooo.patch | 81 ++++++++++++++++++++++++ mdbtools.spec | 120 ++++++++++++++++++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 mdbtools-0.6pre1-gcc4.patch create mode 100644 mdbtools-0.6pre1-ooo.patch create mode 100644 mdbtools.spec diff --git a/README.md b/README.md index 0005496..41cb090 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # mdbtools +A set of utilities for reading Microsoft Access database (MDB) files. + diff --git a/mdbtools-0.6pre1-gcc4.patch b/mdbtools-0.6pre1-gcc4.patch new file mode 100644 index 0000000..1c1138d --- /dev/null +++ b/mdbtools-0.6pre1-gcc4.patch @@ -0,0 +1,13 @@ +diff -Nru mdbtools-0.6pre1.orig/include/mdbtools.h mdbtools-0.6pre1/include/mdbtools.h +--- mdbtools-0.6pre1.orig/include/mdbtools.h 2004-06-17 01:42:19.000000000 +0200 ++++ mdbtools-0.6pre1/include/mdbtools.h 2007-11-07 15:27:29.000000000 +0100 +@@ -146,9 +146,6 @@ + #define IS_JET4(mdb) (mdb->f->jet_version==MDB_VER_JET4) + #define IS_JET3(mdb) (mdb->f->jet_version==MDB_VER_JET3) + +-/* hash to store registered backends */ +-extern GHashTable *mdb_backends; +- + /* forward declarations */ + typedef struct mdbindex MdbIndex; + typedef struct mdbsargtree MdbSargNode; diff --git a/mdbtools-0.6pre1-ooo.patch b/mdbtools-0.6pre1-ooo.patch new file mode 100644 index 0000000..fc34722 --- /dev/null +++ b/mdbtools-0.6pre1-ooo.patch @@ -0,0 +1,81 @@ +diff -Nru mdbtools-0.6pre1.orig/src/gmdb2/gmdb.h mdbtools-0.6pre1/src/gmdb2/gmdb.h +--- mdbtools-0.6pre1.orig/src/gmdb2/gmdb.h 2004-02-11 23:04:26.000000000 +0100 ++++ mdbtools-0.6pre1/src/gmdb2/gmdb.h 2007-11-07 16:39:17.000000000 +0100 +@@ -24,6 +24,7 @@ + GtkWidget *gmdb_table_def_new(MdbCatalogEntry *entry); + GtkWidget *gmdb_table_export_new(MdbCatalogEntry *entry); + void gmdb_table_export(MdbCatalogEntry *entry) ; ++gchar *gmdb_export_get_filepath(GladeXML *xml); + + void gmdb_file_select_cb(GtkWidget *w, gpointer data); + void gmdb_file_open_cb(GtkWidget *w, gpointer data); +diff -Nru mdbtools-0.6pre1.orig/src/gmdb2/info.c mdbtools-0.6pre1/src/gmdb2/info.c +--- mdbtools-0.6pre1.orig/src/gmdb2/info.c 2003-01-12 23:59:42.000000000 +0100 ++++ mdbtools-0.6pre1/src/gmdb2/info.c 2007-11-07 16:37:20.000000000 +0100 +@@ -71,4 +71,7 @@ + gtk_label_set_text(GTK_LABEL(label), tmpstr); + + g_free(filepath); ++ // a hack to avoid warning: control reaches end of non-void function ++ // the return value is nowhere used anyway ++ return NULL; + } +diff -Nru mdbtools-0.6pre1.orig/src/gmdb2/table_export.c mdbtools-0.6pre1/src/gmdb2/table_export.c +--- mdbtools-0.6pre1.orig/src/gmdb2/table_export.c 2003-01-14 18:37:44.000000000 +0100 ++++ mdbtools-0.6pre1/src/gmdb2/table_export.c 2007-11-07 16:39:27.000000000 +0100 +@@ -49,6 +49,7 @@ + } + } + ++void + gmdb_export_get_delimiter(GladeXML *xml, gchar *delimiter, int max_buf) + { + GtkWidget *combo; +diff -Nru mdbtools-0.6pre1.orig/src/libmdb/backend.c mdbtools-0.6pre1/src/libmdb/backend.c +--- mdbtools-0.6pre1.orig/src/libmdb/backend.c 2004-06-11 15:56:41.000000000 +0200 ++++ mdbtools-0.6pre1/src/libmdb/backend.c 2007-11-07 16:37:20.000000000 +0100 +@@ -28,7 +28,7 @@ + #endif + + static int is_init; +-static GHashTable *mdb_backends; ++GHashTable *mdb_backends; + + /* Access data types */ + static MdbBackendType mdb_access_types[] = { +diff -Nru mdbtools-0.6pre1.orig/src/libmdb/index.c mdbtools-0.6pre1/src/libmdb/index.c +--- mdbtools-0.6pre1.orig/src/libmdb/index.c 2004-04-16 17:45:14.000000000 +0200 ++++ mdbtools-0.6pre1/src/libmdb/index.c 2007-11-07 16:37:20.000000000 +0100 +@@ -330,7 +330,7 @@ + { + int mask_bit = 0; + int mask_pos = 0x16; +- int mask_byte; ++ int mask_byte = 0; + int elem = 0; + int len, start, i; + +diff -Nru mdbtools-0.6pre1.orig/src/libmdb/kkd.c mdbtools-0.6pre1/src/libmdb/kkd.c +--- mdbtools-0.6pre1.orig/src/libmdb/kkd.c 2003-04-29 19:55:17.000000000 +0200 ++++ mdbtools-0.6pre1/src/libmdb/kkd.c 2007-11-07 16:37:20.000000000 +0100 +@@ -55,7 +55,7 @@ + + GHashTable *mdb_get_column_def(MdbCatalogEntry *entry, int start) + { +-GHashTable *hash; ++GHashTable *hash = NULL; + MdbHandle *mdb = entry->mdb; + MdbColumnProp prop; + int tmp, pos, col_num, val_len, i; +diff -Nru mdbtools-0.6pre1.orig/src/sql/mdbsql.c mdbtools-0.6pre1/src/sql/mdbsql.c +--- mdbtools-0.6pre1.orig/src/sql/mdbsql.c 2004-05-30 07:50:40.000000000 +0200 ++++ mdbtools-0.6pre1/src/sql/mdbsql.c 2007-11-07 16:40:25.000000000 +0100 +@@ -84,7 +84,7 @@ + return 1; + } + } +-int mdb_run_query(MdbSQL *sql, char *query) ++int mdb_sql_run_query(MdbSQL *sql, char *query) + { + if (_parse(sql,query) && sql->cur_table) { + mdb_sql_bind_all(sql); diff --git a/mdbtools.spec b/mdbtools.spec new file mode 100644 index 0000000..865ae8a --- /dev/null +++ b/mdbtools.spec @@ -0,0 +1,120 @@ +%define sourcever %(echo %version | cut -d. -f1-2) +Name: mdbtools +Version: 0.7 +Release: 1mamba +Summary: A set of utilities for reading Microsoft Access database (MDB) files +Group: System/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://mdbtools.sourceforge.net/ +#Source: http://mesh.dl.sourceforge.net/sourceforge/mdbtools/mdbtools-%{version}.tar.gz +Source: https://github.com/brianb/mdbtools/tarball/%{version}/mdbtools-%{version}.zip +Patch0: mdbtools-0.6pre1-gcc4.patch +Patch1: mdbtools-0.6pre1-ooo.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgdk-pixbuf-devel +BuildRequires: libglade-devel +BuildRequires: libglib-devel +BuildRequires: libgnome-devel +BuildRequires: libgnomeui-devel +BuildRequires: libgtk2-devel +BuildRequires: libltdl-devel +BuildRequires: libodbc-devel +BuildRequires: libpango-devel +BuildRequires: libreadline-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +A set of utilities for reading Microsoft Access database (MDB) files. + +%package -n libmdb +Summary: A set of libraries for reading Microsoft Access database (MDB) files +Group: System/Libraries + +%description -n libmdb +A set of libraries for reading Microsoft Access database (MDB) files. + +%package -n libmdb-devel +Summary: Devel package for %{name} +Group: Development/Libraries +Requires: libmdb = %{?epoch:%epoch:}%{version}-%{release} + +%description -n libmdb-devel +A set of libraries for reading Microsoft Access database (MDB) files. + +This package contains static libraries and header files need for development. + +%prep +%setup -q -c +mv brianb-mdbtools*/* . +sed -i "s|libtooloze|libtoolize|" autogen.sh + +%build +./autogen.sh +%configure --with-unixodbc=%{_prefix} +%make -j1 + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/gmdb2 +%{_bindir}/mdb-array +%{_bindir}/mdb-export +%{_bindir}/mdb-header +%{_bindir}/mdb-hexdump +%{_bindir}/mdb-parsecsv +%{_bindir}/mdb-prop +%{_bindir}/mdb-schema +%{_bindir}/mdb-sql +%{_bindir}/mdb-tables +%{_bindir}/mdb-ver +%{_datadir}/gmdb/* +%{_datadir}/gnome/help/gmdb/C/* +%{_mandir}/man1/gmdb2.1* +%{_mandir}/man1/mdb-*.1* +%doc COPYING + +%files -n libmdb +%defattr(-,root,root) +%{_libdir}/libmdbsql.so.* +%{_libdir}/libmdbodbc.so.* +%{_libdir}/libmdb.so.* +%doc AUTHORS COPYING.LIB + +%files -n libmdb-devel +%defattr(-,root,root) +%{_libdir}/libmdbsql.a +%{_libdir}/libmdbsql.la +%{_libdir}/libmdbsql.so +%{_libdir}/libmdbodbc.a +%{_libdir}/libmdbodbc.la +%{_libdir}/libmdbodbc.so +%{_libdir}/libmdb.a +%{_libdir}/libmdb.la +%{_libdir}/libmdb.so +%{_includedir}/*.h +%{_libdir}/pkgconfig/*.pc +%doc ChangeLog NEWS README TODO + +%changelog +* Sun Mar 10 2013 Silvan Calarco 0.7-1mamba +- update to 0.7 + +* Sat Jun 13 2009 Automatic Build System 0.6pre1.svn20090613-1mamba +- update to 0.6pre1.svn20090613 + +* Sat Jun 13 2009 Automatic Build System 0.6pre1-2mamba +- automatic rebuild by autodist + +* Wed Nov 07 2007 Silvan Calarco 0.6pre1-1mamba +- package created by autospec