Date: Tuesday, October 18, 2022 @ 11:10:08
  Author: eworm
Revision: 1331775

upgpkg: virtualbox 7.0.0-1: new upstream release

Added:
  virtualbox/trunk/009-properly-handle-i3wm.patch
  virtualbox/trunk/013-support-building-from-dkms.patch
  virtualbox/trunk/018-upate-xclient-script.patch
Modified:
  virtualbox/trunk/004-drop-Wno-format.patch
  virtualbox/trunk/LocalConfig.kmk
  virtualbox/trunk/PKGBUILD
Deleted:
  virtualbox/trunk/009-i3wm.patch
  virtualbox/trunk/013-Makefile.patch
  virtualbox/trunk/017-fix-narrowing-conversion.patch
  virtualbox/trunk/018-xclient.patch

--------------------------------------+
 004-drop-Wno-format.patch            |  113 +++++++++-----
 009-i3wm.patch                       |   50 ------
 009-properly-handle-i3wm.patch       |   77 +++++++++
 013-Makefile.patch                   |   44 -----
 013-support-building-from-dkms.patch |   54 ++++++
 017-fix-narrowing-conversion.patch   |   37 ----
 018-upate-xclient-script.patch       |   35 ++++
 018-xclient.patch                    |   24 ---
 LocalConfig.kmk                      |   11 -
 PKGBUILD                             |  256 ++++++++++++++++-----------------
 10 files changed, 370 insertions(+), 331 deletions(-)

Modified: 004-drop-Wno-format.patch
===================================================================
--- 004-drop-Wno-format.patch   2022-10-18 10:09:32 UTC (rev 1331774)
+++ 004-drop-Wno-format.patch   2022-10-18 11:10:08 UTC (rev 1331775)
@@ -1,23 +1,24 @@
-From ff59d7f89a64a9386b3b97a3e7b062df59474192 Mon Sep 17 00:00:00 2001
+From 9736107f45a17f04e4a0f9ab14fe913660cde3ad Mon Sep 17 00:00:00 2001
 From: Christian Hesse <[email protected]>
-Date: Tue, 18 Jan 2022 21:16:33 +0100
-Subject: [PATCH 1/1] drop -Wno-format
+Date: Mon, 17 Oct 2022 15:07:30 +0200
+Subject: [PATCH] drop -Wno-format
 
 ---
- src/VBox/Devices/EFI/Firmware/Config.kmk                      | 2 +-
- .../EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf  | 4 ++--
- .../CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf         | 4 ++--
- src/VBox/Devices/Makefile.kmk                                 | 2 +-
- src/VBox/Devices/PC/ipxe/Makefile.kmk                         | 2 +-
- src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk                     | 2 +-
- src/VBox/Main/webservice/Makefile.kmk                         | 2 --
- 7 files changed, 8 insertions(+), 10 deletions(-)
+ src/VBox/Devices/EFI/Firmware/Config.kmk                    | 2 +-
+ .../Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf    | 6 +++---
+ .../CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf       | 6 +++---
+ src/VBox/Devices/Makefile.kmk                               | 2 +-
+ src/VBox/Devices/PC/ipxe/Makefile.kmk                       | 2 +-
+ src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk                   | 2 +-
+ src/VBox/Main/webservice/Makefile.kmk                       | 3 +--
+ src/libs/xpcom18a4/Config.kmk                               | 6 +++---
+ 8 files changed, 14 insertions(+), 15 deletions(-)
 
 diff --git a/src/VBox/Devices/EFI/Firmware/Config.kmk 
b/src/VBox/Devices/EFI/Firmware/Config.kmk
-index a5affd4d..d8dd9ed0 100644
+index e2e537f1..de640194 100644
 --- a/src/VBox/Devices/EFI/Firmware/Config.kmk
 +++ b/src/VBox/Devices/EFI/Firmware/Config.kmk
-@@ -126,7 +126,7 @@ TEMPLATE_VBoxEfiBldProg_LIBS = \
+@@ -155,7 +155,7 @@ TEMPLATE_VBoxEfiBldProg_LIBS = \
  ifn1of ($(KBUILD_HOST),win) # This stuff isn't up to our standard at all! :/
   TEMPLATE_VBoxEfiBldProg_CFLAGS = $(filter-out 
-pedantic,$(TEMPLATE_VBoxBldProg_CFLAGS)) \
        -Wno-sign-compare -Wno-missing-prototypes -Wno-strict-prototypes \
@@ -27,10 +28,10 @@
   TEMPLATE_VBoxEfiBldProg_CXXFLAGS = $(filter-out 
-pedantic,$(TEMPLATE_VBoxBldProg_CXXFLAGS)) \
        -Wno-all -Wno-shadow -Wno-empty-body -Wno-unused-parameter 
-Wno-unused-variable \
 diff --git 
a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf 
b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf
-index 83831a1a..8b22fa0b 100644
+index 5300ea32..e9485765 100644
 --- a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf
 +++ b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf
-@@ -657,9 +657,9 @@
+@@ -618,10 +618,10 @@
    #   -Werror=unused-but-set-variable: Warn whenever a local variable is 
assigned to, but otherwise unused (aside from its declaration).
    #
    GCC:*_*_IA32_CC_FLAGS    = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) 
-Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
@@ -38,15 +39,17 @@
 +  GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) 
-Wno-error=maybe-uninitialized -Wno-error=format 
-Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
    GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-error=unused-but-set-variable
 -  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-format -Wno-error=unused-but-set-variable
+-  GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-format -Wno-error=unused-but-set-variable
 +  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-error=unused-but-set-variable
++  GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-error=unused-but-set-variable
    GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
    GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
- 
+   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized 
-Wno-error=incompatible-pointer-types -Wno-error=pointer-sign 
-Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
 diff --git 
a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
 
b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
-index fe28ee67..de03e6df 100644
+index 1b1d46b0..df9998a5 100644
 --- 
a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
 +++ 
b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
-@@ -605,9 +605,9 @@
+@@ -567,10 +567,10 @@
    #   -Werror=unused-but-set-variable: Warn whenever a local variable is 
assigned to, but otherwise unused (aside from its declaration).
    #
    GCC:*_*_IA32_CC_FLAGS    = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) 
-Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
@@ -54,15 +57,17 @@
 +  GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) 
-Wno-error=maybe-uninitialized -Wno-error=format 
-Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
    GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-error=unused-but-set-variable
 -  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-format -Wno-error=unused-but-set-variable
+-  GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-format -Wno-error=unused-but-set-variable
 +  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-error=unused-but-set-variable
++  GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized 
-Wno-error=unused-but-set-variable
    GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
    GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
- 
+   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized 
-Wno-error=incompatible-pointer-types -Wno-error=pointer-sign 
-Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
 diff --git a/src/VBox/Devices/Makefile.kmk b/src/VBox/Devices/Makefile.kmk
-index bd64e790..136e203b 100644
+index 02da1255..c2cbbc1c 100644
 --- a/src/VBox/Devices/Makefile.kmk
 +++ b/src/VBox/Devices/Makefile.kmk
-@@ -727,7 +727,7 @@ endif
+@@ -836,7 +836,7 @@ VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1
    ifeq ($(KBUILD_TARGET),win)
     $(file)_CFLAGS = -wd4018
    else
@@ -72,23 +77,23 @@
   endef
  
 diff --git a/src/VBox/Devices/PC/ipxe/Makefile.kmk 
b/src/VBox/Devices/PC/ipxe/Makefile.kmk
-index d35d50c0..64d0079b 100644
+index 8a611f6d..c57f0454 100644
 --- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
 +++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
