aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-04-21 07:07:56 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-04-21 08:57:06 +0000
commit64482b97a05123af0e0a9cb7ca071fcbf3ad701b (patch)
tree94ccf5205a79a12bcb08b929d91955a409a2f52c /main/qemu
parent1812b405abea01f3283de04e2024a5d2a98936b7 (diff)
downloadaports-64482b97a05123af0e0a9cb7ca071fcbf3ad701b.tar.bz2
aports-64482b97a05123af0e0a9cb7ca071fcbf3ad701b.tar.xz
main/qemu: add gtk subpackage and enable libssh2
Diffstat (limited to 'main/qemu')
-rw-r--r--main/qemu/APKBUILD69
1 files changed, 51 insertions, 18 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index e214f99ed9..0917916972 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
pkgver=2.2.1
-pkgrel=0
+pkgrel=1
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="http://qemu.org/"
arch="all"
@@ -9,7 +9,8 @@ license="GPL-2 LGPL-2"
makedepends="zlib-dev alsa-lib-dev gnutls-dev ncurses-dev glib-dev
libjpeg-turbo-dev libpng-dev vde2-dev spice-dev paxmark curl-dev
libcap-dev libcap-ng-dev libaio-dev usbredir-dev util-linux-dev
- libusb-dev flex bison linux-headers"
+ libusb-dev flex bison linux-headers libssh2-dev
+ gtk+3.0-dev"
depends=
install="qemu.pre-install"
subpackages="
@@ -70,9 +71,23 @@ $pkgname-system-xtensaeb:system_xtensaeb
$pkgname-unicore32:unicore32
$pkgname-x86_64:x86_64
-$pkgname-img
$pkgname-guest-agent:guest
"
+
+case "$CARCH" in
+ x86)
+ _arch=i386
+ subpackages="$subpackages $pkgname-gtk"
+ ;;
+ x86_64)
+ _arch=x86_64
+ subpackages="$subpackages $pkgname-gtk"
+ ;;
+ *) _arch="";;
+esac
+
+subpackages="$subpackages $pkgname-img"
+
source="http://wiki.qemu-project.org/download/qemu-$pkgver.tar.bz2
0001-elfload-load-PIE-executables-to-right-address.patch
0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
@@ -104,25 +119,24 @@ prepare() {
}
_compile() {
- ./configure \
+ ../configure \
--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--libexecdir=/usr/lib/qemu \
--enable-vde \
- --enable-vnc \
- --enable-spice \
--enable-virtfs \
--enable-curl \
--enable-cap-ng \
--enable-linux-aio \
--enable-usb-redir \
- --enable-guest-agent \
--enable-uuid \
+ --enable-libssh2 \
+ --enable-vhost-net \
--disable-bsd-user \
- --enable-linux-user \
--disable-werror \
--disable-smartcard-nss \
+ --disable-sdl \
--cc="${CC:-gcc}" \
"$@" \
|| return 1
@@ -130,10 +144,16 @@ _compile() {
}
build() {
- cd "$srcdir"/$pkgname-$pkgver
+ mkdir -p "$srcdir"/qemu-$pkgver/build "$srcdir"/qem \
+ "$srcdir"/qemu-$pkgver/build-gtk
+ cd "$srcdir"/qemu-$pkgver/build
+
_compile \
+ --enable-vnc \
+ --enable-spice \
+ --enable-linux-user \
+ --enable-guest-agent \
--audio-drv-list=oss,alsa \
- --disable-sdl \
--disable-gtk \
|| return 1
@@ -142,21 +162,33 @@ build() {
# http://web.archiveorange.com/archive/v/21oVv8wOfpQGkyy8EK0N
# make check || return 1
-# cp -al "$srcdir"/$pkgname-$pkgver "$srcdir"/build-gtk
-# cd "$srcdir"/build-gtk
-# _compile \
-# --audio-drv-list=oss,alsa,sdl \
-# --enable-sdl \
-# --enable-gtk \
-# || return 1
+ if [ -z "$_arch" ]; then
+ return 0
+ fi
+
+ cd "$srcdir"/qemu-$pkgver/build-gtk
+ _compile \
+ --audio-drv-list=oss,alsa \
+ --enable-gtk \
+ --with-gtkabi=3.0 \
+ --disable-linux-user \
+ --disable-vnc \
+ --disable-spice \
+ --disable-guest-agent \
+ --target-list="$_arch-softmmu" \
+ || return 1
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$srcdir"/qemu-$pkgver/build
make DESTDIR="$pkgdir" install || return 1
install -Dm644 "$srcdir"/80-kvm.rules \
"$pkgdir"/lib/udev/rules.d/80-kvm.rules || return 1
paxmark -m "$pkgdir"/usr/bin/qemu-system-* || return 1
+
+ cd "$srcdir"/qemu-$pkgver/build-gtk
+ install $_arch-softmmu/qemu-system-$_arch \
+ "$pkgdir"/usr/bin/qemu-system-$_arch-gtk
}
_subsys() {
@@ -222,6 +254,7 @@ system_xtensa() { _subsys system-xtensa; }
system_xtensaeb() { _subsys system-xtensaeb; }
unicore32() { _subsys unicore32; }
x86_64() { _subsys x86_64; }
+gtk() { _subsys system-$_arch-gtk; }
img() {
pkgdesc="QEMU command line tool for manipulating disk images"