rpms/bochs/devel bochs-wx26.patch,1.1,1.2 bochs.spec,1.12,1.13

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Thu Feb 16 19:46:09 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/bochs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14981

Modified Files:
	bochs-wx26.patch bochs.spec 
Log Message:
* Wed Feb 15 2006 Hans de Goede <j.w.r.degoede at hhs.nl> - 2.2.6-1
- New upstream version 2.2.6
- Remove --enable-pae as that requires a CPU level of 6 with the new version
- Remove a few configure switches which are identical to the
  upstream defaults and thus don't do anything
- Add --enable-clgd54xx
- Add --with-svga which adds support for svgalib as display
- Fix compile with wxGTK-2.6 and unconditionalize wxGTK build


bochs-wx26.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 bochs-wx26.patch
Index: bochs-wx26.patch
===================================================================
RCS file: /cvs/extras/rpms/bochs/devel/bochs-wx26.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- bochs-wx26.patch	15 Feb 2006 21:20:29 -0000	1.1
+++ bochs-wx26.patch	16 Feb 2006 19:46:09 -0000	1.2
@@ -1,19 +1,18 @@
-diff -ur bochs-2.2.6.orig/gui/wx.cc bochs-2.2.6/gui/wx.cc
---- bochs-2.2.6.orig/gui/wx.cc	2006-02-15 21:39:05.000000000 +0100
-+++ bochs-2.2.6/gui/wx.cc	2006-01-23 19:34:47.000000000 +0100
+--- bochs-2.2.6/gui/wx.cc.wx26	2006-01-23 19:34:47.000000000 +0100
++++ bochs-2.2.6/gui/wx.cc	2006-02-16 19:02:56.000000000 +0100
 @@ -189,12 +189,12 @@
    if (fromToolbar && first_enable && en) {
      // only show this help if you click on the toolbar.  If they already
      // know the shortcut, don't annoy them with the message.
--    wxString msg = wxT(
-+    wxString msg = 
+-    wxString msg = 
++    wxString msg = wxT(
        "You have enabled the mouse in Bochs, so now your mouse actions will\n"
        "be sent into the simulator.  The usual mouse cursor will be trapped\n"
        "inside the Bochs window until you press a CTRL key + the middle button\n"
--      "to turn mouse capture off.");
--    wxMessageBox(msg, wxT("Mouse Capture Enabled"), wxOK | wxICON_INFORMATION);
-+      "to turn mouse capture off.";
-+    wxMessageBox(msg, "Mouse Capture Enabled", wxOK | wxICON_INFORMATION);
+-      "to turn mouse capture off.";
+-    wxMessageBox(msg, "Mouse Capture Enabled", wxOK | wxICON_INFORMATION);
++      "to turn mouse capture off.");
++    wxMessageBox(msg, wxT("Mouse Capture Enabled"), wxOK | wxICON_INFORMATION);
      first_enable = false;
    }
    enable->set (en);
@@ -21,685 +20,1068 @@
          strcpy(status_text+1, statusitem_text[i]);
          theFrame->SetStatusText(status_text, i+1);
  #else
--        theFrame->SetStatusText(wxString(statusitem_text[i], wxConvUTF8), i+1);
-+        theFrame->SetStatusText(statusitem_text[i], i+1);
+-        theFrame->SetStatusText(statusitem_text[i], i+1);
++        theFrame->SetStatusText(wxString(statusitem_text[i], wxConvUTF8), i+1);
  #endif
        } else {
--        theFrame->SetStatusText(wxT(""), i+1);
-+        theFrame->SetStatusText("", i+1);
+-        theFrame->SetStatusText("", i+1);
++        theFrame->SetStatusText(wxT(""), i+1);
        }
      }
    } else if ((unsigned)element < statusitem_count) {
-@@ -1063,11 +1063,10 @@
+@@ -1063,10 +1063,11 @@
          strcpy(status_text+1, statusitem_text[element]);
          theFrame->SetStatusText(status_text, element+1);
  #else
--      theFrame->SetStatusText(wxString(statusitem_text[element], wxConvUTF8),
--        element+1);
-+      theFrame->SetStatusText(statusitem_text[element], element+1);
+-      theFrame->SetStatusText(statusitem_text[element], element+1);
++      theFrame->SetStatusText(wxString(statusitem_text[element], wxConvUTF8),
++        element+1);
  #endif
      } else {
--      theFrame->SetStatusText(wxT(""), element+1);
-+      theFrame->SetStatusText("", element+1);
+-      theFrame->SetStatusText("", element+1);
++      theFrame->SetStatusText(wxT(""), element+1);
      }
    }
  }
