rpms/bochs/devel bochs-wx26.patch,1.2,1.3 bochs.spec,1.15,1.16

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Mon Feb 27 20:59:39 UTC 2006


Author: jwrdegoede

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

Modified Files:
	bochs-wx26.patch bochs.spec 
Log Message:
proper detect wxgtk is gtk2 ./configure fix

bochs-wx26.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 bochs-wx26.patch
Index: bochs-wx26.patch
===================================================================
RCS file: /cvs/extras/rpms/bochs/devel/bochs-wx26.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bochs-wx26.patch	16 Feb 2006 19:46:09 -0000	1.2
+++ bochs-wx26.patch	27 Feb 2006 20:59:38 -0000	1.3
@@ -1,2055 +1,2055 @@
---- 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 = 
-+    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, "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);
-@@ -1050,10 +1050,10 @@
-         strcpy(status_text+1, statusitem_text[i]);
-         theFrame->SetStatusText(status_text, i+1);
- #else
--        theFrame->SetStatusText(statusitem_text[i], i+1);
-+        theFrame->SetStatusText(wxString(statusitem_text[i], wxConvUTF8), i+1);
- #endif
-       } else {
--        theFrame->SetStatusText("", i+1);
-+        theFrame->SetStatusText(wxT(""), i+1);
-       }
-     }
-   } else if ((unsigned)element < statusitem_count) {
-@@ -1063,10 +1063,11 @@
-         strcpy(status_text+1, statusitem_text[element]);
-         theFrame->SetStatusText(status_text, element+1);
- #else
--      theFrame->SetStatusText(statusitem_text[element], element+1);
-+      theFrame->SetStatusText(wxString(statusitem_text[element], wxConvUTF8),
-+        element+1);
- #endif
-     } else {
--      theFrame->SetStatusText("", element+1);
-+      theFrame->SetStatusText(wxT(""), element+1);
-     }
-   }
- }
-@@ -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, len);
-+    wxString string (text_snapshot, wxConvUTF8, len);
-     wxTheClipboard->SetData (new wxTextDataObject (string));
-     wxTheClipboard->Close ();
-     ret = 1;
---- 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, "");
-+  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, "");
-+  message = new wxStaticText (this, -1, wxT(""));
-   message->SetFont (font);
-   dontAsk = new wxCheckBox (this, -1, LOG_MSG_DONT_ASK_STRING);
-   btnSizer = new wxBoxSizer(wxHORIZONTAL);
-@@ -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);
- }
+--- bochs-2.2.6/gui/wxdialog.h.wx26	2005-11-25 17:24:47.000000000 +0100
++++ bochs-2.2.6/gui/wxdialog.h	2006-02-19 14:10:47.000000000 +0100
+@@ -9,20 +9,20 @@
+ ////////////////////////////////////////////////////////////////////
+ // text messages used in several places
+ ////////////////////////////////////////////////////////////////////
+-#define MSG_NO_HELP "No help is available yet."
+-#define MSG_NO_HELP_CAPTION "No help"
+-#define MSG_ENABLED "Enabled"
+-#define BTNLABEL_HELP "Help"
+-#define BTNLABEL_CANCEL "Cancel"
+-#define BTNLABEL_OK "Ok"
+-#define BTNLABEL_CREATE_IMG "Create Image"
+-#define BTNLABEL_BROWSE "<--Browse"
+-#define BTNLABEL_DEBUG_CONTINUE "Continue"
+-#define BTNLABEL_DEBUG_STOP "Stop"
+-#define BTNLABEL_DEBUG_STEP "Step"
+-#define BTNLABEL_DEBUG_COMMIT "Commit"
+-#define BTNLABEL_CLOSE "Close"
+-#define BTNLABEL_EXECUTE "Execute"
++#define MSG_NO_HELP wxT("No help is available yet.")
++#define MSG_NO_HELP_CAPTION wxT("No help")
++#define MSG_ENABLED wxT("Enabled")
++#define BTNLABEL_HELP wxT("Help")
++#define BTNLABEL_CANCEL wxT("Cancel")
++#define BTNLABEL_OK wxT("Ok")
++#define BTNLABEL_CREATE_IMG wxT("Create Image")
++#define BTNLABEL_BROWSE wxT("<--Browse")
++#define BTNLABEL_DEBUG_CONTINUE wxT("Continue")
++#define BTNLABEL_DEBUG_STOP wxT("Stop")
++#define BTNLABEL_DEBUG_STEP wxT("Step")
++#define BTNLABEL_DEBUG_COMMIT wxT("Commit")
++#define BTNLABEL_CLOSE wxT("Close")
++#define BTNLABEL_EXECUTE wxT("Execute")
  