-@@ -358,7 +358,7 @@ endif
+@@ -401,7 +401,7 @@ endif
   #
   BLDPROGS += ipxezbin
   ipxezbin_TEMPLATE = VBoxBldProg
-- ipxezbin_CFLAGS   = -Wno-format -Wno-unused-function
-+ ipxezbin_CFLAGS   = -Wno-unused-function
+- ipxezbin_CFLAGS   = -Wno-format -Wno-unused-function -Wno-pointer-arith
++ ipxezbin_CFLAGS   = -Wno-unused-function -Wno-pointer-arith
   ipxezbin_SOURCES  = src/util/zbin.c
+  ipxezbin_LIBS     = lzma # @todo Can't assume liblzma on the build system
  
- endif
 diff --git a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk 
b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
-index 4c1a863f..c1af03f6 100644
+index b2bd260b..133e7398 100644
 --- a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
 +++ b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
-@@ -107,7 +107,7 @@ if defined(VBOX_WITH_EXTPACK_VBOXDTRACE) && 
defined(VBOX_WITH_EXTPACK)
+@@ -118,7 +118,7 @@ if defined(VBOX_WITH_EXTPACK_VBOXDTRACE) && 
defined(VBOX_WITH_EXTPACK)
   VBoxDTraceCmd_DEFS.win = YY_USE_PROTOS=1 YYENABLE_NLS=0 YYLTYPE_IS_TRIVIAL=0
   VBoxDTraceCmd_SDKS = VBOX_ZLIB
   ifn1of ($(KBUILD_TARGET), win)
@@ -98,25 +103,47 @@
   VBoxDTraceCmd_INCS = \
        include \
 diff --git a/src/VBox/Main/webservice/Makefile.kmk 
b/src/VBox/Main/webservice/Makefile.kmk
-index 6e088b14..3c1d9fa7 100644
+index 072d066e..d2feea75 100644
 --- a/src/VBox/Main/webservice/Makefile.kmk
 +++ b/src/VBox/Main/webservice/Makefile.kmk
-@@ -273,7 +273,6 @@ ifdef VBOX_GSOAP_INSTALLED
-       $(VBOXWEB_OUT_DIR)/soapC-29.cpp
-   vboxsoap_CXXFLAGS += \
-       $(VBOX_GCC_Wno-vla) \
--      $(if-expr $(KBUILD_TARGET) == "win",,-Wno-format) \
-       $(if-expr $(KBUILD_TARGET) == "win",,-Wno-deprecated-declarations)
-   endif
-   vboxsoap_CLEAN := $(vboxsoap_SOURCES) # lazy bird
-@@ -284,7 +283,6 @@ ifdef VBOX_GSOAP_INSTALLED
+@@ -260,7 +260,7 @@ ifdef VBOX_GSOAP_INSTALLED
+   ifn1of ($(KBUILD_TARGET), win)
+    vboxsoap_CXXFLAGS += -Wno-shadow -Wno-parentheses 
$(VBOX_GCC_Wno-literal-suffix) \
+       $(VBOX_GCC_Wno-stringop-overflow) $(VBOX_GCC_Wno-stringop-truncation) \
+-      $(VBOX_GCC_Wno-vla) -Wno-format -Wno-deprecated-declarations 
$(VBOX_GCC_fno-printf-return-value)
++      $(VBOX_GCC_Wno-vla) -Wno-deprecated-declarations 
$(VBOX_GCC_fno-printf-return-value)
+    ifn1of ($(KBUILD_TYPE), debug) # Save time+memory by using -O0 instead of 
-O2.
+     vboxsoap_CXXFLAGS += -O0 ## @todo this could be interesting for g++ (not 
clang++): -fcprop-registers
+    endif
+@@ -331,7 +331,6 @@ ifdef VBOX_GSOAP_INSTALLED
        $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
    ifn1of ($(KBUILD_TARGET), win)
     $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS = \
 -      -Wno-format \
-        $(VBOX_GCC_Wno-int-in-bool-context) \
-       $(if $(VBOX_GCC_Wlogical-op),-Wno-error=logical-op,)
+       $(VBOX_GCC_Wno-int-in-bool-context) \
+       $(VBOX_GCC_Wno-logical-op)
     # currently necessary when compiling against OpenSSL 1.0 due to a missing
--- 
-2.34.1
-
+diff --git a/src/libs/xpcom18a4/Config.kmk b/src/libs/xpcom18a4/Config.kmk
+index 3b0831e5..a83a080b 100644
+--- a/src/libs/xpcom18a4/Config.kmk
++++ b/src/libs/xpcom18a4/Config.kmk
+@@ -243,8 +243,8 @@ TEMPLATE_XPCOMEXE_LDFLAGS.darwin   = -bind_at_load 
$(filter-out -current_version
+ #
+ TEMPLATE_XPCOMTSTEXE               = XPCOM executable files (testcases)
+ TEMPLATE_XPCOMTSTEXE_EXTENDS       = XPCOMEXE
+-TEMPLATE_XPCOMTSTEXE_CXXFLAGS      = $(TEMPLATE_XPCOMEXE_CXXFLAGS) -Wno-format
+-TEMPLATE_XPCOMTSTEXE_CFLAGS        = $(TEMPLATE_XPCOMEXE_CFLAGS)   -Wno-format
++TEMPLATE_XPCOMTSTEXE_CXXFLAGS      = $(TEMPLATE_XPCOMEXE_CXXFLAGS)
++TEMPLATE_XPCOMTSTEXE_CFLAGS        = $(TEMPLATE_XPCOMEXE_CFLAGS)  
+ TEMPLATE_XPCOMTSTEXE_INST          = $(INST_TESTCASE)
+ ifdef VBOX_WITH_RUNPATH
+  TEMPLATE_XPCOMTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' 
$(TEMPLATE_XPCOMEXE_LDFLAGS)
+@@ -277,7 +277,7 @@ TEMPLATE_XPCOMBLDPROG_INCS                = \
+       $(VBOX_PATH_SDK)/bindings/xpcom/include/string \
+       $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
+       $(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
+-TEMPLATE_XPCOMBLDPROG_CFLAGS             = $(filter-out -pedantic -Wshadow, 
$(TEMPLATE_VBOX_BLDPROG_CFLAGS)) $(VBOX_GCC_Wno-int-to-pointer-cast) 
$(VBOX_GCC_Wno-pointer-to-int-cast) -Wno-format
++TEMPLATE_XPCOMBLDPROG_CFLAGS             = $(filter-out -pedantic -Wshadow, 
$(TEMPLATE_VBOX_BLDPROG_CFLAGS)) $(VBOX_GCC_Wno-int-to-pointer-cast) 
$(VBOX_GCC_Wno-pointer-to-int-cast)
+ TEMPLATE_XPCOMBLDPROG_CXXFLAGS.darwin    = 
$(TEMPLATE_VBoxBldProg_CXXFLAGS.darwin)     -fpascal-strings -fshort-wchar 
-fno-common -fno-rtti
+ TEMPLATE_XPCOMBLDPROG_CXXFLAGS.solaris   = 
$(TEMPLATE_VBoxBldProg_CXXFLAGS.solaris)    -fno-omit-frame-pointer # for now 
anyway.
+ TEMPLATE_XPCOMBLDPROG_LDFLAGS.darwin     = 
$(TEMPLATE_VBoxBldProg_LDFLAGS.darwin)      -fpascal-strings -fshort-wchar 
-fno-rtti -fno-exceptions

Deleted: 009-i3wm.patch
===================================================================
--- 009-i3wm.patch      2022-10-18 10:09:32 UTC (rev 1331774)
+++ 009-i3wm.patch      2022-10-18 11:10:08 UTC (rev 1331775)
@@ -1,50 +0,0 @@
-diff -Naur 
VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
 
VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
---- 
VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
   2017-03-08 18:19:53.000000000 +0100
-+++ 
VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
   2017-03-10 10:25:58.876132400 +0100
-@@ -282,7 +282,7 @@
-     /* Get cached available-geometry: */
-     const QRect availableGeometry = 
m_availableGeometryData.value(iHostScreenIndex);
-     /* Return cached available-geometry if it's valid or screen-geometry 
otherwise: */
--    return availableGeometry.isValid() ? availableGeometry :
-+    return availableGeometry.isValid() && X11WindowManagerType() != 
X11WMType_i3 ? availableGeometry :
-            QApplication::desktop()->screenGeometry(iHostScreenIndex);
- #else /* !VBOX_WS_X11 */
-     /* Redirect call to desktop-widget: */
-diff -Naur 
VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp 
VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
---- 
VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp     
   2017-03-08 18:19:54.000000000 +0100
-+++ 
VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp     
   2017-03-10 10:23:15.729460200 +0100
-@@ -93,6 +93,9 @@
-                 else
-                 if (QString((const char*)pcData).contains("Xfwm4", 
Qt::CaseInsensitive))
-                     wmType = X11WMType_Xfwm4;
-+                else
-+                if (QString((const char*)pcData).contains("i3", 
Qt::CaseInsensitive))
-+                    wmType = X11WMType_i3;
-                 if (pcData)
-                     XFree(pcData);
-             }
-diff -Naur 
VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h 
VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
---- VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h  
2017-03-08 18:19:54.000000000 +0100
-+++ VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h  
2017-03-10 10:22:11.876123200 +0100
-@@ -27,6 +27,7 @@
-     X11WMType_KWin,
-     X11WMType_Mutter,
-     X11WMType_Xfwm4,
-+    X11WMType_i3,
- };
- 
- /** X11: Determines and returns whether the compositing manager is running. */
-diff -Naur 
VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp 
VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
---- VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp     
2017-03-08 18:19:58.000000000 +0100
-+++ VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp     
2017-03-10 10:29:12.549409400 +0100
-@@ -727,6 +727,10 @@
-     /* Enable translucency through Qt API if supported: */
-     if (vboxGlobal().isCompositingManagerRunning())
-         setAttribute(Qt::WA_TranslucentBackground);
-+
-+    if (X11WindowManagerType() == X11WMType_i3)
-+         setWindowFlags(Qt::FramelessWindowHint);
-+
- #endif /* VBOX_WS_X11 */
- 
-     /* Make sure we have no focus: */