-@@ -1621,7 +1620,7 @@
+@@ -1599,7 +1600,7 @@
+       wxString str = data.GetText ();
+       int len = str.Len ();
+       Bit8u *buf = new Bit8u[len];
+-      memcpy (buf, str.c_str (), len);
++      memcpy (buf, str.mb_str(wxConvUTF8), len);
+       *bytes = buf;
+       *nbytes = len;
+       ret = 1;
+@@ -1620,7 +1621,7 @@
    wxMutexGuiEnter ();
    int ret = 0;
    if (wxTheClipboard->Open ()) {
--    wxString string (text_snapshot, wxConvUTF8, len);
-+    wxString string (text_snapshot, len);
+-    wxString string (text_snapshot, len);
++    wxString string (text_snapshot, wxConvUTF8, len);
      wxTheClipboard->SetData (new wxTextDataObject (string));
      wxTheClipboard->Close ();
      ret = 1;
-diff -ur bochs-2.2.6.orig/gui/wxdialog.cc bochs-2.2.6/gui/wxdialog.cc
---- bochs-2.2.6.orig/gui/wxdialog.cc	2006-02-15 22:26:03.000000000 +0100
-+++ bochs-2.2.6/gui/wxdialog.cc	2005-11-26 10:22:58.000000000 +0100
+--- bochs-2.2.6/gui/wxdialog.cc.wx26	2005-11-26 10:22:58.000000000 +0100
++++ bochs-2.2.6/gui/wxdialog.cc	2006-02-16 20:27:56.000000000 +0100
 @@ -80,12 +80,12 @@
  {
    for (int i=0; i<N_BUTTONS; i++) enabled[i] = TRUE;
    vertSizer = new wxBoxSizer(wxVERTICAL);
--  context = new wxStaticText (this, -1, wxT(""));
-+  context = new wxStaticText (this, -1, "");
+-  context = new wxStaticText (this, -1, "");
++  context = new wxStaticText (this, -1, wxT(""));
    wxFont font = context->GetFont ();
    font.SetWeight (wxBOLD);
    font.SetPointSize (2 + font.GetPointSize ());
    context->SetFont (font);
--  message = new wxStaticText (this, -1, wxT(""));
-+  message = new wxStaticText (this, -1, "");
+-  message = new wxStaticText (this, -1, "");
++  message = new wxStaticText (this, -1, wxT(""));
    message->SetFont (font);
    dontAsk = new wxCheckBox (this, -1, LOG_MSG_DONT_ASK_STRING);
    btnSizer = new wxBoxSizer(wxHORIZONTAL);
-@@ -120,12 +120,12 @@
+@@ -99,33 +99,29 @@
+ }
+ 
+ void LogMsgAskDialog::SetContext (wxString s) {
+-  wxString text;
+-  text.Printf (LOG_MSG_CONTEXT, s.c_str ());
+-  ChangeStaticText (vertSizer, context, text);
++  ChangeStaticText (vertSizer, context, wxString(LOG_MSG_CONTEXT) + s);
+ }
+ 
+ void LogMsgAskDialog::SetMessage (wxString s) {
+-  wxString text;
+-  text.Printf (LOG_MSG_MSG, s.c_str ());
+-  ChangeStaticText (vertSizer, message, text);
++  ChangeStaticText (vertSizer, context, wxString(LOG_MSG_MSG) + s);
+ }
+ 
+ void LogMsgAskDialog::Init ()
+ {
+   static const int ids[N_BUTTONS] = LOG_MSG_ASK_IDS;
+-  static const char *names[N_BUTTONS] = LOG_MSG_ASK_NAMES;
++  static const wxString names[N_BUTTONS] = LOG_MSG_ASK_NAMES;
+   for (int i=0; i<N_BUTTONS; i++) {
+     if (!enabled[i]) continue;
+     wxButton *btn = new wxButton (this, ids[i], names[i]);
      btnSizer->Add (btn, 1, wxALL, 5);
    }
    wxSize ms = message->GetSize ();
--  wxLogMessage (wxT("message size is %d,%d"), ms.GetWidth(), ms.GetHeight ());
-+  wxLogMessage ("message size is %d,%d", ms.GetWidth(), ms.GetHeight ());
+-  wxLogMessage ("message size is %d,%d", ms.GetWidth(), ms.GetHeight ());
++  // wxLogMessage (wxT("message size is %d,%d"), ms.GetWidth(), ms.GetHeight ());
    SetAutoLayout(TRUE);
    SetSizer(vertSizer);
    vertSizer->Fit (this);
    wxSize size = vertSizer->GetMinSize ();
--  wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
-+  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
+-  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
++  // wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
    int margin = 10;
    SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin);
    Center ();
-@@ -147,7 +147,7 @@
+@@ -147,7 +143,7 @@
      default:
        return;  // without EndModal
    }