- 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 ("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 ("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 +143,7 @@
-     default:
-       return;  // without EndModal
-   }
--  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);
- }
+ #if defined(WIN32)
+ // On win32, apparantly the spinctrl depends on a native control which only
+@@ -37,9 +37,9 @@
+ void ChangeStaticText (wxSizer *sizer, wxStaticText *win, wxString newtext);
+ bool CreateImage (int harddisk, int sectors, const char *filename);
+ void SetTextCtrl (wxTextCtrl *text, const char *format, int val);
+-int GetTextCtrlInt (wxTextCtrl *text, bool *valid = NULL, bool complain=false, wxString complaint = "Invalid integer!");
++int GetTextCtrlInt (wxTextCtrl *text, bool *valid = NULL, bool complain=false, wxString complaint = wxT("Invalid integer!"));
+ bool BrowseTextCtrl (wxTextCtrl *text,
+-    wxString prompt="Choose a file",
++    wxString prompt=wxT("Choose a file"),
+     long style=wxOPEN);
+ wxChoice *makeLogOptionChoiceBox (wxWindow *parent, wxWindowID id, int evtype, bool includeNoChange = false);
  
-@@ -191,7 +187,7 @@
- FloppyConfigDialog::FloppyConfigDialog(
-     wxWindow* parent,
-     wxWindowID id)
--  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
-+  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
-     wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
+@@ -75,11 +75,11 @@
+ #define LOG_MSG_ASK_IDS \
+   { ID_Continue, ID_Die, ID_DumpCore, ID_Debugger, wxHELP }
+ #define LOG_MSG_ASK_NAMES \
+-  { "Continue", "Kill Sim", "Dump Core", "Debugger", "Help" }
++  { wxT("Continue"), wxT("Kill Sim"), wxT("Dump Core"), wxT("Debugger"), wxT("Help") }
+ #define LOG_MSG_DONT_ASK_STRING \
+-  "Don't ask about future messages like this"
+-#define LOG_MSG_CONTEXT "Context: %s"
[...3859 lines suppressed...]
++# the same distribution terms that you use for the rest of that program.
++
++# PKG_PROG_PKG_CONFIG([MIN-VERSION])
++# ----------------------------------
++AC_DEFUN([PKG_PROG_PKG_CONFIG],
++[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
++m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++fi
++if test -n "$PKG_CONFIG"; then
++	_pkg_min_version=m4_default([$1], [0.9.0])
++	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
++	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
++		AC_MSG_RESULT([yes])
++	else
++		AC_MSG_RESULT([no])
++		PKG_CONFIG=""
++	fi
++		
++fi[]dnl
++])# PKG_PROG_PKG_CONFIG
++
++# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
++#
++# Check to see whether a particular set of modules exists.  Similar
++# to PKG_CHECK_MODULES(), but does not set variables or print errors.
++#
++#
++# Similar to PKG_CHECK_MODULES, make sure that the first instance of
++# this or PKG_CHECK_MODULES is called, or make sure to call
++# PKG_CHECK_EXISTS manually
++# --------------------------------------------------------------
++AC_DEFUN([PKG_CHECK_EXISTS],
++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
++if test -n "$PKG_CONFIG" && \
++    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
++  m4_ifval([$2], [$2], [:])
++m4_ifvaln([$3], [else
++  $3])dnl
++fi])
++
++
++# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
++# ---------------------------------------------
++m4_define([_PKG_CONFIG],
++[if test -n "$PKG_CONFIG"; then
++    if test -n "$$1"; then
++        pkg_cv_[]$1="$$1"
++    else
++        PKG_CHECK_EXISTS([$3],
++                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
++			 [pkg_failed=yes])
++    fi
++else
++	pkg_failed=untried
++fi[]dnl
++])# _PKG_CONFIG
++
++# _PKG_SHORT_ERRORS_SUPPORTED
++# -----------------------------
++AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++        _pkg_short_errors_supported=yes
++else
++        _pkg_short_errors_supported=no
++fi[]dnl
++])# _PKG_SHORT_ERRORS_SUPPORTED
++
++
++# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
++# [ACTION-IF-NOT-FOUND])
++#
++#
++# Note that if there is a possibility the first call to
++# PKG_CHECK_MODULES might not happen, you should be sure to include an
++# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
++#
++#
++# --------------------------------------------------------------
++AC_DEFUN([PKG_CHECK_MODULES],
++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
++AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
++AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
++
++pkg_failed=no
++AC_MSG_CHECKING([for $1])
++
++_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
++_PKG_CONFIG([$1][_LIBS], [libs], [$2])
++
++m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
++and $1[]_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.])
++
++if test $pkg_failed = yes; then
++        _PKG_SHORT_ERRORS_SUPPORTED
++        if test $_pkg_short_errors_supported = yes; then
++	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
++        else 
++	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
++        fi
++	# Put the nasty error message in config.log where it belongs
++	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
++
++	ifelse([$4], , [AC_MSG_ERROR(dnl
++[Package requirements ($2) were not met:
++
++$$1_PKG_ERRORS
++
++Consider adjusting the PKG_CONFIG_PATH environment variable if you
++installed software in a non-standard prefix.
++
++_PKG_TEXT
++])],
++		[$4])
++elif test $pkg_failed = untried; then
++	ifelse([$4], , [AC_MSG_FAILURE(dnl
++[The pkg-config script could not be found or is too old.  Make sure it
++is in your PATH or set the PKG_CONFIG environment variable to the full
++path to pkg-config.
++
++_PKG_TEXT
++
++To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
++		[$4])
++else
++	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
++	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
++        AC_MSG_RESULT([yes])
++	ifelse([$3], , :, [$3])
++fi[]dnl
++])# PKG_CHECK_MODULES
+--- bochs-2.2.6/configure.in.wx26	2006-01-29 14:56:04.000000000 +0100
++++ bochs-2.2.6/configure.in	2006-02-19 14:10:50.000000000 +0100
+@@ -2035,9 +2035,10 @@
+     x2.[4-5]*) ok_wx_version=1 ;;  # version 2.4 / 2.5
+     x2.[6-9]*)  # version 2.6 or greater
+       ok_wx_version=1
+-      if test "$WX_BASENAME" = "wx_gtk2"; then
+-        wx_needs_gtk2=1
+-      fi
++      case x$WX_BASENAME in
++	xwx_gtk2|xwx_gtk2u) wx_needs_gtk2=1 ;;
++	*) ;;
++      esac
+       ;;
+     x[3-9]*) ok_wx_version=1 ;;  # version 3 or greater
+     *) ;; # who knows?
+@@ -2117,8 +2118,9 @@
+   SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL)"
+   # GUI_*FLAGS are added to the compilation of every bochs file, not just
+   # the files in gui/*.cc.
+-  GUI_CFLAGS="$GUI_CFLAGS \`sdl-config --cflags\`"
+-  GUI_CXXFLAGS="$GUI_CXXFLAGS \`sdl-config --cflags\`"
++  SDL_CFLAGS=`sdl-config --cflags`
++  GUI_CFLAGS="$GUI_CFLAGS $SDL_CFLAGS"
++  GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL_CFLAGS"
+   GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)"
+   if test "$with_win32" != yes -a "$with_wx" != yes; then
+     case $target in
+@@ -2225,22 +2227,21 @@
+   AC_DEFINE(BX_WITH_WX, 1)
+   SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_WX)"
+   SPECIFIC_GUI_SUPPORT_OBJS="$SPECIFIC_GUI_SUPPORT_OBJS \$(GUI_OBJS_WX_SUPPORT)"
+-  WX_CFLAGS="\`$WX_CONFIG --cflags\`"
+-  WX_CXXFLAGS="\`$WX_CONFIG --cxxflags\`"
+-  GUI_LINK_OPTS_WX="\`$WX_CONFIG --libs\`"
++  WX_CFLAGS="`$WX_CONFIG --cflags`"
++  WX_CXXFLAGS="`$WX_CONFIG --cxxflags`"
++  GUI_LINK_OPTS_WX="`$WX_CONFIG --libs`"
+   if test "$wx_needs_gtk2" = 1; then
+-    # this hack might not work with all GTK 2 installations
+-    AC_CHECK_HEADER(/opt/gnome/include/gtk-2.0/gdk/gdkkeysyms.h, [
+-      WX_CFLAGS="$WX_CFLAGS -I/opt/gnome/include/gtk-2.0"
+-      WX_CXXFLAGS="$WX_CXXFLAGS -I/opt/gnome/include/gtk-2.0"
++    PKG_CHECK_MODULES([GTK], [gtk+-2.0], [
++      WX_CFLAGS="$WX_CFLAGS $GTK_CFLAGS"
++      WX_CXXFLAGS="$WX_CXXFLAGS $GTK_CFLAGS"
+     ])
+   else
+     # if gtk-config exists, then add it to the cflags.
+     gtkconf=`gtk-config --cflags`
+     if test $? = 0; then
+       # gtk-config was found and returned 0, so it must return valid output
+-      WX_CFLAGS="$WX_CFLAGS \`gtk-config --cflags\`"
+-      WX_CXXFLAGS="$WX_CXXFLAGS \`gtk-config --cflags\`"
++      WX_CFLAGS="$WX_CFLAGS $gtkconf"
++      WX_CXXFLAGS="$WX_CXXFLAGS $gtkconf"
+     fi
+   fi
+   # GUI_C*FLAGS are added to the compilation of every bochs file, not just
 --- 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
++++ bochs-2.2.6/config.cc	2006-02-19 14:10:47.000000000 +0100
 @@ -49,9 +49,9 @@
  bx_options_t bx_options; // initialized in bx_init_options()
  


Index: bochs.spec
===================================================================
RCS file: /cvs/extras/rpms/bochs/devel/bochs.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- bochs.spec	16 Feb 2006 23:39:38 -0000	1.15
+++ bochs.spec	27 Feb 2006 20:59:38 -0000	1.16
@@ -15,6 +15,7 @@
 Patch2:         %{name}-wx26.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+BuildRequires:  autoconf
 BuildRequires:  docbook-utils
 BuildRequires:  libXt-devel
 BuildRequires:  libXpm-devel
@@ -52,12 +53,6 @@
 %patch2 -p1 -z .wx26
 cp -p %{SOURCE1} .
 
-# Uh-oh, great!
-sed -i \
-  -e 's|wx_needs_gtk2=0|wx_needs_gtk2=1|' \
-  -e 's|/opt/gnome/include/|%{_includedir}/|' \
-  configure*
-
 # Fix up some man page paths.
 sed -i \
   -e 's|/usr/local/share/doc/bochs/|%{_docdir}/%{name}-%{version}/|' \
@@ -66,6 +61,7 @@
 
 
 %build
+autoconf
 %ifarch %{ix86} x86_64
 ARCH_CONFIGURE_FLAGS=--with-svga
 %endif




More information about the scm-commits mailing list