Added: 009-properly-handle-i3wm.patch
===================================================================
--- 009-properly-handle-i3wm.patch                              (rev 0)
+++ 009-properly-handle-i3wm.patch      2022-10-18 11:10:08 UTC (rev 1331775)
@@ -0,0 +1,77 @@
+From 9284f5a37708ddf0108898a48eca5db0e5316a43 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <[email protected]>
+Date: Mon, 17 Oct 2022 16:35:53 +0200
+Subject: [PATCH] properly handle i3wm
+
+---
+ .../VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp        | 4 ++--
+ .../Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp   | 3 +++
+ .../Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h     | 3 ++-
+ src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp   | 4 ++++
+ 4 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git 
a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp 
b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
+index 9c5faa42..5439e2a7 100644
+--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
++++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
+@@ -443,8 +443,8 @@ const QRect UIDesktopWidgetWatchdog::availableGeometry(int 
iHostScreenIndex /* =
+     /* Get cached available-geometry: */
+     const QRect availableGeometry = 
m_availableGeometryData.value(iHostScreenIndex);
+     /* Return cached available-geometry if it's valid or screen-geometry 
otherwise: */
+-    return availableGeometry.isValid() ? availableGeometry :
+-           QApplication::desktop()->screenGeometry(iHostScreenIndex);
++    return availableGeometry.isValid() && 
NativeWindowSubsystem::X11WindowManagerType() != X11WMType_i3 ?
++           availableGeometry : 
QApplication::desktop()->screenGeometry(iHostScreenIndex);
+ #  endif /* !VBOX_GUI_WITH_CUSTOMIZATIONS1 */
+ # else /* !VBOX_WS_X11 */
+     /* Redirect call to desktop-widget: */
+diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp 
b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
+index 53927559..ea648da7 100644
+--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
++++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
+@@ -117,6 +117,9 @@ X11WMType NativeWindowSubsystem::X11WindowManagerType()
+                 else
+                 if (QString((const char*)pcData).contains("Xfwm4", 
Qt::CaseInsensitive))
+                     wmType = X11WMType_Xfwm4;
++                else
++                if (QString((const char*)pcData).contains("i3", 
Qt::CaseInsensitive))
++                    wmType = X11WMType_i3;
+                 if (pcData)
+                     XFree(pcData);
+             }
+diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h 
b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
+index bad78665..f2a0b462 100644
+--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
++++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
+@@ -49,6 +49,7 @@ enum X11WMType
+     X11WMType_Metacity,
+     X11WMType_Mutter,
+     X11WMType_Xfwm4,
++    X11WMType_i3,
+ };
+ 
+ /** X11: Screen-saver inhibit methods. */
+@@ -95,7 +96,7 @@
+     /** X11: Determines and returns whether the compositing manager is 
running. */
+     bool X11IsCompositingManagerRunning();
+     /** X11: Determines and returns current Window Manager type. */
+-    X11WMType X11WindowManagerType();
++    SHARED_LIBRARY_STUFF X11WMType X11WindowManagerType();
+ 
+ #if 0 // unused for now?
+     /** X11: Inits the screen saver save/restore mechanism. */
+diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp 
b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
+index 815db408..8cddb431 100644
+--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
++++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
+@@ -888,6 +888,10 @@ void UIMiniToolBar::prepare()
+     /* Enable translucency through Qt API if supported: */
+     if (uiCommon().isCompositingManagerRunning())
+         setAttribute(Qt::WA_TranslucentBackground);
++
++    if (NativeWindowSubsystem::X11WindowManagerType() == X11WMType_i3)
++         setWindowFlags(Qt::FramelessWindowHint);
++
+ #endif /* VBOX_WS_X11 */
+ 
+     /* Make sure we have no focus: */

Deleted: 013-Makefile.patch
===================================================================
--- 013-Makefile.patch  2022-10-18 10:09:32 UTC (rev 1331774)
+++ 013-Makefile.patch  2022-10-18 11:10:08 UTC (rev 1331775)
@@ -1,44 +0,0 @@
-diff --git a/src/VBox/HostDrivers/linux/Makefile 
b/src/VBox/HostDrivers/linux/Makefile
-index 18466b48..7c7de4e5 100644
---- a/src/VBox/HostDrivers/linux/Makefile
-+++ b/src/VBox/HostDrivers/linux/Makefile
-@@ -23,25 +23,25 @@
- # terms and conditions of either the GPL or the CDDL or both.
- #
- 
--ifneq ($(KERNELRELEASE),)
-+ifneq ($(KBUILD_EXTMOD),)
- 
--# Building from kBuild (make -C <kernel_directory> M=`pwd`),
--# or inside a kernel source tree.
-+# Building from kBuild (make -C <kernel_directory> M=`pwd`).
-+# KBUILD_EXTMOD is set to $(M) in this case.
- 
- obj-m = vboxdrv/
--ifneq ($(wildcard $(CURDIR)/vboxnetflt/Makefile),)
-+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),)
-  obj-m += vboxnetflt/
- endif
--ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
-+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),)
-  obj-m += vboxnetadp/
- endif
--ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
-+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci/Makefile),)
-  obj-m += vboxpci/
- endif
- 
--else # ! KERNELRELEASE
-+else # ! KBUILD_EXTMOD
- 
--# convenience Makefile without KERNELRELEASE
-+# convenience Makefile without KBUILD_EXTMOD
- 
- KBUILD_VERBOSE ?=
- KERN_VER ?= $(shell uname -r)
-@@ -146,4 +146,4 @@ load: unload
-               fi; \
-       done
- 
--endif # ! KERNELRELEASE
-+endif # ! KBUILD_EXTMOD

