exherbo-impulze/packages/app-emulation/qemu/qemu.exlib

96 lines
2.8 KiB
Bash
Raw Normal View History

2009-06-13 11:39:02 +02:00
# Copyright 2008, 2009 Daniel Mierswa <impulze@impulze.org>
# Distributed under the terms of the GNU General Public License v2
export_exlib_phases src_prepare src_configure
SUMMARY="A generic and open source machine emulator and virtualizer."
DESCRIPTION="
When used as a machine emulator, it can run OS and programs made for one
machine on a different machine. It claims to achieve good performances
because of dynamic translation.'
"
2010-03-11 11:42:25 +01:00
HOMEPAGE="http://bellard.org/${PN}"
2009-06-13 11:39:02 +02:00
LICENCES="GPL-2"
MYOPTIONS="
bluetooth
curl
doc
gnutls
ncurses [[ description = [ ncurses interface for the virtual machine ] ]]
pulseaudio
sasl
sdl [[ description = [ SDL interface for the virtual machine and SDL audio module ] ]]
static
vde [[ description = [ Enables support for the Virtual Distributed Ethernet networking system ] ]]
"
DEPENDENCIES="
build+run:
bluetooth? ( net-wireless/bluez )
curl? ( net-misc/curl )
pulseaudio? ( media-sound/pulseaudio )
gnutls? ( dev-libs/gnutls )
ncurses? ( sys-libs/ncurses )
sasl? ( net-libs/cyrus-sasl )
sdl? ( media-libs/SDL )
vde? ( net/vde )
!app-virtualization/kvm [[
description = [ It doesn't make sense to install both anymore. ]
resolution = [ manual ]
]]
!app-virtualization/qemu-kvm [[
description = [ It doesn't make sense to install both anymore. ]
resolution = [ manual ]
]]
2009-06-13 11:39:02 +02:00
"
REMOTE_IDS="freshmeat:qemu"
2010-03-11 11:42:25 +01:00
UPSTREAM_CHANGELOG="${HOMEPAGE}/changelog.html"
UPSTREAM_DOCUMENTATION="${HOMEPAGE}/user-doc.html"
UPSTREAM_RELEASE_NOTES="${HOMEPAGE}/index.html"
2009-06-13 11:39:02 +02:00
# TODO: configure creates automagic dependency and static linkage with SDL
qemu_src_configure ()
{
local audio_drv
audio_drv+=( alsa )
option sdl && audio_drv+=( sdl )
option pulseaudio && audio_drv+=( pa )
local myconf
option ncurses || myconf+=( --disable-curses )
option vde || myconf+=( --disable-vde )
option bluetooth || myconf+=( --disable-bluez )
option static && myconf+=( --static )
option sdl || myconf+=( --disable-sdl )
option gnutls || myconf+=( --disable-vnc-tls )
option sasl || myconf+=( --disable-vnc-sasl )
option doc || myconf+=( --disable-docs )
option curl || myconf+=( --disable-curl )
[[ -n "${audio_drv[@]}" ]] && myconf+=( --enable-mixemu )
2010-03-11 11:37:00 +01:00
edo ./configure \
2009-06-13 11:39:02 +02:00
--prefix=/usr \
2010-01-08 01:29:42 +01:00
--host-cc="${BUILD_CC}" \
--cc="${CC}" \
2010-03-11 11:42:25 +01:00
--extra-cflags="${CFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
2009-06-13 11:39:02 +02:00
--disable-strip \
--audio-drv-list="$(echo ${audio_drv[@]} | tr ' ' ',')" \
2010-03-11 11:42:25 +01:00
"${myconf[@]}" \
2009-08-01 18:43:50 +02:00
${EXTRA_ECONF} \
2010-03-11 11:37:00 +01:00
$@
2009-06-13 11:39:02 +02:00
}
qemu_src_prepare ()
{
2010-03-11 11:37:00 +01:00
edo sed \
2009-06-13 11:39:02 +02:00
-e '/^CFLAGS=/s:-O2 -g::' \
-e '/^LDFLAGS=/s:-g::' \
2010-03-11 11:37:00 +01:00
-i configure
2009-06-13 11:39:02 +02:00
}
2009-07-29 12:55:27 +02:00