diff --git a/testing/xemu/APKBUILD b/testing/xemu/APKBUILD
index b22b5adca67f20a8ba67fc8de5a8b8a2d847316a..745ec315a577bd339e86feec78ce21485b6fce26 100644
--- a/testing/xemu/APKBUILD
+++ b/testing/xemu/APKBUILD
@@ -1,12 +1,13 @@
 # Contributor: Díaz Urbaneja Diego <sodomon2@gmail.com>
 # Maintainer: Díaz Urbaneja Diego <sodomon2@gmail.com>
 pkgname=xemu
-pkgver=0.8.5
+pkgver=0.8.34
 pkgrel=0
 pkgdesc="Original Xbox Emulator for Windows, macOS, and Linux."
 url="https://xemu.app/"
 #x86/armv7/armhf failed compilation because of lto (without lto it still doesn't work)
-arch="all !x86 !armv7 !armhf"
+#riscv64 QEMU_BUILD_BUG_ON bug see https://github.com/xemu-project/xemu/issues/159
+arch="all !riscv64 !x86 !armv7 !armhf"
 license="GPL-2.0-only AND LGPL-2.1-only"
 makedepends="
 	bash
@@ -59,8 +60,8 @@ package() {
 }
 
 sha512sums="
-21a7d2f9c5b7dc544c367267eeb1e0503879e50526c7b95c1228409bf5a71c01f24ff41ee48a2bd5868138672172a2a2b12c6c54922a0eda43f91301591aabeb  xemu-0.8.5.tar.gz
+f25ebbc4aab3307099bfe7980f59a2a4e8bc94bc9ac724b9bc2ccecd8d3e735ff2dd1f34c949dc0665aaf77b77cdfb310612c654eef6bd8783b22e9914d13087  xemu-0.8.34.tar.gz
 fc5e9c74c48496ccd1ea5227901b60d11af686641e5a724ad20f866c7ef7a4038ab00d06ba55fbb8e84c202b69a72304ed8a65855f53f6a0403f526dcd3928b8  fix-missing-include.patch
-7f265a3abfacfd438bed2f186b6dbdf53ae6014af1479f722007e6d54e5c91c41bd7e01a5305bbeecdff9d9fe5aa0e124d4cfa785ee48ca455221af4d0cc90ff  use-system-libs.patch
+bd72f01a88328c5005f40604e088d81b2ac29206cffa4deaf7eb20db32d5b8208f9ba6b5f64cca855dd1ec6f206d30966c103a0696dd856455ecc04b3c9cd8bd  use-system-libs.patch
 fe7f53a1068af46469f20e3bab994a9f8c18bba7e4863f5a68bd263c5a44c76dd2f7d69db3f2041222db713a5291a8648318f4a7f0138fe16fb1c3657f5e2b9d  basename.patch
 "
diff --git a/testing/xemu/use-system-libs.patch b/testing/xemu/use-system-libs.patch
index 42d05be0d3bb2c297187d8f0c5adc8ac78f7912e..71d8f48944fbad886feea36dac42446d21319beb 100644
--- a/testing/xemu/use-system-libs.patch
+++ b/testing/xemu/use-system-libs.patch
@@ -1,50 +1,20 @@
 --- a/meson.build
 +++ b/meson.build
-@@ -2895,8 +2895,7 @@
- config_host_data.set('CONFIG_FDT', fdt.found())
- config_host_data.set('CONFIG_SLIRP', slirp.found())
+@@ -3551,7 +3551,7 @@
+   libvduse = libvduse_proj.get_variable('libvduse_dep')
+ endif
  
--tomlplusplus_proj = subproject('tomlplusplus', default_options: ['default_library=static'])
--tomlplusplus = tomlplusplus_proj.get_variable('tomlplusplus_dep')
+-tomlplusplus = dependency('tomlplusplus', fallback: ['tomlplusplus', 'tomlplusplus_dep'], default_options: ['default_library=static'])
 +toml = dependency('tomlplusplus')
  
- xxhash_proj = subproject('xxhash', default_options: ['default_library=static'])
- xxhash = xxhash_proj.get_variable('xxhash_dep')
-@@ -3252,7 +3251,7 @@
+ xxhash = dependency('libxxhash', fallback: ['xxhash', 'xxhash_dep'], default_options: ['default_library=static'])
+ 
+@@ -3926,7 +3926,7 @@
  
- common_ss.add(files('cpus-common.c'))
+ specific_ss.add(files('xemu-xbe.c', 'xemu-version.c'))
  
 -common_ss.add(tomlplusplus)
 +common_ss.add(toml)
  common_ss.add(genconfig)
  
- subdir('softmmu')
---- a/ui/thirdparty/meson.build
-+++ b/ui/thirdparty/meson.build
-@@ -60,7 +60,7 @@
- libfpng = static_library('fpng', sources: 'fpng/fpng.cpp', cpp_args: libfpng_cpp_args)
- fpng = declare_dependency(include_directories: 'fpng', link_with: libfpng)
- 
--json = declare_dependency(include_directories: 'json')
-+json = dependency('nlohmann_json')
- 
- httplib_proj = subproject('cpp-httplib', default_options: ['cpp-httplib_openssl=enabled'])
- httplib_deps = [httplib_proj.get_variable('cpp_httplib_dep')]
-@@ -69,5 +69,5 @@
- endif
- httplib = declare_dependency(dependencies: httplib_deps)
- 
--libfatx = static_library('fatx', sources: 'fatx/fatx.c')
-+libfatx = static_library('fatx', sources: files('fatx/fatx.c') + genh)
- fatx = declare_dependency(include_directories: 'fatx', link_with: libfatx)
---- a/ui/xui/reporting.cc
-+++ b/ui/xui/reporting.cc
-@@ -23,7 +23,7 @@
- #include <stdio.h>
- #include "reporting.hh"
- #include <httplib.h>
--#include <json.hpp>
-+#include <nlohmann/json.hpp>
- using json = nlohmann::json;
- 
- #define DEBUG_COMPAT_SERVICE 0
+ common_ss.add(files('cpu-common.c'))