aboutsummaryrefslogtreecommitdiffstats
path: root/databases/mdbtools
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-04-16 00:26:37 +0800
committermarcus <marcus@FreeBSD.org>2003-04-16 00:26:37 +0800
commitdc3a8662214b45e5d2044aaa7d810bee863776b9 (patch)
tree1b0402b933513aca59e364d18b6c1b13c2f44ef4 /databases/mdbtools
parentdbefda9789b67ff0b4420bdd8c3f68129ff4e45e (diff)
downloadfreebsd-ports-gnome-dc3a8662214b45e5d2044aaa7d810bee863776b9.tar.gz
freebsd-ports-gnome-dc3a8662214b45e5d2044aaa7d810bee863776b9.tar.zst
freebsd-ports-gnome-dc3a8662214b45e5d2044aaa7d810bee863776b9.zip
Really fix this port. Make it depend on libgnomeui if present, and
conditionalize the plist accordingly. According to the mdbtools homepage, this port requires bison, so set things accordingly. Also, correct some gcc-3.x-isms that prevented proper GNOME compilation on -STABLE.
Diffstat (limited to 'databases/mdbtools')
-rw-r--r--databases/mdbtools/Makefile17
-rw-r--r--databases/mdbtools/files/patch-configure10
-rw-r--r--databases/mdbtools/files/patch-src_gmdb2_debug.c63
-rw-r--r--databases/mdbtools/files/patch-src_gmdb2_sql.c62
-rw-r--r--databases/mdbtools/files/patch-yacc7
-rw-r--r--databases/mdbtools/pkg-plist43
6 files changed, 187 insertions, 15 deletions
diff --git a/databases/mdbtools/Makefile b/databases/mdbtools/Makefile
index 4fd2f1618acc..e4169954389a 100644
--- a/databases/mdbtools/Makefile
+++ b/databases/mdbtools/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mdbtools
PORTVERSION= 0.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -26,8 +26,19 @@ INSTALLS_SHLIB= yes
DOCS= AUTHORS ChangeLog HACKING NEWS README TODO
MAN1= mdb-ver.1 mdb-tables.1 mdb-schema.1 mdb-sql.1 mdb-export.1
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_GNOME) || exists(${X11BASE}/libdata/pkgconfig/libgnomeui-2.0.pc)
+USE_X_PREFIX= yes
+USE_GNOME+= gnomeprefix gnomehack libgnomeui
+PLIST_SUB+= GNOME:=""
+PKGNAMESUFFIX= -gnome
+.else
+PLIST_SUB+= GNOME:="@comment "
+.endif
+
post-patch:
- ${REINPLACE_CMD} -e 's|$$(srcdir)/$$<|$$(srcdir)/$$>|g' ${WRKSRC}/doc/Makefile.in
+ @${REINPLACE_CMD} -e 's|$$(srcdir)/$$<|$$(srcdir)/$$>|g' ${WRKSRC}/doc/Makefile.in
.if !defined(NOPORTDOCS)
post-install:
@@ -37,4 +48,4 @@ post-install:
.endfor
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/mdbtools/files/patch-configure b/databases/mdbtools/files/patch-configure
new file mode 100644
index 000000000000..f195f07b43c6
--- /dev/null
+++ b/databases/mdbtools/files/patch-configure
@@ -0,0 +1,10 @@
+--- configure.orig Wed Dec 11 18:31:51 2002
++++ configure Thu Dec 12 12:07:17 2002
+@@ -7414,6 +7414,7 @@
+
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
diff --git a/databases/mdbtools/files/patch-src_gmdb2_debug.c b/databases/mdbtools/files/patch-src_gmdb2_debug.c
new file mode 100644
index 000000000000..7b04908f5399
--- /dev/null
+++ b/databases/mdbtools/files/patch-src_gmdb2_debug.c
@@ -0,0 +1,63 @@
+--- src/gmdb2/debug.c.orig Tue Apr 15 12:02:39 2003
++++ src/gmdb2/debug.c Tue Apr 15 12:05:13 2003
+@@ -354,6 +354,8 @@
+ GtkTextIter iter;
+ GtkTextView *textview;
+ GtkWidget *entry;
++ GtkWidget *tree;
++ GtkTreeView *store;
+ char pagestr[20];
+
+ textview = (GtkTextView *) glade_xml_get_widget (xml, "debug_textview");
+@@ -395,8 +397,8 @@
+ gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
+ gtk_text_buffer_insert(buffer,&iter,tbuf,strlen(tbuf));
+
+- GtkWidget *tree = glade_xml_get_widget(xml, "debug_treeview");
+- GtkTreeView *store = (GtkTreeView *) gtk_tree_view_get_model(GTK_TREE_VIEW(tree));
++ tree = glade_xml_get_widget(xml, "debug_treeview");
++ store = (GtkTreeView *) gtk_tree_view_get_model(GTK_TREE_VIEW(tree));
+
+ gmdb_debug_dissect(GTK_TREE_STORE(store), fbuf, 0, length);
+
+@@ -884,6 +886,11 @@
+ guint32 page;
+ GtkWidget *entry, *mi, *button, *debugwin;
+ gchar text[20];
++GtkWidget *tree;
++GtkTreeStore *store;
++GtkCellRenderer *renderer;
++GtkTreeViewColumn *column;
++GtkTreeSelection *select;
+ GladeXML *debugwin_xml;
+
+ /* load the interface */
+@@ -947,11 +954,10 @@
+ pango_font_description_from_string("Courier"));
+
+ /* set up treeview, libglade only gives us the empty widget */
+- GtkWidget *tree = glade_xml_get_widget(debugwin_xml, "debug_treeview");
+- GtkTreeStore *store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
++ tree = glade_xml_get_widget(debugwin_xml, "debug_treeview");
++ store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store));
+
+- GtkCellRenderer *renderer;
+ button = glade_xml_get_widget (debugwin_xml, "debug_button");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (gmdb_debug_display_cb), debugwin_xml);
+@@ -960,13 +966,12 @@
+ gtk_signal_connect (GTK_OBJECT (debugwin), "delete_event",
+ GTK_SIGNAL_FUNC (gmdb_debug_delete_cb), debugwin_xml);
+
+- GtkTreeViewColumn *column;
+ renderer = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes("Field",
+ renderer, "text", 0, NULL);
+ gtk_tree_view_append_column(GTK_TREE_VIEW (tree), column);
+
+- GtkTreeSelection *select =
++ select =
+ gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
+ gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+ g_signal_connect (G_OBJECT (select), "changed",
diff --git a/databases/mdbtools/files/patch-src_gmdb2_sql.c b/databases/mdbtools/files/patch-src_gmdb2_sql.c
new file mode 100644
index 000000000000..f78336a2a6fc
--- /dev/null
+++ b/databases/mdbtools/files/patch-src_gmdb2_sql.c
@@ -0,0 +1,62 @@
+--- src/gmdb2/sql.c.orig Tue Apr 15 12:05:45 2003
++++ src/gmdb2/sql.c Tue Apr 15 12:07:32 2003
+@@ -375,6 +375,7 @@
+ GType *gtypes;
+ GtkTreeIter iter;
+ GtkTreeViewColumn *column;
++GtkCellRenderer *renderer;
+ long row, maxrow;
+
+ /* stuff this query on the history */
+@@ -422,7 +423,6 @@
+
+ gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(store));
+
+- GtkCellRenderer *renderer;
+ renderer = gtk_cell_renderer_text_new();
+
+ for (i=0;i<sql->num_columns;i++) {
+@@ -464,6 +464,12 @@
+ GtkWidget *mi, *but, *combo;
+ GladeXML *sqlwin_xml;
+ GValue value = {0, };
++ GtkWidget *tree;
++ GtkTreeStore *store;
++ GtkCellRenderer *renderer;
++ GtkTreeViewColumn *column;
++ GtkTreeSelection *select;
++ GtkWidget *textview;
+
+ /* load the interface */
+ sqlwin_xml = glade_xml_new(GMDB_GLADEDIR "gmdb-sql.glade", NULL, NULL);
+@@ -537,18 +543,16 @@
+ G_CALLBACK (gmdb_sql_execute_cb), sqlwin_xml);
+
+ /* set up treeview, libglade only gives us the empty widget */
+- GtkWidget *tree = glade_xml_get_widget(sqlwin_xml, "sql_treeview");
+- GtkTreeStore *store = gtk_tree_store_new(1, G_TYPE_STRING);
++ tree = glade_xml_get_widget(sqlwin_xml, "sql_treeview");
++ store = gtk_tree_store_new(1, G_TYPE_STRING);
+ gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store));
+
+- GtkCellRenderer *renderer;
+- GtkTreeViewColumn *column;
+ renderer = gtk_cell_renderer_text_new();
+ column = gtk_tree_view_column_new_with_attributes("Name",
+ renderer, "text", 0, NULL);
+ gtk_tree_view_append_column(GTK_TREE_VIEW (tree), column);
+
+- GtkTreeSelection *select =
++ select =
+ gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
+ gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+ //g_signal_connect (G_OBJECT (select), "changed",
+@@ -557,7 +561,7 @@
+ /* populate first level of tree */
+ gmdb_sql_tree_populate(mdb, sqlwin_xml);
+
+- GtkWidget *textview = glade_xml_get_widget(sqlwin_xml, "sql_textview");
++ textview = glade_xml_get_widget(sqlwin_xml, "sql_textview");
+ src.target = "table";
+ src.flags = 0;
+ src.info = 1;
diff --git a/databases/mdbtools/files/patch-yacc b/databases/mdbtools/files/patch-yacc
deleted file mode 100644
index dca633647628..000000000000
--- a/databases/mdbtools/files/patch-yacc
+++ /dev/null
@@ -1,7 +0,0 @@
---- src/sql/Makefile.in Sat Jan 18 20:55:42 2003
-+++ src/sql/Makefile.in Tue Apr 15 12:13:04 2003
-@@ -99,3 +99,3 @@
- VERSION = @VERSION@
--YACC = bison -y -d
-+YACC = yacc -d
- am__include = @am__include@
diff --git a/databases/mdbtools/pkg-plist b/databases/mdbtools/pkg-plist
index 245eed5fb670..2135fb7ab818 100644
--- a/databases/mdbtools/pkg-plist
+++ b/databases/mdbtools/pkg-plist
@@ -1,3 +1,4 @@
+%%GNOME:%%bin/gmdb2
bin/mdb-array
bin/mdb-dump
bin/mdb-export
@@ -15,21 +16,53 @@ bin/prkkd
bin/prole
bin/prtable
bin/updrow
+include/gmdb.h
include/mdbodbc.h
include/mdbsql.h
include/mdbtools.h
-lib/libmdbsql.a
-lib/libmdbsql.la
-lib/libmdbsql.so
-lib/libmdbsql.so.0
lib/libmdb.a
-lib/libmdb.la
lib/libmdb.so
lib/libmdb.so.0
+lib/libmdbsql.a
+lib/libmdbsql.so
+lib/libmdbsql.so.0
%%PORTDOCS%%share/doc/mdbtools/AUTHORS
%%PORTDOCS%%share/doc/mdbtools/ChangeLog
%%PORTDOCS%%share/doc/mdbtools/HACKING
%%PORTDOCS%%share/doc/mdbtools/NEWS
%%PORTDOCS%%share/doc/mdbtools/README
%%PORTDOCS%%share/doc/mdbtools/TODO
+%%GNOME:%%share/gnome/gmdb/glade/code.xpm
+%%GNOME:%%share/gnome/gmdb/glade/debug.xpm
+%%GNOME:%%share/gnome/gmdb/glade/form_big.xpm
+%%GNOME:%%share/gnome/gmdb/glade/forms.xpm
+%%GNOME:%%share/gnome/gmdb/glade/gmdb-debug.glade
+%%GNOME:%%share/gnome/gmdb/glade/gmdb-export.glade
+%%GNOME:%%share/gnome/gmdb/glade/gmdb-prefs.glade
+%%GNOME:%%share/gnome/gmdb/glade/gmdb-props.glade
+%%GNOME:%%share/gnome/gmdb/glade/gmdb-schema.glade
+%%GNOME:%%share/gnome/gmdb/glade/gmdb-sql-file.glade
+%%GNOME:%%share/gnome/gmdb/glade/gmdb-sql.glade
+%%GNOME:%%share/gnome/gmdb/glade/gmdb.glade
+%%GNOME:%%share/gnome/gmdb/glade/logo.xpm
+%%GNOME:%%share/gnome/gmdb/glade/macro_big.xpm
+%%GNOME:%%share/gnome/gmdb/glade/macros.xpm
+%%GNOME:%%share/gnome/gmdb/glade/module_big.xpm
+%%GNOME:%%share/gnome/gmdb/glade/pk.xpm
+%%GNOME:%%share/gnome/gmdb/glade/query.xpm
+%%GNOME:%%share/gnome/gmdb/glade/query_big.xpm
+%%GNOME:%%share/gnome/gmdb/glade/report_big.xpm
+%%GNOME:%%share/gnome/gmdb/glade/reports.xpm
+%%GNOME:%%share/gnome/gmdb/glade/stock_export-16.png
+%%GNOME:%%share/gnome/gmdb/glade/stock_export.png
+%%GNOME:%%share/gnome/gmdb/glade/table.xpm
+%%GNOME:%%share/gnome/gmdb/glade/table_big.xpm
+%%GNOME:%%share/gnome/help/gmdb/C/figures/gmdb2_window.png
+%%GNOME:%%share/gnome/help/gmdb/C/gmdb.xml
+%%GNOME:%%share/gnome/help/gmdb/C/legal.xml
+%%GNOME:%%@dirrm share/gnome/help/gmdb/C/figures
+%%GNOME:%%@dirrm share/gnome/help/gmdb/C
+%%GNOME:%%@dirrm share/gnome/help/gmdb
+%%GNOME:%%@dirrm share/gnome/gmdb/glade
+%%GNOME:%%@dirrm share/gnome/gmdb
%%PORTDOCS%%@dirrm share/doc/mdbtools