extra/qemu to 5.2.0-3

This commit is contained in:
Kevin Mihelich 2021-02-23 23:31:38 +00:00
parent decd4ec280
commit 2aa5313d25
2 changed files with 48 additions and 1 deletions

View file

@ -13,7 +13,7 @@ pkgname=(qemu qemu-headless qemu-arch-extra qemu-headless-arch-extra
qemu-block-{iscsi,gluster} qemu-guest-agent) qemu-block-{iscsi,gluster} qemu-guest-agent)
pkgdesc="A generic and open source machine emulator and virtualizer" pkgdesc="A generic and open source machine emulator and virtualizer"
pkgver=5.2.0 pkgver=5.2.0
pkgrel=2 pkgrel=3
arch=(x86_64) arch=(x86_64)
license=(GPL2 LGPL2.1) license=(GPL2 LGPL2.1)
url="https://wiki.qemu.org/" url="https://wiki.qemu.org/"
@ -23,10 +23,12 @@ _headlessdeps=(gnutls libpng libaio numactl libnfs
depends=(virglrenderer sdl2 vte3 libpulse libjack.so brltty "${_headlessdeps[@]}") depends=(virglrenderer sdl2 vte3 libpulse libjack.so brltty "${_headlessdeps[@]}")
makedepends=(spice-protocol python libiscsi glusterfs python-sphinx xfsprogs ninja) makedepends=(spice-protocol python libiscsi glusterfs python-sphinx xfsprogs ninja)
source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig} source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig}
build-most-modules-statically-hack.diff
qemu-guest-agent.service qemu-guest-agent.service
65-kvm.rules) 65-kvm.rules)
sha512sums=('bddd633ce111471ebc651e03080251515178808556b49a308a724909e55dac0be0cc0c79c536ac12d239678ae94c60100dc124be9b9d9538340c03a2f27177f3' sha512sums=('bddd633ce111471ebc651e03080251515178808556b49a308a724909e55dac0be0cc0c79c536ac12d239678ae94c60100dc124be9b9d9538340c03a2f27177f3'
'SKIP' 'SKIP'
'8721068fb968dbae62ceff71aa46eb4c2452c7fde95b87396b439f2f927ea84d2ee2c512264a9f28a5ccaf3096aacce052cebf209aaffd62a201b5bafb512002'
'269c0f0bacbd06a3d817fde02dce26c99d9f55c9e3b74bb710bd7e5cdde7a66b904d2eb794c8a605bf9305e4e3dee261a6e7d4ec9d9134144754914039f176e4' '269c0f0bacbd06a3d817fde02dce26c99d9f55c9e3b74bb710bd7e5cdde7a66b904d2eb794c8a605bf9305e4e3dee261a6e7d4ec9d9134144754914039f176e4'
'bdf05f99407491e27a03aaf845b7cc8acfa2e0e59968236f10ffc905e5e3d5e8569df496fd71c887da2b5b8d1902494520c7da2d3a8258f7fd93a881dd610c99') 'bdf05f99407491e27a03aaf845b7cc8acfa2e0e59968236f10ffc905e5e3d5e8569df496fd71c887da2b5b8d1902494520c7da2d3a8258f7fd93a881dd610c99')
validpgpkeys=('CEACC9E15534EBABB82D3FA03353C9CEF108B584') # Michael Roth <flukshun@gmail.com> validpgpkeys=('CEACC9E15534EBABB82D3FA03353C9CEF108B584') # Michael Roth <flukshun@gmail.com>
@ -41,6 +43,11 @@ esac
prepare() { prepare() {
mkdir build-{full,headless} mkdir build-{full,headless}
mkdir -p extra-arch-{full,headless}/usr/{bin,share/qemu} mkdir -p extra-arch-{full,headless}/usr/{bin,share/qemu}
cd qemu-$pkgver
# https://bugs.launchpad.net/qemu/+bug/1910696
# the patch comes from https://salsa.debian.org/qemu-team/qemu/-/blob/master/debian/patches/build-most-modules-statically-hack.diff
patch -p1 < ../build-most-modules-statically-hack.diff
} }
build() { build() {

View file

@ -0,0 +1,40 @@
From: Michael Tokarev <mjt@tls.msk.ru>
Subject: build most modules statically (hack)
This hack makes the build procedure to build most modules statically,
except block and gui modules which goes into their own packages.
The rest are built into the executables directly in order to make
qemu-system-common package (where all other modules goes) to be
more-or-less version-independent.
There's little reason to build these as modules or to ship them in
separate packages.
diff --git a/meson.build b/meson.build
index e3386196ba..a28f7d10f1 100644
--- a/meson.build
+++ b/meson.build
@@ -1587,13 +1587,19 @@ softmmu_mods = []
foreach d, list : modules
foreach m, module_ss : list
if enable_modules and targetos != 'windows'
- module_ss = module_ss.apply(config_all, strict: false)
- sl = static_library(d + '-' + m, [genh, module_ss.sources()],
- dependencies: [modulecommon, module_ss.dependencies()], pic: true)
+ module_dn = module_ss.apply(config_all, strict: false)
+ sl = static_library(d + '-' + m, [genh, module_dn.sources()],
+ dependencies: [modulecommon, module_dn.dependencies()], pic: true)
if d == 'block'
block_mods += sl
else
- softmmu_mods += sl
+ # we only build 2 non-block modules as modules: it is the gui part
+ if d + '-' + m in [ 'ui-gtk', 'ui-sdl', 'audio-pa' ]
+ softmmu_mods += sl
+ else
+ warning('Compiling module statically: ' + d + '-' + m)
+ softmmu_ss.add_all(module_ss)
+ endif
endif
else
if d == 'block'