--  wxLogMessage (wxT("you pressed button id=%d, return value=%d"), id, ret);
-+  wxLogMessage ("you pressed button id=%d, return value=%d", id, ret);
+-  wxLogMessage ("you pressed button id=%d, return value=%d", id, ret);
++  // wxLogMessage (wxT("you pressed button id=%d, return value=%d"), id, ret);
    EndModal (ret);
  }
  
-@@ -191,7 +191,7 @@
+@@ -191,7 +187,7 @@
  FloppyConfigDialog::FloppyConfigDialog(
      wxWindow* parent,
      wxWindowID id)
--  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
-+  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
+-  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
++  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
      wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
  {
    validate = NULL;
-@@ -216,19 +216,19 @@
+@@ -216,19 +212,19 @@
    capacitySizer->Add (captext, 0, wxALL, 5);
    capacitySizer->Add (capacity, 0, wxALL|wxADJUST_MINSIZE, 5);
    // contents of buttonSizer
--  btn = new wxButton (this, wxID_HELP, wxT("Help"));
-+  btn = new wxButton (this, wxID_HELP, "Help");
+-  btn = new wxButton (this, wxID_HELP, "Help");
++  btn = new wxButton (this, wxID_HELP, wxT("Help"));
    buttonSizer->Add (btn, 0, wxALL, 5);
    // use wxID_CANCEL because pressing ESC produces this same code
--  btn = new wxButton (this, wxID_CANCEL, wxT("Cancel"));
-+  btn = new wxButton (this, wxID_CANCEL, "Cancel");
+-  btn = new wxButton (this, wxID_CANCEL, "Cancel");
[...2384 lines suppressed...]
    sim2gui_mailbox = event;
  }
-@@ -1522,7 +1522,7 @@
+@@ -1522,7 +1530,7 @@
  safeWxStrcpy (char *dest, wxString src, int destlen)
  {
    wxString tmp (src);
--  strncpy (dest, (char *)tmp.c_str (), destlen);
-+  strncpy (dest, tmp.c_str (), destlen);
+-  strncpy (dest, tmp.c_str (), destlen);
++  strncpy (dest, tmp.mb_str(wxConvUTF8), destlen);
    dest[destlen-1] = 0;
  }
  
-diff -ur bochs-2.2.6.orig/gui/wxmain.h bochs-2.2.6/gui/wxmain.h
---- bochs-2.2.6.orig/gui/wxmain.h	2006-02-15 21:31:32.000000000 +0100
-+++ bochs-2.2.6/gui/wxmain.h	2005-11-24 19:51:55.000000000 +0100
+--- bochs-2.2.6/gui/wxmain.h.wx26	2005-11-24 19:51:55.000000000 +0100
++++ bochs-2.2.6/gui/wxmain.h	2006-02-16 19:02:56.000000000 +0100
 @@ -135,7 +135,7 @@
    bx_bool fillBxKeyEvent_MSW (wxKeyEvent& event, BxKeyEvent& bxev, bx_bool release);
    bx_bool fillBxKeyEvent_GTK (wxKeyEvent& event, BxKeyEvent& bxev, bx_bool release);
  public:
--  MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
-+  MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "panel");
+-  MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "panel");
++  MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
    ~MyPanel();
    void OnKeyDown(wxKeyEvent& event);
    void OnKeyUp(wxKeyEvent& event);