Added: 013-support-building-from-dkms.patch
===================================================================
--- 013-support-building-from-dkms.patch                                (rev 0)
+++ 013-support-building-from-dkms.patch        2022-10-18 11:10:08 UTC (rev 
1331775)
@@ -0,0 +1,54 @@
+From eb9ded87d9d1a6755f2bb7258641c9c80c54c347 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <[email protected]>
+Date: Mon, 17 Oct 2022 16:30:32 +0200
+Subject: [PATCH] support building from dkms
+
+---
+ src/VBox/HostDrivers/linux/Makefile | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/VBox/HostDrivers/linux/Makefile 
b/src/VBox/HostDrivers/linux/Makefile
+index badeb4f4..314281f3 100644
+--- a/src/VBox/HostDrivers/linux/Makefile
++++ b/src/VBox/HostDrivers/linux/Makefile
+@@ -33,25 +33,25 @@
+ # SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
+ #
+ 
+-ifneq ($(KERNELRELEASE),)
++ifneq ($(KBUILD_EXTMOD),)
+ 
+-# Building from kBuild (make -C <kernel_directory> M=`pwd`),
+-# or inside a kernel source tree.
++# Building from kBuild (make -C <kernel_directory> M=`pwd`).
++# KBUILD_EXTMOD is set to $(M) in this case.
+ 
+ obj-m = vboxdrv/
+- ifneq ($(wildcard $(CURDIR)/vboxnetflt/Makefile),)
++ ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),)
+ obj-m += vboxnetflt/
+  endif
+- ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
++ ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),)
+ obj-m += vboxnetadp/
+  endif
+- ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
++ ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci/Makefile),)
+ obj-m += vboxpci/
+  endif
+ 
+-else # ! KERNELRELEASE
++else # ! KBUILD_EXTMOD
+ 
+-# convenience Makefile without KERNELRELEASE
++# convenience Makefile without KBUILD_EXTMOD
+ 
+ ifndef SUDO
+  ifneq ($(shell id -u),0)
+@@ -244,5 +244,5 @@ load: unload
+               fi; \
+       done
+ 
+-endif # ! KERNELRELEASE
++endif # ! KBUILD_EXTMOD
+ 

Deleted: 017-fix-narrowing-conversion.patch
===================================================================
--- 017-fix-narrowing-conversion.patch  2022-10-18 10:09:32 UTC (rev 1331774)
+++ 017-fix-narrowing-conversion.patch  2022-10-18 11:10:08 UTC (rev 1331775)
@@ -1,37 +0,0 @@
-From ee6ae088673d14c407d4773855dbda821024653c Mon Sep 17 00:00:00 2001
-From: Christian Hesse <[email protected]>
-Date: Sun, 17 May 2020 00:40:18 +0200
-Subject: [PATCH 1/1] fix narrowing conversion
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Building fails with:
-
-/build/virtualbox/src/VirtualBox-6.1.8/src/VBox/Debugger/DBGCDumpImage.cpp: In 
function ‘const char* dbgcMachoCpuType(uint32_t, uint32_t)’:
-/build/virtualbox/src/VirtualBox-6.1.8/include/iprt/formats/mach-o.h:41:46: 
error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ [-Wnarrowing]
-   41 | #define CPU_TYPE_ANY                INT32_C(-1)
-      |                                              ^
-/build/virtualbox/src/VirtualBox-6.1.8/src/VBox/Debugger/DBGCDumpImage.cpp:471:14:
 note: in expansion of macro ‘CPU_TYPE_ANY’
