UICommon.so needs the rpath for Qt5 libs too

--- VirtualBox-7.1.10/Config.kmk.orig
+++ VirtualBox-7.1.10/Config.kmk
@@ -8180,7 +8180,7 @@
     	/usr/local/lib
    endif
    ifeq ($(KBUILD_TARGET),solaris)
-    TEMPLATE_VBoxQtGuiExe_LDFLAGS.solaris = -Wl,-z,ignore # Same as VBOX_LD_as_needed.
+    TEMPLATE_VBoxQtGuiExe_LDFLAGS.solaris = -Wl,-z,ignore '$(VBOX_GCC_RPATH_OPT)$(VBOX_PATH_QT_LIB)' # Same as VBOX_LD_as_needed.
     TEMPLATE_VBoxQtGuiExe_LIBS += \
     	rt socket nsl
    endif
--- VirtualBox-7.1.10/configure.orig
+++ VirtualBox-7.1.10/configure
@@ -1668,7 +1668,8 @@
           # store only the first path, remove all other paths
           # most likely pkg-config gave us -I/usr/include/qt6 -I/usr/include/qt6/QtCore
           INCQT6=`echo "$INCQT6"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'`
-          cnf_append "VBOX_PATH_QT_LIB" "`strip_L "$LIBQT6"`"
+          # This is not quite right since the qt libpath does not have to be first but only one entry works...
+          cnf_append "VBOX_PATH_QT_LIB" '$'"(firstword `strip_L "$LIBQT6"`)"
           cnf_append "PATH_SDK_QT6_INC" "$INCQT6"
           # This is not quite right since the qt libpath does not have to be first...
           cnf_append "PATH_SDK_QT6_LIB" '$'"(firstword `strip_L "$LIBQT6"`)"