+--- bochs-2.2.6/gui/siminterface.h.wx26	2006-01-18 19:35:37.000000000 +0100
++++ bochs-2.2.6/gui/siminterface.h	2006-02-16 19:02:56.000000000 +0100
+@@ -1100,7 +1100,7 @@
+ #endif
+ };
+ 
+-typedef char* (*param_string_event_handler)(class bx_param_string_c *, int set, char *val, int maxlen);
++typedef const char* (*param_string_event_handler)(class bx_param_string_c *, int set, const char *val, int maxlen);
+ 
+ class BOCHSAPI bx_param_string_c : public bx_param_c {
+   int maxsize;
+@@ -1129,7 +1129,7 @@
+   virtual void set_enabled (int enabled);
+   Bit32s get (char *buf, int len);
+   char *getptr () {return val; }
+-  void set (char *buf);
++  void set (const char *buf);
+   bx_bool equals (const char *buf);
+   bx_param_num_c *get_options () { return options; }
+   void set_separator (char sep) {separator = sep; }
+@@ -1439,8 +1439,8 @@
+   virtual int get_exit_code () { return 0; }
+ 
+   virtual int get_default_rc (char *path, int len) {return -1;}
+-  virtual int read_rc (char *path) {return -1;}
+-  virtual int write_rc (char *rc, int overwrite) {return -1;}
++  virtual int read_rc (const char *path) {return -1;}
++  virtual int write_rc (const char *rc, int overwrite) {return -1;}
+   virtual int get_log_file (char *path, int len) {return -1;}
+   virtual int set_log_file (char *path) {return -1;}
+   virtual int get_log_prefix (char *prefix, int len) {return -1;}
+--- bochs-2.2.6/gui/siminterface.cc.wx26	2005-11-20 18:22:43.000000000 +0100
++++ bochs-2.2.6/gui/siminterface.cc	2006-02-16 19:02:56.000000000 +0100
+@@ -72,8 +72,8 @@
+   virtual void quit_sim (int code);
+   virtual int get_exit_code () { return exit_code; }
+   virtual int get_default_rc (char *path, int len);
+-  virtual int read_rc (char *path);
+-  virtual int write_rc (char *path, int overwrite);
++  virtual int read_rc (const char *path);
++  virtual int write_rc (const char *path, int overwrite);
+   virtual int get_log_file (char *path, int len);
+   virtual int set_log_file (char *path);
+   virtual int get_log_prefix (char *prefix, int len);
+@@ -352,7 +352,7 @@
+ }
+ 
+ int 
+-bx_real_sim_c::read_rc (char *rc)
++bx_real_sim_c::read_rc (const char *rc)
+ {
+   return bx_read_configuration (rc);
+ }
+@@ -362,7 +362,7 @@
+ //  -1: failed
+ //  -2: already exists, and overwrite was off
+ int 
+-bx_real_sim_c::write_rc (char *rc, int overwrite)
++bx_real_sim_c::write_rc (const char *rc, int overwrite)
+ {
+   return bx_write_configuration (rc, overwrite);
+ }
+@@ -1289,12 +1289,14 @@
+ }
+ 
+ void 
+-bx_param_string_c::set (char *buf)
++bx_param_string_c::set (const char *buf)
+ {
+   if (options->get () & RAW_BYTES)
+     memcpy (val, buf, maxsize);
+-  else
++  else {
+     strncpy (val, buf, maxsize);
++    val[maxsize - 1] = 0;
++  }
+   if (handler) {
+     // the handler can return a different char* to be copied into the value
+     buf = (*handler)(this, 1, buf, -1);
+--- bochs-2.2.6/bochs.h.wx26	2006-01-28 17:16:02.000000000 +0100
++++ bochs-2.2.6/bochs.h	2006-02-16 19:02:56.000000000 +0100
+@@ -108,8 +108,8 @@
+ int bx_begin_simulation (int argc, char *argv[]);
+ char *bx_find_bochsrc (void);
+ int bx_parse_cmdline (int arg, int argc, char *argv[]);
+-int bx_read_configuration (char *rcfile);
+-int bx_write_configuration (char *rcfile, int overwrite);
++int bx_read_configuration (const char *rcfile);
++int bx_write_configuration (const char *rcfile, int overwrite);
+ void bx_reset_options (void);
+ Bit32u crc32(const Bit8u *buf, int len);
+ 
+--- bochs-2.2.6/config.cc.wx26	2006-01-25 21:07:35.000000000 +0100
++++ bochs-2.2.6/config.cc	2006-02-16 19:02:56.000000000 +0100
+@@ -49,9 +49,9 @@
+ bx_options_t bx_options; // initialized in bx_init_options()
+ 
+ static char *get_builtin_variable(char *varname);
+-static Bit32s parse_line_unformatted(char *context, char *line);
+-static Bit32s parse_line_formatted(char *context, int num_params, char *params[]);
+-static int parse_bochsrc(char *rcfile);
++static Bit32s parse_line_unformatted(const char *context, char *line);
++static Bit32s parse_line_formatted(const char *context, int num_params, char *params[]);
++static int parse_bochsrc(const char *rcfile);
+ static int get_floppy_type_from_image(const char *filename);
+ 
+ static Bit64s bx_param_handler (bx_param_c *param, int set, Bit64s val)
+@@ -188,7 +188,7 @@
+   return val;
+ }
+ 
+-char *bx_param_string_handler (bx_param_string_c *param, int set, char *val, int maxlen)
++const char *bx_param_string_handler (bx_param_string_c *param, int set, const char *val, int maxlen)
+ {
+   bx_id id = param->get_id ();
+ 
+@@ -1889,7 +1889,7 @@
+   bx_options.Otext_snapshot_check->reset();
+ }
+ 
+-int bx_read_configuration (char *rcfile)
++int bx_read_configuration (const char *rcfile)
+ {
+   // parse rcfile first, then parse arguments in order.
+   BX_INFO (("reading configuration from %s", rcfile));
+@@ -1961,7 +1961,7 @@
+   return strdup (rcfile);
+ }
+ 
+-static int parse_bochsrc(char *rcfile)
++static int parse_bochsrc(const char *rcfile)
+ {
+   FILE *fd = NULL;
+   char *ret;
+@@ -2032,7 +2032,7 @@
+   }
+ }
+ 
+-static Bit32s parse_line_unformatted(char *context, char *line)
++static Bit32s parse_line_unformatted(const char *context, char *line)
+ {
+ #define MAX_PARAMS_LEN 40
+   char *ptr;
+@@ -2186,7 +2186,7 @@
+   }
+ }
+ 
+-static Bit32s parse_log_options(char *context, char *loglev, char *param1)
++static Bit32s parse_log_options(const char *context, char *loglev, char *param1)
+ {
+   int level;
+ 
+@@ -2219,7 +2219,7 @@
+   return 0;
+ }
+ 
+-static Bit32s parse_line_formatted(char *context, int num_params, char *params[])
++static Bit32s parse_line_formatted(const char *context, int num_params, char *params[])
+ {
+   int i, slot, t;
+   Bit8u idx;
+@@ -3560,7 +3560,7 @@
+ //   0: written ok
+ //  -1: failed
+ //  -2: already exists, and overwrite was off
+-int bx_write_configuration (char *rc, int overwrite)
++int bx_write_configuration (const char *rc, int overwrite)
+ {
+   int i;
+ 


Index: bochs.spec
===================================================================
RCS file: /cvs/extras/rpms/bochs/devel/bochs.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- bochs.spec	15 Feb 2006 21:20:29 -0000	1.12
+++ bochs.spec	16 Feb 2006 19:46:09 -0000	1.13
@@ -12,6 +12,7 @@
 Source1:        http://bochs.sourceforge.net/guestos/dlxlinux4.tar.gz
 Patch0:         %{name}-nonet-build.patch
 Patch1:         %{name}-config.patch
+Patch2:         %{name}-wx26.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  docbook-utils
@@ -44,7 +45,8 @@
 
 %prep
 %setup -q
-%patch0 -p0
+%patch0 -p0 -z .nonet
+%patch2 -p1 -z .wx26
 cp -p %{SOURCE1} .
 
 # Uh-oh, great!
@@ -66,6 +68,7 @@
 %build
 # Note: the CPU level, MMX et al affect what the emulator will emulate, they
 # are not properties of the build target architecture.
+export CXXFLAGS="$RPM_OPT_FLAGS -DPARANOID"
 %configure \
   --enable-plugins \
   --enable-ne2000 \
@@ -81,15 +84,14 @@
   --with-term \
   --with-rfb \
   --with-sdl \
-  --with-wx
+  --with-wx \
+  --with-svga
 
-#? --enable-raw-serial
-make 
-# %{?_smp_mflags}
+make %{?_smp_mflags}
 make unpack_dlx
 
 # This needs to be done after "make unpack_dlx".
-%{__patch} -p0 < %{PATCH2}
+%{__patch} -p0 < %{PATCH1}
 sed -i -e 's/\r//' dlxlinux/readme.txt dlxlinux/bochsrc.txt
 
 
@@ -129,11 +131,12 @@
 %changelog
 * Wed Feb 15 2006 Hans de Goede <j.w.r.degoede at hhs.nl> - 2.2.6-1
 - New upstream version 2.2.6
-- Remove --enable-pae as that requires a CPU level of 6 now
+- Remove --enable-pae as that requires a CPU level of 6 with the new version
 - Remove a few configure switches which are identical to the
   upstream defaults and thus don't do anything
 - Add --enable-clgd54xx
-- Fix compile with wxGTK-2.6 and unconditionalize wxGTK build (WIP)
+- Add --with-svga which adds support for svgalib as display
+- Fix compile with wxGTK-2.6 and unconditionalize wxGTK build
 
 * Fri Dec 16 2005 Ville Skyttä <ville.skytta at iki.fi> - 2.2.1-2
 - Adapt to modular X.




More information about the scm-commits mailing list