-  471 |         case CPU_TYPE_ANY:          return "CPU_TYPE_ANY";
-      |              ^~~~~~~~~~~~
-
-As uType is unsigned it can never match CPU_TYPE_ANY, which is -1.
-
-Signed-off-by: Christian Hesse <[email protected]>
----
- src/VBox/Debugger/DBGCDumpImage.cpp | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/VBox/Debugger/DBGCDumpImage.cpp 
b/src/VBox/Debugger/DBGCDumpImage.cpp
-index 02ba3158..d906c37c 100644
---- a/src/VBox/Debugger/DBGCDumpImage.cpp
-+++ b/src/VBox/Debugger/DBGCDumpImage.cpp
-@@ -468,7 +468,6 @@ static const char *dbgcMachoCpuType(uint32_t uType, 
uint32_t uSubType)
- {
-     switch (uType)
-     {
--        case CPU_TYPE_ANY:          return "CPU_TYPE_ANY";
-         case CPU_TYPE_VAX:          return "VAX";
-         case CPU_TYPE_MC680x0:      return "MC680x0";
-         case CPU_TYPE_X86:          return "X86";

Added: 018-upate-xclient-script.patch
===================================================================
--- 018-upate-xclient-script.patch                              (rev 0)
+++ 018-upate-xclient-script.patch      2022-10-18 11:10:08 UTC (rev 1331775)
@@ -0,0 +1,35 @@
+From 12e0a15f8893187ee92fa5af8095b8bb33adefe5 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <[email protected]>
+Date: Mon, 17 Oct 2022 16:40:29 +0200
+Subject: [PATCH] upate xclient script
+
+---
+ src/VBox/Additions/x11/Installer/98vboxadd-xclient | 13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/src/VBox/Additions/x11/Installer/98vboxadd-xclient 
b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
+index 7c9b5989..271261a4 100755
+--- a/src/VBox/Additions/x11/Installer/98vboxadd-xclient
++++ b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
+@@ -31,18 +31,11 @@ for i in $HOME/.vboxclient-*.pid; do
+     test -w $i || rm -f $i
+ done
+ 
+-if ! test -c /dev/vboxguest 2>/dev/null; then
+-   # Do not start if the kernel module is not present.
+-   # Execute notify-send in the back-ground to avoid racing with sddm,
+-   # as notify-send may wait for sddm to start while it waits for us to exit.
+-   notify-send "VBoxClient: the VirtualBox kernel service is not running.  
Exiting." &
+-elif test -z "${SSH_CONNECTION}"; then
+-   # This script can also be triggered by a connection over SSH, which is not
+-   # what we had in mind, so we do not start VBoxClient in that case.  We do
+-   # not use "exit" here as this script is "source"d, not executed.
++# Do not start if the kernel module is not present; or if this script is
++# triggered by a connection over SSH.
++if [ -c /dev/vboxguest -a -z "${SSH_CONNECTION}" ]; then
+   /usr/bin/VBoxClient --clipboard
+   /usr/bin/VBoxClient --checkhostversion
+   /usr/bin/VBoxClient --seamless
+   /usr/bin/VBoxClient --draganddrop
+-  /usr/bin/VBoxClient --vmsvga-session # In case VMSVGA emulation is enabled
+ fi

Deleted: 018-xclient.patch
===================================================================
--- 018-xclient.patch   2022-10-18 10:09:32 UTC (rev 1331774)
+++ 018-xclient.patch   2022-10-18 11:10:08 UTC (rev 1331775)
@@ -1,24 +0,0 @@
---- a/src/VBox/Additions/x11/Installer/98vboxadd-xclient
-+++ b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
-@@ -21,18 +21,11 @@ for i in $HOME/.vboxclient-*.pid; do
-     test -w $i || rm -f $i
- done
-
--if ! test -c /dev/vboxguest 2>/dev/null; then
--   # Do not start if the kernel module is not present.
--   # Execute notify-send in the back-ground to avoid racing with sddm,
--   # as notify-send may wait for sddm to start while it waits for us to exit.
--   notify-send "VBoxClient: the VirtualBox kernel service is not running.  
Exiting." &
--elif test -z "${SSH_CONNECTION}"; then
--   # This script can also be triggered by a connection over SSH, which is not
--   # what we had in mind, so we do not start VBoxClient in that case.  We do
--   # not use "exit" here as this script is "source"d, not executed.
-+# Do not start if the kernel module is not present; or if this script is
-+# triggered by a connection over SSH.
-+if [ -c /dev/vboxguest -a -z "${SSH_CONNECTION}" ]; then
-   /usr/bin/VBoxClient --clipboard
-   /usr/bin/VBoxClient --checkhostversion
-   /usr/bin/VBoxClient --seamless
-   /usr/bin/VBoxClient --draganddrop
--  /usr/bin/VBoxClient --vmsvga  # In case VMSVGA emulation is enabled
- fi

Modified: LocalConfig.kmk
===================================================================
--- LocalConfig.kmk     2022-10-18 10:09:32 UTC (rev 1331774)
+++ LocalConfig.kmk     2022-10-18 11:10:08 UTC (rev 1331775)
@@ -3,7 +3,7 @@
 VBOX_WITH_TESTSUITE :=
 VBOX_WITH_VALIDATIONKIT :=
 
-# no legacy X.org - use KMS
+# no legacy X.org - use system xorg and gl headers
 VBOX_USE_SYSTEM_XORG_HEADERS = 1
 VBOX_NO_LEGACY_XORG_X11 = 1
 
@@ -25,10 +25,6 @@
 # fix gsoap missing zlib include and produce errors with --as-needed
 VBOX_GSOAP_CXX_LIBS := gsoapssl++ z
 
-# use system xorg and gl headers
-VBOX_USE_SYSTEM_XORG_HEADERS = 1
-VBOX_USE_SYSTEM_GL_HEADERS = 1
-
 # no update request. update are handled via pacman
 VBOX_WITH_UPDATE_REQUEST := 0
 
@@ -37,3 +33,8 @@
 
 # disable experimental cloud infrastructure integration
 VBOX_WITH_CLOUD_NET :=
+
+# enable features
+VBOX_WITH_VBOX_IMG = 1
+VBOX_WITH_VBOXIMGMOUNT = 1
+VBOX_WITH_VBOXSDL = 1

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-10-18 10:09:32 UTC (rev 1331774)
+++ PKGBUILD    2022-10-18 11:10:08 UTC (rev 1331775)
@@ -1,19 +1,20 @@
-# Maintainer: Sébastien "Seblu" Luttringer
+# Maintainer: Christian Hesse <[email protected]>
+# Contributor: Sébastien "Seblu" Luttringer
 # Contributor: Ionut Biru <[email protected]>
 
 pkgbase=virtualbox
 pkgname=('virtualbox'
+         'virtualbox-sdk'
          'virtualbox-host-dkms'
-         'virtualbox-sdk'
          'virtualbox-guest-utils'
          'virtualbox-guest-utils-nox'
          'virtualbox-ext-vnc')
-pkgver=6.1.40
+pkgver=7.0.0
 _tarver=${pkgver}
 pkgrel=1
 arch=('x86_64')
 url='https://virtualbox.org/'
-license=('GPL' 'custom')
+license=('GPL' 'custom:CDDL')
 makedepends=('alsa-lib'
              'bin86'
              'cdrkit'
@@ -23,6 +24,7 @@
              'git'
              'glu'
              'gsoap'
+             'glslang'
              'iasl'
              'jdk8-openjdk'
              'libidl2'
@@ -42,14 +44,15 @@
              'opus'
              'python'
              'qt5-base'
+             'qt5-tools'
              'qt5-x11extras'
-             'qt5-tools'
              'sdl'
              'sdl_ttf'
              'vde2'
              'xalan-c'
              'xorgproto'
-             'xorg-server-devel')
+             'xorg-server-devel'
+             'yasm')
 
source=("https://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${_tarver}.tar.bz2";
         'virtualbox-host-dkms.conf'
         'virtualbox.sysusers'
@@ -66,20 +69,18 @@
         '001-disable-update.patch'
         '004-drop-Wno-format.patch'
         '005-gsoap-build.patch'
-        '006-rdesktop-vrdp-keymap-path.patch'
         '008-no-vboxvideo.patch'
-        '009-i3wm.patch'
+        '009-properly-handle-i3wm.patch'
         '012-vbglR3GuestCtrlDetectPeekGetCancelSupport.patch'
-        '013-Makefile.patch'
-        '017-fix-narrowing-conversion.patch'
-        '018-xclient.patch')
-sha256sums=('bc857555d3e836ad9350a8f7b03bb54d2fdc04dddb2043d09813f4634bca4814'
+        '013-support-building-from-dkms.patch'
+        '018-upate-xclient-script.patch')
+sha256sums=('1e5b321bf20eec03154e2b3e16331f827a472d6e8e5b1e04c27041978975a97a'
             '76d98ea062fcad9e5e3fa981d046a6eb12a3e718a296544a68b66f4b65cb56db'
             '2101ebb58233bbfadf3aa74381f22f7e7e508559d2b46387114bc2d8e308554c'
             'da4c49f6ca94e047e196cdbcba2c321199f4760056ea66e0fbc659353e128c9e'
             'f876e9f55243eded423fda4fc2ffe3b174dca90380a6315f7c9b3cd1c9d07206'
             '033c597e0f5285d2ddb0490868e5b6f945f45c7b1b1152a02a9e6fea438b2c95'
-            '3cf42bc6e9e55fd2cb6be7b89c5b98d0f6a2eff6125a9ee7efafaabc35f1de22'
+            '0ae014c6bb778a1b079121064f17179c27b8dde9479a37d34ce071fb3b084e25'
             'c41a801fe344a4471a7b61a4764d1d857c403e4fb96e2ba6bc89c77a35f2be7a'
             '01dbb921bd57a852919cc78be5b73580a564f28ebab2fe8d6c9b8301265cbfce'
             '83d8f24bff25bb925083cf39b3195236c6136105e62417712cc3f25b92e14b47'
@@ -87,30 +88,28 @@
             'e6e875ef186578b53106d7f6af48e426cdaf1b4e86834f01696b8ef1c685787f'
             '4001b5927348fe669a541e80526d4f9ea91b883805f102f7d571edbb482a9b9d'
             '9ee947c9b5ec5b25f52d3e72340fc3a57ca6e65a604e15b669ac582a3fb0dc1b'
-            '2ef32b9f6df4c5489751de36446f29825b4602048ee6d5e59573e4b01c8f4846'
+            'f11d8bd17e4e2a13d00a621373a2c26e5703870f110ea7de78c540d7d169e734'
             '7d2da8fe10a90f76bbfc80ad1f55df4414f118cd10e10abfb76070326abebd46'
-            '13c6ca9be0f91582445fd2a14a8c58a0625a15d9cb98cb6e8c2736d77ea976ab'
             '053bfeee8863f3ffdf2f0e3f9f0d77dc61dd32764700a97a7635fd8611e20491'
-            'c1e13ea4340cff681b273408b1e7f38c887ff8dab6923db390aa58d5ae0f82fa'
+            'c74a5daca598c12d375026fddc557b487d213fe46bb1c8ef1f7b6d1c44500eb4'
             '81900e13d36630488accd8c0bfd2ceb69563fb2c4f0f171caba1cca59d438024'
-            'da7e58ed37dc23c6202aab3017864579a99e78417f3421ddcc98a198198fe2c9'
-            '5aac692909a0a0ec56b08bdece9e42cf7463abdca9da2f990d441ff463be6a99'
-            'cac5a573e9ed5aafb2f469c2e6fffb8cd4f389bbadba5a968c9f65be7a72fee3')
+            '00f68b86d32a1fada900c2da8dad2ab4215106cd58004f049bded99727cda2ff'
+            '87dddfd9047480e4c2b73367facf5dd3702148418c2efcd606af17c07da90fe0')
 
 prepare() {
-    cd "VirtualBox-$pkgver"
+    cd "VirtualBox-${pkgver}"
 
     # apply patch from the source array (should be a pacman feature)
     local filename
     for filename in "${source[@]}"; do
-        if [[ "$filename" =~ \.patch$ ]]; then
+        if [[ "${filename}" =~ \.patch$ ]]; then
             echo "Applying patch ${filename##*/}"
-            patch -p1 -N -i "$srcdir/${filename##*/}"
+            patch -p1 -N -i "${srcdir}/${filename##*/}"
         fi
     done
 
     echo 'Applying local config'
-    cp "$srcdir/LocalConfig.kmk" .
+    cp "${srcdir}/LocalConfig.kmk" .
 
     echo 'Use our CFLAGS'
     echo "VBOX_GCC_OPT=$CXXFLAGS" >> LocalConfig.kmk
@@ -117,7 +116,7 @@
 }
 
 build() {
-    cd "VirtualBox-$pkgver"
+    cd "VirtualBox-${pkgver}"
 
     echo 'Build virtualbox'
     ./configure \
@@ -133,14 +132,8 @@
     source ./env.sh
     kmk
 
-    echo 'Build rdesktop-vrdp'
-    kmk -C src/VBox/RDP/client-1.8.4
-
     echo 'Build VNC extension pack'
     kmk -C src/VBox/ExtPacks/VNC packing
-
-    echo 'Build vboximg-mount'
-    kmk -C src/VBox/ImageMounter/vboximg-mount
 }
 
 package_virtualbox() {
@@ -148,7 +141,8 @@
     depends=('glibc' 'openssl' 'curl' 'gcc-libs' 'libpng' 'python' 'sdl'
              'libvpx' 'libxml2' 'procps-ng' 'shared-mime-info' 'zlib'
              'libxcursor' 'libxinerama' 'libx11' 'libxext' 'libxmu' 'libxt'
-             'opus' 'qt5-base' 'qt5-x11extras' 'VIRTUALBOX-HOST-MODULES')
+             'opus' 'qt5-base' 'qt5-tools' 'qt5-x11extras'
+             'VIRTUALBOX-HOST-MODULES')
     optdepends=('vde2: Virtual Distributed Ethernet support'
                 'virtualbox-guest-iso: Guest Additions CD image'
                 'virtualbox-ext-vnc: VNC server support'
@@ -157,85 +151,82 @@
     replaces=('virtualbox-ose')
     conflicts=('virtualbox-ose')
 
-    source "VirtualBox-$pkgver/env.sh"
-    cd "VirtualBox-$pkgver/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
+    source "VirtualBox-${pkgver}/env.sh"
+    cd "VirtualBox-${pkgver}/out/linux.${BUILD_PLATFORM_ARCH}/release/bin"
 
-    # binaries
-    install -dm0755 "$pkgdir/usr/bin"
-    install -m0755 VBox.sh "$pkgdir/usr/bin/VBox"
-    for i in VBoxHeadless VBoxManage VBoxSDL VirtualBox vboxwebsrv 
VBoxBalloonCtrl; do
-        ln -sf VBox "$pkgdir/usr/bin/$i"
-        ln -sf VBox "$pkgdir/usr/bin/${i,,}"
-    done
-    install -m0755 VBoxTunctl "$pkgdir/usr/bin"
-    install -m0755 rdesktop-vrdp "$pkgdir/usr/bin"
-    install -m0755 vboximg-mount "$pkgdir/usr/bin"
-
-    # libraries
-    install -dm0755 "$pkgdir/usr/lib/virtualbox"
-    install -m0755 *.so "$pkgdir/usr/lib/virtualbox"
-    install -m0644 *.r0 VBoxEFI*.fd "$pkgdir/usr/lib/virtualbox"
+    # libraries (and non-PATH executables)
+    install -d -m0755 "${pkgdir}/usr/lib/virtualbox"
+    install -m0755 *.so -t "${pkgdir}/usr/lib/virtualbox"
+    install -m0644 *.r0 VBoxEFI*.fd -t "${pkgdir}/usr/lib/virtualbox"
     ## setuid root binaries
-    install -m4755 VBoxSDL VirtualBoxVM VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl 
VBoxNetNAT -t "$pkgdir/usr/lib/virtualbox"
+    install -m4755 VirtualBoxVM VBoxSDL VBoxHeadless VBoxNetAdpCtl VBoxNetDHCP 
VBoxNetNAT -t "${pkgdir}/usr/lib/virtualbox"
     ## other binaries
-    install -m0755 VirtualBox VBoxManage VBoxSVC VBoxExtPackHelperApp 
VBoxXPCOMIPCD VBoxTestOGL VBoxBalloonCtrl vboxwebsrv webtest -t 
"$pkgdir/usr/lib/virtualbox"
+    install -m0755 VirtualBox VBoxManage VBoxSVC VBoxExtPackHelperApp 
VBoxXPCOMIPCD VBoxTestOGL VBoxBalloonCtrl vbox-img vboximg-mount vboxwebsrv 
webtest -t "${pkgdir}/usr/lib/virtualbox"
 
+    # binaries (in /usr/bin)
+    install -d -m0755 "${pkgdir}/usr/bin"
+    install -m0755 VBox.sh "${pkgdir}/usr/bin/VBox"
+    for i in VirtualBox VirtualBoxVM VBoxManage VBoxSDL VBoxHeadless 
VBoxBugReport VBoxBalloonCtrl VBoxAutostart vboxwebsrv; do
+        ln -sf VBox "${pkgdir}/usr/bin/${i}"
+        ln -sf VBox "${pkgdir}/usr/bin/${i,,}"
+    done
+    for i in vbox-img vboximg-mount; do
+        ln -s ../lib/virtualbox/"${i}" "${pkgdir}/usr/bin/${i}"
+    done
+
     # components
-    install -dm0755 "$pkgdir/usr/lib/virtualbox/components"
-    install -m0755 components/* -t "$pkgdir/usr/lib/virtualbox/components"
+    install -d -m0755 "${pkgdir}/usr/lib/virtualbox/components"
+    install -m0755 components/* -t "${pkgdir}/usr/lib/virtualbox/components"
 
     # extensions packs
     ## as virtualbox install itself stuff in this directory, move it to /var 
and
     ## trick it with a symlink
     ## FIXME: trick is disabled for now
-    #install -dm0755 "$pkgdir/var/lib/virtualbox/extensions"
-    #install -dm0755 "$pkgdir/usr/share/virtualbox/extensions"
-    #ln -s ../../../var/lib/virtualbox/extensions 
"$pkgdir/usr/lib/virtualbox/ExtensionPacks"
-    install -dm0755 "$pkgdir/usr/lib/virtualbox/ExtensionPacks"
+    #install -d -m0755 "${pkgdir}/var/lib/virtualbox/extensions"
+    #install -d -m0755 "${pkgdir}/usr/share/virtualbox/extensions"
+    #ln -s ../../../var/lib/virtualbox/extensions 
"${pkgdir}/usr/lib/virtualbox/ExtensionPacks"
+    install -d -m0755 "${pkgdir}/usr/lib/virtualbox/ExtensionPacks"
 
     # languages
-    install -dm0755 "$pkgdir/usr/share/virtualbox/nls"
-    install -m0755 nls/*.qm -t "$pkgdir/usr/share/virtualbox/nls"
+    install -d -m0755 "${pkgdir}/usr/share/virtualbox/nls"
+    install -m0755 nls/*.qm -t "${pkgdir}/usr/share/virtualbox/nls"
 
-    # rdesktop keymaps
-    install -dm0755 "$pkgdir/usr/share/virtualbox/rdesktop-vrdp-keymaps"
-    install -m0644 rdesktop-vrdp-keymaps/* 
"$pkgdir/usr/share/virtualbox/rdesktop-vrdp-keymaps"
-
     # useless scripts
-    install -m0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh -t 
"$pkgdir/usr/share/virtualbox"
+    install -m0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh -t 
"${pkgdir}/usr/share/virtualbox"
 
     # icons
-    install -Dm0644 VBox.png "$pkgdir/usr/share/pixmaps/VBox.png"
+    install -D -m0644 VBox.png "${pkgdir}/usr/share/pixmaps/VBox.png"
 
     pushd icons >/dev/null
     for i in *; do
-        install -d "$pkgdir/usr/share/icons/hicolor/$i/mimetypes"
-        cp $i/* "$pkgdir/usr/share/icons/hicolor/$i/mimetypes"
+        install -d "${pkgdir}/usr/share/icons/hicolor/${i}/mimetypes"
+        cp "${i}/"* "${pkgdir}/usr/share/icons/hicolor/${i}/mimetypes"
     done
     popd >/dev/null
 
     #desktop
-    install -Dm0644 virtualbox.desktop 
"$pkgdir/usr/share/applications/virtualbox.desktop"
-    install -Dm0644 virtualbox.xml 
"$pkgdir/usr/share/mime/packages/virtualbox.xml"
+    install -D -m0644 virtualbox.desktop 
"${pkgdir}/usr/share/applications/virtualbox.desktop"
+    install -D -m0644 virtualbox.xml 
"${pkgdir}/usr/share/mime/packages/virtualbox.xml"
 
     #install configuration
-    install -dm0755 "$pkgdir/etc/vbox"
-    echo 'INSTALL_DIR=/usr/lib/virtualbox' > "$pkgdir/etc/vbox/vbox.cfg"
+    install -d -m0755 "${pkgdir}/etc/vbox"
+    echo 'INSTALL_DIR=/usr/lib/virtualbox' > "${pkgdir}/etc/vbox/vbox.cfg"
 
     # back to srcdir
-    cd "$srcdir"
+    cd "${srcdir}"
 
     #licence
-    install -Dm0644 VirtualBox-$pkgver/COPYING 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+    install -D -m0644 VirtualBox-${pkgver}/COPYING 
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    install -D -m0644 VirtualBox-${pkgver}/COPYING.CDDL 
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.CDDL"
 
     # install systemd stuff
-    install -Dm0644 60-vboxdrv.rules 
"$pkgdir/usr/lib/udev/rules.d/60-vboxdrv.rules"
-    install -Dm0644 vboxweb.service 
"$pkgdir/usr/lib/systemd/system/vboxweb.service"
-    install -Dm0644 virtualbox.sysusers 
"$pkgdir/usr/lib/sysusers.d/virtualbox.conf"
+    install -D -m0644 60-vboxdrv.rules 
"${pkgdir}/usr/lib/udev/rules.d/60-vboxdrv.rules"
+    install -D -m0644 vboxweb.service 
"${pkgdir}/usr/lib/systemd/system/vboxweb.service"
+    install -D -m0644 virtualbox.sysusers 
"${pkgdir}/usr/lib/sysusers.d/virtualbox.conf"
 
     # install module reloading shortcut (with a symlink with default helper)
-    install -Dm0755 vboxreload "$pkgdir/usr/bin"
-    ln -s vboxreload "$pkgdir/usr/bin/rcvboxdrv"
+    install -D -m0755 vboxreload "${pkgdir}/usr/bin"
+    ln -s vboxreload "${pkgdir}/usr/bin/rcvboxdrv"
 }
 
 package_virtualbox-sdk() {
@@ -242,21 +233,23 @@
     pkgdesc='VirtualBox Software Developer Kit (SDK)'
     depends=('python')
 
-    install -dm0755 "$pkgdir/usr/lib/virtualbox"
+    install -d -m0755 "${pkgdir}/usr/lib/virtualbox"
 
-    source "VirtualBox-$pkgver/env.sh"
-    cd "VirtualBox-$pkgver/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
+    source "VirtualBox-${pkgver}/env.sh"
+    cd "VirtualBox-${pkgver}/out/linux.${BUILD_PLATFORM_ARCH}/release/bin"
 
-    install -Dm0755 vboxshell.py "$pkgdir/usr/lib/virtualbox/vboxshell.py"
+    install -D -m0755 vboxshell.py "${pkgdir}/usr/lib/virtualbox/vboxshell.py"
     # python sdk
     pushd sdk/installer
-    VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install 
--root "$pkgdir"
+    VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install 
--root "${pkgdir}"
     popd
-    cp -r sdk "$pkgdir/usr/lib/virtualbox"
-    rm -r "$pkgdir/usr/lib/virtualbox/sdk/installer"
+    cp -r sdk "${pkgdir}/usr/lib/virtualbox"
+    rm -r "${pkgdir}/usr/lib/virtualbox/sdk/installer"
     # licence
-    install -Dm0644 "$srcdir/VirtualBox-$pkgver/COPYING" \
-        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING.CDDL" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.CDDL"
 }
 
 package_virtualbox-host-dkms() {
@@ -269,21 +262,23 @@
     provides=('VIRTUALBOX-HOST-MODULES')
     install=virtualbox-host-dkms.install
 
-    install -dm0755 "$pkgdir/usr/src"
-    source "VirtualBox-$pkgver/env.sh"
-    cd "VirtualBox-$pkgver/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
-    cp -r src "$pkgdir/usr/src/vboxhost-${pkgver}_OSE"
+    install -d -m0755 "${pkgdir}/usr/src"
+    source "VirtualBox-${pkgver}/env.sh"
+    cd "VirtualBox-${pkgver}/out/linux.${BUILD_PLATFORM_ARCH}/release/bin"
+    cp -r src "${pkgdir}/usr/src/vboxhost-${pkgver}_OSE"
     # licence
-    install -Dm0644 "$srcdir/VirtualBox-$pkgver/COPYING" \
-        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING.CDDL" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.CDDL"
     # module loading
-    local _p="$pkgdir/usr/lib/modules-load.d/$pkgname.conf"
-    install -Dm0644 /dev/null "$_p"
-    printf "vboxdrv\nvboxnetadp\nvboxnetflt\n" > "$_p"
+    local _p="${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
+    install -D -m0644 /dev/null "${_p}"
+    printf "vboxdrv\nvboxnetadp\nvboxnetflt\n" > "${_p}"
     # starting vbox 5.1, dkms.conf file was dropped
-    local _p="$pkgdir/usr/src/vboxhost-${pkgver}_OSE/dkms.conf"
-    install -Dm0644 "$srcdir/$pkgname.conf" "$_p"
-    sed -i "s,@VERSION@,$pkgver," "$_p"
+    local _p="${pkgdir}/usr/src/vboxhost-${pkgver}_OSE/dkms.conf"
+    install -D -m0644 "${srcdir}/${pkgname}.conf" "${_p}"
+    sed -i "s,@VERSION@,${pkgver}," "${_p}"
 }
 
 package_virtualbox-guest-utils() {
@@ -299,24 +294,25 @@
                'virtualbox-guest-utils-nox'
                'virtualbox-guest-dkms')
 
-    source "VirtualBox-$pkgver/env.sh"
-    pushd 
"VirtualBox-$pkgver/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
-    install -d "$pkgdir/usr/bin"
-    install -m0755 VBoxClient VBoxControl VBoxDRMClient VBoxService 
"$pkgdir/usr/bin"
-    install -m0755 -D 
"$srcdir"/VirtualBox-$pkgver/src/VBox/Additions/x11/Installer/98vboxadd-xclient 
\
-        "$pkgdir"/usr/bin/VBoxClient-all
-    install -m0644 -D 
"$srcdir"/VirtualBox-$pkgver/src/VBox/Additions/x11/Installer/vboxclient.desktop
 \
-        "$pkgdir"/etc/xdg/autostart/vboxclient.desktop
-    install -m0755 -D pam_vbox.so "$pkgdir/usr/lib/security/pam_vbox.so"
+    source "VirtualBox-${pkgver}/env.sh"
+    pushd 
"VirtualBox-${pkgver}/out/linux.${BUILD_PLATFORM_ARCH}/release/bin/additions"
+    install -d "${pkgdir}/usr/bin"
+    install -m0755 VBoxAudioTest VBoxClient VBoxControl VBoxDRMClient 
VBoxService "${pkgdir}/usr/bin"
+    install -m0755 -D 
"${srcdir}"/VirtualBox-${pkgver}/src/VBox/Additions/x11/Installer/98vboxadd-xclient
 \
+        "${pkgdir}"/usr/bin/VBoxClient-all
+    install -m0644 -D 
"${srcdir}"/VirtualBox-${pkgver}/src/VBox/Additions/x11/Installer/vboxclient.desktop
 \
+        "${pkgdir}"/etc/xdg/autostart/vboxclient.desktop
+    install -m0755 -D pam_vbox.so "${pkgdir}/usr/lib/security/pam_vbox.so"
     popd
     # systemd stuff
-    install -Dm0644 60-vboxguest.rules 
"$pkgdir/usr/lib/udev/rules.d/60-vboxguest.rules"
-    install -Dm0644 vboxdrmclient.path 
"$pkgdir/usr/lib/systemd/system/vboxdrmclient.path"
-    install -Dm0644 vboxdrmclient.service 
"$pkgdir/usr/lib/systemd/system/vboxdrmclient.service"
-    install -Dm0644 vboxservice.service 
"$pkgdir/usr/lib/systemd/system/vboxservice.service"
-    install -Dm0644 virtualbox-guest-utils.sysusers 
"$pkgdir/usr/lib/sysusers.d/virtualbox-guest-utils.conf"
+    install -D -m0644 60-vboxguest.rules 
"${pkgdir}/usr/lib/udev/rules.d/60-vboxguest.rules"
+    install -D -m0644 vboxdrmclient.path 
"${pkgdir}/usr/lib/systemd/system/vboxdrmclient.path"
+    install -D -m0644 vboxdrmclient.service 
"${pkgdir}/usr/lib/systemd/system/vboxdrmclient.service"
+    install -D -m0644 vboxservice.service 
"${pkgdir}/usr/lib/systemd/system/vboxservice.service"
+    install -D -m0644 virtualbox-guest-utils.sysusers 
"${pkgdir}/usr/lib/sysusers.d/virtualbox-guest-utils.conf"
     # licence
-    install -Dm0644 VirtualBox-$pkgver/COPYING 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+    install -D -m0644 VirtualBox-${pkgver}/COPYING 
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    install -D -m0644 VirtualBox-${pkgver}/COPYING.CDDL 
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.CDDL"
 }
 
 package_virtualbox-guest-utils-nox() {
@@ -326,19 +322,21 @@
     conflicts=('virtualbox-guest-utils'
                'virtualbox-guest-dkms')
 
-    source "VirtualBox-$pkgver/env.sh"
-    pushd 
"VirtualBox-$pkgver/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions"
-    install -d "$pkgdir/usr/bin"
-    install -m0755 VBoxControl VBoxService "$pkgdir/usr/bin"
-    install -m0755 -D pam_vbox.so "$pkgdir/usr/lib/security/pam_vbox.so"
+    source "VirtualBox-${pkgver}/env.sh"
+    pushd 
"VirtualBox-${pkgver}/out/linux.${BUILD_PLATFORM_ARCH}/release/bin/additions"
+    install -d "${pkgdir}/usr/bin"
+    install -m0755 VBoxControl VBoxService "${pkgdir}/usr/bin"
+    install -m0755 -D pam_vbox.so "${pkgdir}/usr/lib/security/pam_vbox.so"
     popd
     # systemd stuff
-    install -Dm0644 60-vboxguest.rules 
"$pkgdir/usr/lib/udev/rules.d/60-vboxguest.rules"
-    install -Dm0644 vboxservice-nox.service 
"$pkgdir/usr/lib/systemd/system/vboxservice.service"
-    install -Dm0644 virtualbox-guest-utils.sysusers 
"$pkgdir/usr/lib/sysusers.d/virtualbox-guest-utils.conf"
+    install -D -m0644 60-vboxguest.rules 
"${pkgdir}/usr/lib/udev/rules.d/60-vboxguest.rules"
+    install -D -m0644 vboxservice-nox.service 
"${pkgdir}/usr/lib/systemd/system/vboxservice.service"
+    install -D -m0644 virtualbox-guest-utils.sysusers 
"${pkgdir}/usr/lib/sysusers.d/virtualbox-guest-utils.conf"
     # licence
-    install -Dm0644 "$srcdir/VirtualBox-$pkgver/COPYING" \
-        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING.CDDL" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.CDDL"
 }
 
 package_virtualbox-ext-vnc() {
@@ -347,10 +345,12 @@
     optdepends=('tigervnc: vnc client')
     install=virtualbox-ext-vnc.install
 
-    source "VirtualBox-$pkgver/env.sh"
-    cd "VirtualBox-$pkgver/out/linux.$BUILD_PLATFORM_ARCH/release/packages"
-    install -Dm0644 VNC-*.vbox-extpack 
"$pkgdir/usr/share/virtualbox/extensions/VNC-${pkgver}.vbox-extpack"
+    source "VirtualBox-${pkgver}/env.sh"
+    cd "VirtualBox-${pkgver}/out/linux.${BUILD_PLATFORM_ARCH}/release/packages"
+    install -D -m0644 VNC-*.vbox-extpack 
"${pkgdir}/usr/share/virtualbox/extensions/VNC-${pkgver}.vbox-extpack"
     # licence
-    install -Dm0644 "$srcdir/VirtualBox-$pkgver/COPYING" \
-        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    install -D -m0644 "${srcdir}/VirtualBox-${pkgver}/COPYING.CDDL" \
+        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.CDDL"
 }

Reply via email to