summaryrefslogtreecommitdiffstats
path: root/main/qemu/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/qemu/APKBUILD')
-rw-r--r--main/qemu/APKBUILD90
1 files changed, 90 insertions, 0 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
new file mode 100644
index 000000000..4d3d7100b
--- /dev/null
+++ b/main/qemu/APKBUILD
@@ -0,0 +1,90 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=qemu
+pkgver=0.12.4
+pkgrel=0
+pkgdesc="QEMU is a generic machine emulator and virtualizer"
+url="http://www.nongnu.org/qemu/"
+license="GPL-2 LGPL-2"
+makedepends="zlib-dev sdl-dev alsa-lib-dev gnutls-dev ncurses-dev"
+depends=
+install="qemu.pre-install"
+subpackages="
+$pkgname-arm
+$pkgname-cris
+$pkgname-m68k
+$pkgname-microblaze
+$pkgname-mips
+$pkgname-mips64
+$pkgname-mips64el
+$pkgname-mipsel
+$pkgname-ppc
+$pkgname-ppc64
+$pkgname-ppcemb
+$pkgname-sh4
+$pkgname-sh4eb
+$pkgname-sparc
+$pkgname-sparc64
+$pkgname-x86_64
+"
+source="http://savannah.nongnu.org/download/$pkgname/$pkgname-$pkgver.tar.gz
+ kqemu.patch
+ "
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ # avoid fdt till an updated release appears
+ sed -i -e 's:fdt="yes":fdt="no":' configure
+ # prevent docs to get automatically installed
+ sed -i '/$(DESTDIR)$(docdir)/d' Makefile
+ # Alter target makefiles to accept CFLAGS
+ sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
+ Makefile Makefile.target tests/Makefile
+ sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
+ Makefile.target
+# patch -p1 -i ../kqemu.patch || return 1
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --audio-drv-list=oss,alsa,sdl \
+ --audio-card-list=ac97,sb16,es1370,adlib \
+ --disable-darwin-user \
+ --disable-bsd-user \
+ --disable-linux-user \
+ --cc="${CC:-gcc}"
+
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+_subsys() {
+ pkgdesc="Qemu $1 system emulator"
+ depend="qemu"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/qemu-system-$1 "$subpkgdir"/usr/bin/
+}
+
+arm() { _subsys arm; }
+cris() { _subsys cris; }
+m68k() { _subsys m68k; }
+microblaze() { _subsys microblaze; }
+mips() { _subsys mips; }
+mips64() { _subsys mips64; }
+mips64el() { _subsys mips64el; }
+mipsel() { _subsys mipsel; }
+ppc() { _subsys ppc; }
+ppc64() { _subsys ppc64; }
+ppcemb() { _subsys ppcemb; }
+sh4() { _subsys sh4; }
+sh4eb() { _subsys sh4eb; }
+sparc() { _subsys sparc; }
+sparc64() { _subsys sparc64; }
+x86_64() { _subsys x86_64; }
+
+md5sums="93e6b134dff89b2799f57b7d9e0e0fc5 qemu-0.12.4.tar.gz
+f63f7412f016d8ccddabfd02ea28e748 kqemu.patch"