Hi, ports@:

   Here is a patch for emulators/bochs to update to 2.8.
   It build well and run well on amd64-current system.


Cheers !
wen
Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/bochs/Makefile,v
retrieving revision 1.79
diff -u -p -r1.79 Makefile
--- Makefile    21 Sep 2023 13:10:25 -0000      1.79
+++ Makefile    10 Nov 2024 02:34:30 -0000
@@ -1,7 +1,6 @@
 COMMENT=       x86 machine simulator
 
-DISTNAME=      bochs-2.7
-REVISION=      1
+DISTNAME=      bochs-2.8
 CATEGORIES=    emulators
 SITES=         ${SITE_SOURCEFORGE:=bochs/}
 
@@ -34,7 +33,7 @@ CONFIGURE_ARGS=       --disable-docbook \
                --enable-cet \
                --enable-evex
 
-AUTOCONF_VERSION = 2.69
+AUTOCONF_VERSION = 2.71
 
 FLAVORS=       debug no_x11
 FLAVOR?=
Index: distinfo
===================================================================
RCS file: /cvs/ports/emulators/bochs/distinfo,v
retrieving revision 1.24
diff -u -p -r1.24 distinfo
--- distinfo    27 May 2022 12:20:06 -0000      1.24
+++ distinfo    10 Nov 2024 02:34:30 -0000
@@ -1,2 +1,2 @@
-SHA256 (bochs-2.7.tar.gz) = oBCrG/3HKsWgjS4kEs1HHA/r1mrx2TSbwNeWh53lsXo=
-SIZE (bochs-2.7.tar.gz) = 5298413
+SHA256 (bochs-2.8.tar.gz) = qFsTr/fYQR96nzVrpsM7X13B+7EH61AYzCOmJjnaAFk=
+SIZE (bochs-2.8.tar.gz) = 5303791
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac  10 Nov 2024 02:34:30 -0000
@@ -0,0 +1,26 @@
+the configure script tries to use pkg-config to get the LDFLAGS for
+ncurses, but we don't have .pc files for libncurses, so fall back to the
+hardcoded -lncurses.
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -2978,17 +2978,7 @@ AC_SUBST(EXPORT_DYNAMIC)
+ AC_SUBST(DLLTOOL)
+ 
+ if test "$use_curses" = yes; then
+-  if test "$PKGCONFIG" != not_found; then
+-    AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
curses`")
+-    AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
ncurses`")
+-    AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
termlib`")
+-    AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
pdcurses`")
+-  else
+-    AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses')
+-    AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses')
+-    AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib')
+-    AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses')
+-  fi
++  AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses')
+   if test "$GUI_LINK_OPTS_TERM" = ""; then
+     echo Curses library not found: tried curses, ncurses, termlib and 
pdcurses.
+     exit 1
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- patches/patch-configure_in  27 May 2022 12:21:39 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-the configure script tries to use pkg-config to get the LDFLAGS for
-ncurses, but we don't have .pc files for libncurses, so fall back to the
-hardcoded -lncurses.
-
-Index: configure.in
---- configure.in.orig
-+++ configure.in
-@@ -2929,17 +2929,7 @@ AC_SUBST(CI_SUPPORT_OBJS)
- AC_SUBST(EXPORT_DYNAMIC)
- 
- if test "$use_curses" = yes; then
--  if test "$PKGCONFIG" != not_found; then
--    AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
curses`")
--    AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
ncurses`")
--    AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
termlib`")
--    AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs 
pdcurses`")
--  else
--    AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses')
-     AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses')
--    AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib')
--    AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses')
--  fi
-   if test "$GUI_LINK_OPTS_TERM" = ""; then
-     echo Curses library not found: tried curses, ncurses, termlib and 
pdcurses.
-     exit 1
Index: patches/patch-cpu_apic_cc
===================================================================
RCS file: /cvs/ports/emulators/bochs/patches/patch-cpu_apic_cc,v
retrieving revision 1.1
diff -u -p -r1.1 patch-cpu_apic_cc
--- patches/patch-cpu_apic_cc   13 Jun 2022 16:24:47 -0000      1.1
+++ patches/patch-cpu_apic_cc   10 Nov 2024 02:34:30 -0000
@@ -3,21 +3,12 @@ fix format string
 Index: cpu/apic.cc
 --- cpu/apic.cc.orig
 +++ cpu/apic.cc
-@@ -26,6 +26,8 @@
+@@ -30,6 +30,8 @@
  #include "scalar_arith.h"
  #include "iodev/iodev.h"
  
 +#include <inttypes.h>
 +
- #if BX_SUPPORT_APIC
- 
  extern bool simulate_xapic;
-@@ -1176,7 +1178,7 @@ void bx_local_apic_c::set_vmx_preemption_timer(Bit32u 
-   vmx_preemption_timer_value = value;
-   vmx_preemption_timer_initial = bx_pc_system.time_ticks();
-   vmx_preemption_timer_fire = ((vmx_preemption_timer_initial >> 
vmx_preemption_timer_rate) + value) << vmx_preemption_timer_rate;
--  BX_DEBUG(("VMX Preemption timer: value = %u, rate = %u, init = %u, fire = 
%u", value, vmx_preemption_timer_rate, vmx_preemption_timer_initial, 
vmx_preemption_timer_fire));
-+  BX_DEBUG(("VMX Preemption timer: value = %u, rate = %u, init = %" PRIu64 ", 
fire = %" PRIu64, value, vmx_preemption_timer_rate, 
vmx_preemption_timer_initial, vmx_preemption_timer_fire));
-   bx_pc_system.activate_timer_ticks(vmx_timer_handle, 
vmx_preemption_timer_fire - vmx_preemption_timer_initial, 0);
-   vmx_timer_active = 1;
- }
+ 
+ #define LOG_THIS this->
Index: patches/patch-cpu_paging_cc
===================================================================
RCS file: patches/patch-cpu_paging_cc
diff -N patches/patch-cpu_paging_cc
--- patches/patch-cpu_paging_cc 13 Jun 2022 16:24:47 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-fix format string
-
-Index: cpu/paging.cc
---- cpu/paging.cc.orig
-+++ cpu/paging.cc
-@@ -804,7 +804,7 @@ bx_phy_address BX_CPU_C::translate_linear_long_mode(bx
-     //  - R/W bit=0 and Dirty=1 for leaf entry
-     bool shadow_stack_page = ((combined_access & BX_COMBINED_ACCESS_WRITE) != 
0) && ((entry[leaf] & 0x40) != 0) && ((entry[leaf] & 0x02) == 0);
-     if (!shadow_stack_page) {
--      BX_DEBUG(("shadow stack access to not shadow stack page CA=%x 
entry=%lx\n", combined_access, Bit32u(entry[leaf] & 0xfff)));
-+      BX_DEBUG(("shadow stack access to not shadow stack page CA=%x 
entry=%x\n", combined_access, Bit32u(entry[leaf] & 0xfff)));
-       page_fault(ERROR_PROTECTION, laddr, user, rw);
-     }
- 

Reply via email to