git: 5fcabb512923 - main - emulators/qemu: Re-enable build for i386

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sat, 14 Jan 2023 06:59:42 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5fcabb512923df12ff55d9e9d378e2ad774f4ecd

commit 5fcabb512923df12ff55d9e9d378e2ad774f4ecd
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-01-14 06:57:26 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-01-14 06:59:31 +0000

    emulators/qemu: Re-enable build for i386
    
    During the upgrade to 7.0 the build of qemu for i386 got disabled, due
    to "unknown-type name 'vm_page_t'" errors. This has been fixed.
    
    PR:             268647
    Reported by:    dim
---
 emulators/qemu/Makefile                                     | 2 +-
 emulators/qemu/files/patch-bsd-user_host_i386_host-signal.h | 6 +++---
 emulators/qemu/files/patch-meson.build                      | 4 ++--
 emulators/qemu/files/patch-util_meson.build                 | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index ca35689d0ee8..be243a683990 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -11,7 +11,7 @@ WWW=		https://www.qemu.org/
 LICENSE=	GPLv2
 
 .if ${FLAVOR:U} != tools
-ONLY_FOR_ARCHS=	aarch64 amd64 powerpc64 powerpc64le
+ONLY_FOR_ARCHS=	aarch64 amd64 i386 powerpc64 powerpc64le
 # We need to check if it build with other ARCHS
 # For i386 we have unknown type name 'vm_page_t'
 .endif
diff --git a/emulators/qemu/files/patch-bsd-user_host_i386_host-signal.h b/emulators/qemu/files/patch-bsd-user_host_i386_host-signal.h
index 524ffb667f50..07d731fd4f54 100644
--- a/emulators/qemu/files/patch-bsd-user_host_i386_host-signal.h
+++ b/emulators/qemu/files/patch-bsd-user_host_i386_host-signal.h
@@ -1,10 +1,10 @@
 --- bsd-user/host/i386/host-signal.h.orig	2022-12-14 16:28:45 UTC
 +++ bsd-user/host/i386/host-signal.h
-@@ -13,6 +13,7 @@
+@@ -12,6 +12,7 @@
+ #include <sys/param.h>
  #include <sys/ucontext.h>
  #include <machine/trap.h>
- #include <vm/pmap.h>
 +#include <vm/vm.h>
+ #include <vm/pmap.h>
  #include <machine/pmap.h>
  
- static inline uintptr_t host_signal_pc(ucontext_t *uc)
diff --git a/emulators/qemu/files/patch-meson.build b/emulators/qemu/files/patch-meson.build
index e701a096e957..1ada4462a416 100644
--- a/emulators/qemu/files/patch-meson.build
+++ b/emulators/qemu/files/patch-meson.build
@@ -1,6 +1,6 @@
---- meson.build.orig	2022-04-19 19:10:27 UTC
+--- meson.build.orig	2022-12-14 16:28:45 UTC
 +++ meson.build
-@@ -2505,14 +2505,10 @@ if have_system
+@@ -2719,14 +2719,10 @@ if have_system
    fdt_opt = get_option('fdt')
    if fdt_opt in ['enabled', 'auto', 'system']
      have_internal = fs.exists(meson.current_source_dir() / 'dtc/libfdt/Makefile.libfdt')
diff --git a/emulators/qemu/files/patch-util_meson.build b/emulators/qemu/files/patch-util_meson.build
index 590b1f5a0592..135b2ee3f156 100644
--- a/emulators/qemu/files/patch-util_meson.build
+++ b/emulators/qemu/files/patch-util_meson.build
@@ -1,6 +1,6 @@
---- util/meson.build.orig	2022-04-23 11:59:28 UTC
+--- util/meson.build.orig	2022-12-14 16:28:45 UTC
 +++ util/meson.build
-@@ -87,10 +87,6 @@ if have_block
+@@ -97,10 +97,6 @@ if have_block
    util_ss.add(files('readline.c'))
    util_ss.add(files('throttle.c'))
    util_ss.add(files('timed-average.c'))