aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-01-17 10:18:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-01-17 10:36:46 +0000
commit330075569831670d211a75ca3a755dfb2b4317b4 (patch)
tree2a20a88151a6b2c5d1d835fe51f8183515352a0d /main/qemu
parent5b3b78167bc5f3df7cb300870e1147f919d47822 (diff)
downloadaports-330075569831670d211a75ca3a755dfb2b4317b4.tar.bz2
aports-330075569831670d211a75ca3a755dfb2b4317b4.tar.xz
main/qemu: build the linux-user targets static
The linux-user emulators makes more sense as static binaries so we build them all static.
Diffstat (limited to 'main/qemu')
-rw-r--r--main/qemu/APKBUILD57
1 files changed, 37 insertions, 20 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index 04dcf64343..755882a2bb 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
pkgver=2.8.0
-pkgrel=1
+pkgrel=2
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="http://qemu.org/"
arch="all"
@@ -14,6 +14,7 @@ makedepends="
curl-dev
flex
glib-dev
+ glib-static
gnutls-dev
gtk+3.0-dev
libaio-dev
@@ -139,12 +140,27 @@ prepare() {
Makefile.target
}
-_compile() {
- ../configure \
+
+_compile_common() {
+ "$builddir"/configure \
--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--libexecdir=/usr/lib/qemu \
+ --disable-glusterfs \
+ --disable-debug-info \
+ --disable-bsd-user \
+ --disable-werror \
+ --disable-sdl \
+ --disable-xen \
+ --cc="${CC:-gcc}" \
+ "$@" \
+ || return 1
+ make ARFLAGS="rc" || return 1
+}
+
+_compile_system() {
+ _compile_common \
--audio-drv-list=oss,alsa \
--enable-kvm \
--enable-vde \
@@ -155,40 +171,40 @@ _compile() {
--enable-usb-redir \
--enable-libssh2 \
--enable-vhost-net \
- --enable-pie \
--enable-snappy \
--enable-tpm \
--enable-libnfs \
--enable-lzo \
--enable-docs \
--enable-curses \
- --disable-glusterfs \
- --disable-debug-info \
- --disable-bsd-user \
- --disable-werror \
- --disable-sdl \
- --disable-xen \
- --cc="${CC:-gcc}" \
- "$@" \
- || return 1
- make ARFLAGS="rc" || return 1
+ --enable-pie \
+ --disable-linux-user \
+ "$@"
}
build() {
mkdir -p "$builddir"/build \
+ "$builddir"/build-user \
"$builddir"/build-gtk
- cd "$builddir"/build
- _compile \
+ cd "$builddir"/build-user
+ _compile_common \
+ --enable-linux-user \
+ --disable-system \
+ --static \
+ || return 1
+
+ cd "$builddir"/build
+ _compile_system \
--enable-vnc \
--enable-vnc-png \
--enable-vnc-jpeg \
--enable-spice \
- --enable-linux-user \
--enable-guest-agent \
--disable-gtk \
|| return 1
+
# tests fails on x86
# http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg01429.html
# http://web.archiveorange.com/archive/v/21oVv8wOfpQGkyy8EK0N
@@ -196,10 +212,9 @@ build() {
if [ -n "$_arch" ]; then
cd "$builddir"/build-gtk
- _compile \
+ _compile_system \
--enable-gtk \
--with-gtkabi=3.0 \
- --disable-linux-user \
--disable-vnc \
--disable-spice \
--disable-guest-agent \
@@ -209,8 +224,10 @@ build() {
}
package() {
- cd "$builddir"/build
+ cd "$builddir"/build-user
+ make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"/build
make DESTDIR="$pkgdir" install || return 1
paxmark -m "$pkgdir"/usr/bin/qemu-system-* || return 1