From 730bf83a04acbf8dca5fb55085d45d1eaf4a422b Mon Sep 17 00:00:00 2001 From: wilfried Date: Sat, 10 Aug 2002 20:10:24 +0000 Subject: [PATCH] update to use new fltk --- databases/mysqlgui/Makefile | 9 ++- databases/mysqlgui/patches/patch-FL_editor_h | 12 ++++ .../mysqlgui/patches/patch-Fl_NSlider_cc | 11 ++++ databases/mysqlgui/patches/patch-Makefile | 8 +-- databases/mysqlgui/patches/patch-do_sql_cc | 20 ++++++ databases/mysqlgui/patches/patch-get_table_cc | 17 ++++- databases/mysqlgui/patches/patch-gif_cc | 16 +++++ databases/mysqlgui/patches/patch-main_cc | 63 +++++++++++++++++-- databases/mysqlgui/patches/patch-password_cc | 14 +++++ 9 files changed, 154 insertions(+), 16 deletions(-) create mode 100644 databases/mysqlgui/patches/patch-FL_editor_h create mode 100644 databases/mysqlgui/patches/patch-Fl_NSlider_cc create mode 100644 databases/mysqlgui/patches/patch-do_sql_cc create mode 100644 databases/mysqlgui/patches/patch-gif_cc create mode 100644 databases/mysqlgui/patches/patch-password_cc diff --git a/databases/mysqlgui/Makefile b/databases/mysqlgui/Makefile index e708f1be898..fe41e7da726 100644 --- a/databases/mysqlgui/Makefile +++ b/databases/mysqlgui/Makefile @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile,v 1.11 2002/03/21 20:46:24 espie Exp $ +# $OpenBSD: Makefile,v 1.12 2002/08/10 20:10:24 wilfried Exp $ COMMENT= "graphical sql client for MySQL" DISTNAME= mysqlgui-1.7.5 CATEGORIES= databases -NEED_VERSION= 1.515 HOMEPAGE= http://www.mysql.com/downloads/gui-mysqlgui.html @@ -26,10 +25,10 @@ PATCHFILES= single.cc:0 MODULES= gettext BUILD_DEPENDS= :flvw->=1.0:x11/flvw LIB_DEPENDS= jpeg.62::graphics/jpeg \ - fltk::x11/fltk \ - fleditor::x11/fleditor \ + fltk.1::x11/fltk \ + fleditor.2::x11/fleditor \ lib/mysql/mysqlclient.10:mysql-client-3.23.*:databases/mysql \ - sqlplus::devel/mysql++ + sqlplus.1::devel/mysql++ USE_X11= Yes NO_REGRESS= Yes diff --git a/databases/mysqlgui/patches/patch-FL_editor_h b/databases/mysqlgui/patches/patch-FL_editor_h new file mode 100644 index 00000000000..8d466c13229 --- /dev/null +++ b/databases/mysqlgui/patches/patch-FL_editor_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-FL_editor_h,v 1.1 2002/08/10 20:10:24 wilfried Exp $ +--- FL/editor.h.orig Wed Apr 11 21:12:19 2001 ++++ FL/editor.h Fri Aug 9 16:38:48 2002 +@@ -8,7 +8,7 @@ + #include + #include + #include +- ++#undef Status + + // + // Here are the commands that the editor engine understands. Most diff --git a/databases/mysqlgui/patches/patch-Fl_NSlider_cc b/databases/mysqlgui/patches/patch-Fl_NSlider_cc new file mode 100644 index 00000000000..f73fe464d06 --- /dev/null +++ b/databases/mysqlgui/patches/patch-Fl_NSlider_cc @@ -0,0 +1,11 @@ +$OpenBSD: patch-Fl_NSlider_cc,v 1.1 2002/08/10 20:10:24 wilfried Exp $ +--- Fl_NSlider.cc.orig Wed Apr 11 21:12:20 2001 ++++ Fl_NSlider.cc Fri Aug 9 16:17:48 2002 +@@ -8,6 +8,7 @@ + * made about the suitability of this software for any purpose. It is + * provided "as is" without express or implied warranty. + */ ++#include + #include + + static uchar isHoz = 0; //for image draw setup diff --git a/databases/mysqlgui/patches/patch-Makefile b/databases/mysqlgui/patches/patch-Makefile index c8eee06e59c..1658562f210 100644 --- a/databases/mysqlgui/patches/patch-Makefile +++ b/databases/mysqlgui/patches/patch-Makefile @@ -1,6 +1,6 @@ -$OpenBSD: patch-Makefile,v 1.2 2001/04/20 09:40:53 wilfried Exp $ +$OpenBSD: patch-Makefile,v 1.3 2002/08/10 20:10:24 wilfried Exp $ --- Makefile.orig Wed Apr 11 21:12:20 2001 -+++ Makefile Fri Apr 20 11:32:59 2001 ++++ Makefile Fri Aug 9 16:48:29 2002 @@ -1,27 +1,14 @@ # --------------------- M a c r o s ------------------------------- -CC = gcc @@ -13,8 +13,8 @@ $OpenBSD: patch-Makefile,v 1.2 2001/04/20 09:40:53 wilfried Exp $ -LIBS = -L. -L/usr/X11R6/lib -lrcl -lrcledit -lsqlplus /usr/local/lib/mysql/libmysqlclient.a -lm -lflvw -lfltk -lXext -ljpeg -#LIBS = -L. -L/usr/X11R6/lib -lrcl -lrcledit /home/Sinisa/guiclient/libsqlplus.a /usr/local/lib/mysql/libmysqlclient.a -lfltk /usr/X11R6/lib/libXext.a /usr/X11R6/lib/libX11.a /usr/lib/libstdc++.a /usr/lib/libm.a /usr/lib/libc.a xx.o -OBJS = edfile.o about.o db_tree.o Fl_NSlider.o getvars.o qsort.o queries.o bebac.o main.o do_sql.o tables.o dodatni.o status.o process.o grant.o password.o get_table.o admin.o single.o zoom.o sin_jpeg.o jmemsrc.o options.o Fl_File_Dialog.o Fl_Dir.o Fl_Input_File.o Fl_Toggle_Tree.o Fl_Toggle_Node.o Fl_Toggle_Tree_Base.o Fl_Toggle_Node_Base.o Animated_Icon.o Fl_Help.o Fl_Envelope.o Fl_Envelope_Scroll.o Selection.o gif.o -+CFLAGS += -I. -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql++ -I${LOCALBASE}/include/mysql -+LIBS = -L${X11BASE}/lib -L${LOCALBASE}/lib -L${LOCALBASE}/lib/mysql -lfleditor -lsqlplus -lmysqlclient -lflvw -lfltk -lintl -ljpeg -lXext -lX11 -lz -lm ++CFLAGS += -I. -DFLTK_1_0_COMPAT -I${X11BASE}/include -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql++ -I${LOCALBASE}/include/mysql ++LIBS = -L${X11BASE}/lib -L${LOCALBASE}/lib -L${LOCALBASE}/lib/mysql -lfleditor -lsqlplus -lmysqlclient -lfltk -lfltk_images -lflvw -lintl -ljpeg -lXext -lX11 -lz -lm +OBJS = about.o db_tree.o Fl_NSlider.o getvars.o qsort.o queries.o bebac.o main.o do_sql.o tables.o dodatni.o status.o process.o grant.o password.o get_table.o admin.o single.o zoom.o sin_jpeg.o jmemsrc.o options.o Fl_File_Dialog.o Fl_Dir.o Fl_Input_File.o Fl_Toggle_Tree.o Fl_Toggle_Node.o Fl_Toggle_Tree_Base.o Fl_Toggle_Node_Base.o Animated_Icon.o Fl_Help.o Fl_Envelope.o Fl_Envelope_Scroll.o Selection.o gif.o # -------------------- R u l e s --------------------------------- diff --git a/databases/mysqlgui/patches/patch-do_sql_cc b/databases/mysqlgui/patches/patch-do_sql_cc new file mode 100644 index 00000000000..18749e1c430 --- /dev/null +++ b/databases/mysqlgui/patches/patch-do_sql_cc @@ -0,0 +1,20 @@ +$OpenBSD: patch-do_sql_cc,v 1.1 2002/08/10 20:10:24 wilfried Exp $ +--- do_sql.cc.orig Wed Apr 11 21:12:19 2001 ++++ do_sql.cc Fri Aug 9 16:21:46 2002 +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + #include "bebac.h" + #include + #include +@@ -349,7 +350,7 @@ public: + Sinisa_je_blesav *s = (Sinisa_je_blesav *)p; + int i = fl_file_dialog("Save Results",file_name,Fl_File_Dialog::APPEND | Fl_File_Dialog::SAVEMODE | Fl_File_Dialog::MESSAGES,0,0); how_to_open=(i>1000) ? ios::app : ios::trunc; + if (!file_name[0] || !i) return; +- if (strcmp(filename_ext(file_name),".res")) filename_setext(file_name,".res"); ++ if (strcmp(fl_filename_ext(file_name),".res")) fl_filename_setext(file_name,".res"); + do_save_file(s->sql); + } + diff --git a/databases/mysqlgui/patches/patch-get_table_cc b/databases/mysqlgui/patches/patch-get_table_cc index 85bc8d34d27..3a3f22dfef1 100644 --- a/databases/mysqlgui/patches/patch-get_table_cc +++ b/databases/mysqlgui/patches/patch-get_table_cc @@ -1,6 +1,17 @@ -$OpenBSD: patch-get_table_cc,v 1.1.1.1 2001/04/02 15:14:52 wilfried Exp $ ---- get_table.cc.orig Wed Dec 27 13:45:04 2000 -+++ get_table.cc Sat Feb 10 19:20:31 2001 +$OpenBSD: patch-get_table_cc,v 1.2 2002/08/10 20:10:24 wilfried Exp $ +--- get_table.cc.orig Wed Apr 11 21:12:25 2001 ++++ get_table.cc Fri Aug 9 16:37:28 2002 +@@ -1,9 +1,9 @@ + // generated by Fast Light User Interface Designer (fluid) version 1.00 + #include + #include "get_table.h" +-#include + #include "client.h" + #include ++#include + extern char *image_mysql_do_sql[]; extern char *pass; + + static Fl_Pixmap pixmap_mysql_do_sql(image_mysql_do_sql); @@ -12,7 +12,7 @@ class Tables { Fl_Window *password; Fl_Menu_Item *korisnici; vector tables; diff --git a/databases/mysqlgui/patches/patch-gif_cc b/databases/mysqlgui/patches/patch-gif_cc new file mode 100644 index 00000000000..4155c5febe7 --- /dev/null +++ b/databases/mysqlgui/patches/patch-gif_cc @@ -0,0 +1,16 @@ +$OpenBSD: patch-gif_cc,v 1.1 2002/08/10 20:10:24 wilfried Exp $ +--- gif.cc.orig Wed Apr 11 21:12:24 2001 ++++ gif.cc Fri Aug 9 16:44:13 2002 +@@ -107,12 +107,6 @@ public: + box(FL_NO_BOX); end(); show(); + } + ~gif_window () { +- if (p && p->data) { +- char** real_data = (char**)(p->data); +- for (int i = 0; i < 3; i++) delete[] real_data[i]; +- delete[] real_data; +- p->data = 0; delete p; p = 0; +- } + if (linelength) free((void*)linelength); + } + }; diff --git a/databases/mysqlgui/patches/patch-main_cc b/databases/mysqlgui/patches/patch-main_cc index 9d3a97fedf6..9929fc960ef 100644 --- a/databases/mysqlgui/patches/patch-main_cc +++ b/databases/mysqlgui/patches/patch-main_cc @@ -1,7 +1,42 @@ -$OpenBSD: patch-main_cc,v 1.1 2001/06/08 08:55:21 wilfried Exp $ +$OpenBSD: patch-main_cc,v 1.2 2002/08/10 20:10:24 wilfried Exp $ --- main.cc.orig Wed Apr 11 21:12:20 2001 -+++ main.cc Fri Jun 8 10:29:21 2001 -@@ -461,7 +461,7 @@ void if_disconn (void) { ++++ main.cc Fri Aug 9 16:20:56 2002 +@@ -15,6 +15,7 @@ + #define koliko 1 + #endif + #include ++#include + extern "C" { + char *intern_filename(char *,const char *); extern char *home_dir; + char *fn_format(char *to,const char *name,const char *dsk,const char *form,int flag); +@@ -134,7 +135,7 @@ static void recurse (string &s, Fl_Menu_ + path += (string)de->d_name; + if ( !stat ( path.c_str(), &sb ) ) { + if (sb.st_mode & S_IRUSR){ +- if ((filename_isdir(path.c_str()) && ( sb.st_mode & S_IXUSR)) || (!strcmp(filename_ext(path.c_str()),".sql"))) ++ if ((fl_filename_isdir(path.c_str()) && ( sb.st_mode & S_IXUSR)) || (!strcmp(fl_filename_ext(path.c_str()),".sql"))) + total_menu_length++; + } + } +@@ -148,7 +149,7 @@ static void recurse (string &s, Fl_Menu_ + if (((string)de->d_name == (string)".") || ((string)de->d_name == (string)"..")) continue; + path+=de->d_name; + if ( !stat ( path.c_str(), &sb ) ) { +- if (filename_isdir(path.c_str()) && ( sb.st_mode & S_IXUSR)) { ++ if (fl_filename_isdir(path.c_str()) && ( sb.st_mode & S_IXUSR)) { + Fl_Menu_Item *xx=(Fl_Menu_Item *)0; + recurse(path,&xx); + stringovi.insert(stringovi.end(),path); +@@ -156,7 +157,7 @@ static void recurse (string &s, Fl_Menu_ + xx = new Fl_Menu_Item[2]; memset (xx,0,sizeof(Fl_Menu_Item)*2); xx[0].text = "empty"; xx[1].text=NULL; + } + stringovi.insert(stringovi.end(),(string) de->d_name); (*ord_menu)[i].text =stringovi[stringovi.size()-1].c_str(); (*ord_menu)[i].flags = FL_MENU_DIVIDER | FL_SUBMENU_POINTER; (*ord_menu)[i].user_data_=(void *)xx; i++; +- } else if ((sb.st_mode & S_IRUSR) && (!strcmp(filename_ext(path.c_str()),".sql"))) { ++ } else if ((sb.st_mode & S_IRUSR) && (!strcmp(fl_filename_ext(path.c_str()),".sql"))) { + #ifdef _WIN32 + FILE *fd = fopen(path.c_str(),"r"); + if (fd) { +@@ -461,7 +462,7 @@ void if_disconn (void) { } static void if_conn (void) { @@ -10,7 +45,7 @@ $OpenBSD: patch-main_cc,v 1.1 2001/06/08 08:55:21 wilfried Exp $ try { Query query = con->query(); if (ldb) {ddd=(string)ldb; ldb=(char*)ddd.c_str();} query << "show databases"; -@@ -526,7 +526,7 @@ static void if_conn (void) { +@@ -526,7 +527,7 @@ static void if_conn (void) { tables.insert(tables.end(),xx); } qSortHelp (0, (size_t) tables.size(), Fcmp, Exchange); @@ -19,3 +54,23 @@ $OpenBSD: patch-main_cc,v 1.1 2001/06/08 08:55:21 wilfried Exp $ b_connect->set(); down_group->activate(); query_browser->activate(); if (databases.size()) choice_db->activate(); choice_db->redraw(); ; if (query_menus) hier->activate(); +@@ -722,8 +723,8 @@ void insert_command (Fl_Widget *w, void + void save_query(Fl_Button *ssw,void *ssp) { + char Ime[256]; Ime[0]=0; + int i = fl_file_dialog("Save Query",Ime,Fl_File_Dialog::SAVEMODE | Fl_File_Dialog::MESSAGES,0,0); if (!i) { s_fl_message("You gave up!"); return;} Trim(Ime); +- if (!Ime[0] || filename_isdir(Ime)) {s_fl_alert("You have to supply file name !!!!!!!\n"); return;} +- if (strcmp(filename_ext(Ime),".sql")) filename_setext(Ime,".sql"); ++ if (!Ime[0] || fl_filename_isdir(Ime)) {s_fl_alert("You have to supply file name !!!!!!!\n"); return;} ++ if (strcmp(fl_filename_ext(Ime),".sql")) fl_filename_setext(Ime,".sql"); + string dir(Ime), query(sql_command->value()); strip(query); strip(dir); + if (!query.length()) {s_fl_alert("We do not save empty queries !!!!!!!\n"); return;} + #ifdef _WIN32 +@@ -921,7 +922,7 @@ void get_results(Fl_Button *, void *) { + case TO_SCREEN: if (commands29->value()) editing_stuff(real_sql.c_str()); else do_sql(); s_fl_message(con->info().c_str()); s_fl_message("\n"); break; + case TO_FILE: {i = fl_file_dialog("Save Results",file_name,Fl_File_Dialog::APPEND | Fl_File_Dialog::SAVEMODE | Fl_File_Dialog::MESSAGES,0,0); if (!file_name[0] || !i) break; + how_to_open=(i>1000) ? ios::app : ios::trunc; +- if (strcmp(filename_ext(file_name),".res")) filename_setext(file_name,".res"); ++ if (strcmp(fl_filename_ext(file_name),".res")) fl_filename_setext(file_name,".res"); + Fl_Cursor cursor = Fl_Cursor(FL_CURSOR_WAIT); fl_cursor(cursor); do_save_file(real_sql); cursor = Fl_Cursor(FL_CURSOR_DEFAULT); fl_cursor(cursor); + s_fl_message(con->info().c_str()); } break; + case TO_COUNT: s_fl_message("Number of rows = %s",counts.c_str()); break; diff --git a/databases/mysqlgui/patches/patch-password_cc b/databases/mysqlgui/patches/patch-password_cc new file mode 100644 index 00000000000..f01d85d1911 --- /dev/null +++ b/databases/mysqlgui/patches/patch-password_cc @@ -0,0 +1,14 @@ +$OpenBSD: patch-password_cc,v 1.1 2002/08/10 20:10:24 wilfried Exp $ +--- password.cc.orig Wed Apr 11 21:12:25 2001 ++++ password.cc Fri Aug 9 16:37:01 2002 +@@ -1,9 +1,9 @@ + // generated by Fast Light User Interface Designer (fluid) version 1.00 + #include + #include "password.h" +-#include + #include "client.h" + #include ++#include + extern char *image_mysql_do_sql[]; extern char *pass; + + static Fl_Pixmap pixmap_mysql_do_sql(image_mysql_do_sql);