summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2009-03-06 22:41:31 +0000
committerLuca Barbato <lu_zero@gentoo.org>2009-03-06 22:41:31 +0000
commit494b552fcc3a68ad889d0cb38f839a77a33a1f44 (patch)
treefb092994dcd7a9138e33ebcac6f30cc1f7cd3aaa
parentMarked ~ppc and ~ppc64 (diff)
downloadgentoo-2-494b552fcc3a68ad889d0cb38f839a77a33a1f44.tar.gz
gentoo-2-494b552fcc3a68ad889d0cb38f839a77a33a1f44.tar.bz2
gentoo-2-494b552fcc3a68ad889d0cb38f839a77a33a1f44.zip
New version
(Portage version: 2.1.6.7/cvs/Linux x86_64)
-rw-r--r--app-emulation/qemu-softmmu/ChangeLog10
-rwxr-xr-xapp-emulation/qemu-softmmu/files/qemu-ifdown20
-rwxr-xr-xapp-emulation/qemu-softmmu/files/qemu-ifup22
-rw-r--r--app-emulation/qemu-softmmu/metadata.xml10
-rw-r--r--app-emulation/qemu-softmmu/qemu-softmmu-0.10.0.ebuild122
5 files changed, 180 insertions, 4 deletions
diff --git a/app-emulation/qemu-softmmu/ChangeLog b/app-emulation/qemu-softmmu/ChangeLog
index 0146f9a0b4cb..75f9e19498a0 100644
--- a/app-emulation/qemu-softmmu/ChangeLog
+++ b/app-emulation/qemu-softmmu/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/qemu-softmmu
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog,v 1.55 2008/07/28 19:11:06 cardoe Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/ChangeLog,v 1.56 2009/03/06 22:41:31 lu_zero Exp $
+
+*qemu-softmmu-0.10.0 (06 Mar 2009)
+
+ 06 Mar 2009; Luca Barbato <lu_zero@gentoo.org> +files/qemu-ifdown,
+ +files/qemu-ifup, +qemu-softmmu-0.10.0.ebuild:
+ New release
28 Jul 2008; Doug Goldstein <cardoe@gentoo.org> metadata.xml:
add GLEP 56 USE flag desc from use.local.desc
diff --git a/app-emulation/qemu-softmmu/files/qemu-ifdown b/app-emulation/qemu-softmmu/files/qemu-ifdown
new file mode 100755
index 000000000000..c173e43a9813
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/qemu-ifdown
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ -x /sbin/brctl ]; then
+ BRCTL="/sbin/brctl"
+elif [ -x /usr/sbin/brctl ]; then
+ BRCTL="/usr/sbin/brctl"
+else
+ echo "no bridge utils installed"
+ exit 1
+fi
+
+if [ -x /sbin/ip ]; then
+ switch=( $(/sbin/ip route list | awk '/^default / { sub(/.* dev /, ""); print $1 }') )
+ ${BRCTL} delif ${switch} $1
+ /sbin/ip link set $1 down
+else
+ switch=( $(/bin/netstat -rn | awk '/^0\.0\.0\.0/ { print $NF }') )
+ ${BRCTL} delif ${switch} $1
+ /sbin/ifconfig $1 down
+fi
diff --git a/app-emulation/qemu-softmmu/files/qemu-ifup b/app-emulation/qemu-softmmu/files/qemu-ifup
new file mode 100755
index 000000000000..4a30e7d5645f
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/qemu-ifup
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ -x /sbin/brctl ]; then
+ BRCTL="/sbin/brctl"
+elif [ -x /usr/sbin/brctl ]; then
+ BRCTL="/usr/sbin/brctl"
+else
+ echo "no bridge utils installed"
+ exit 1
+fi
+
+if [ -x /sbin/ip ]; then
+ switch=( $(/sbin/ip route list | awk '/^default / { sub(/.* dev /, ""); print $1 }') )
+ /sbin/ip link set $1 up
+else
+ switch=( $(/bin/netstat -rn | awk '/^0\.0\.0\.0/ { print $NF }') )
+ /sbin/ifconfig $1 0.0.0.0 up
+fi
+
+[[ ${switch#} -ne "1" ]] && logger -t qemu "$0 found more than one bridge connecting $1 to ${switch}"
+${BRCTL} addif ${switch} $1
+
diff --git a/app-emulation/qemu-softmmu/metadata.xml b/app-emulation/qemu-softmmu/metadata.xml
index 07a9d9719a99..7328ec82873a 100644
--- a/app-emulation/qemu-softmmu/metadata.xml
+++ b/app-emulation/qemu-softmmu/metadata.xml
@@ -6,7 +6,13 @@
<email>lu_zero@gentoo.org</email>
</maintainer>
<use>
- <flag name='kqemu'>Enables the kernel acceleration module on a x86
- cpu</flag>
+ <flag name='kqemu'>Enables the kernel acceleration module on a x86/x86-64 cpu</flag>
+ <flag name='alsa'>Enable alsa output for sound emulation</flag>
+ <flag name='esd'>Enable esound output for sound emulation</flag>
+ <flag name='gnutls'>Enable TLS support for the VNC console server</flag>
+ <flag name='ncurses'>Enable the ncurses-based console</flag>
+ <flag name='pulseaudio'>Enable pulseaudio output for sound emulation</flag>
+ <flag name='sdl'>Enable the SDL-based console</flag>
+ <flag name='vde'>Enable VDE-based networking</flag>
</use>
</pkgmetadata>
diff --git a/app-emulation/qemu-softmmu/qemu-softmmu-0.10.0.ebuild b/app-emulation/qemu-softmmu/qemu-softmmu-0.10.0.ebuild
new file mode 100644
index 000000000000..e04095ec92d3
--- /dev/null
+++ b/app-emulation/qemu-softmmu/qemu-softmmu-0.10.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/qemu-softmmu-0.10.0.ebuild,v 1.1 2009/03/06 22:41:31 lu_zero Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+EAPI=1
+
+MY_PN=${PN/-softmmu/}
+MY_P=${P/-softmmu/}
+
+
+SRC_URI="http://savannah.nongnu.org/download/${MY_PN}/${MY_P}.tar.gz"
+
+DESCRIPTION="Open source processor emulator"
+HOMEPAGE="http://bellard.org/qemu/index.html"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc ~ppc64"
+
+IUSE="alsa esd gnutls ncurses pulseaudio +sdl vde kqemu"
+RESTRICT="test binchecks"
+
+RDEPEND="sys-libs/zlib
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ esd? ( media-sound/esound )
+ pulseaudio? ( media-sound/pulseaudio )
+ gnutls? ( net-libs/gnutls )
+ ncurses? ( sys-libs/ncurses )
+ sdl? ( >=media-libs/libsdl-1.2.11 )
+ vde? ( net-misc/vde )
+ fdt? ( sys-apps/dtc )
+ kqemu? ( >=app-emulation/kqemu-1.4.0_pre1 )"
+
+DEPEND="${RDEPEND}
+ gnutls? ( dev-util/pkgconfig )
+ app-text/texi2html"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ # prevent docs to get automatically installed
+ sed -i '/$(DESTDIR)$(docdir)/d' Makefile
+ # Alter target makefiles to accept CFLAGS set via flag-o
+ sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
+ Makefile Makefile.target
+ [[ -x /sbin/paxctl ]] && \
+ sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
+ Makefile.target
+ # avoid strip
+ sed -i 's/$(INSTALL) -m 755 -s/$(INSTALL) -m 755/' Makefile
+}
+
+src_compile() {
+ local mycc conf_opts audio_opts
+
+ audio_opts="oss"
+ conf_opts="--disable-linux-user --disable-darwin-user --disable-bsd-user"
+ use gnutls || conf_opts="$conf_opts --disable-vnc-tls"
+ use ncurses || conf_opts="$conf_opts --disable-curses"
+ use sdl || conf_opts="$conf_opts --disable-gfx-check --disable-sdl"
+ use vde || conf_opts="$conf_opts --disable-vde"
+ use kqemu || conf_opts="$conf_opts --disable-kqemu"
+# use fdt || conf_opts="--disable-fdt"
+
+ conf_opts="$conf_opts --prefix=/usr --disable-bluez --disable-kvm"
+
+ use alsa && audio_opts="alsa $audio_opts"
+ use esd && audio_opts="esd $audio_opts"
+ use pulseaudio && audio_opts="pa $audio_opts"
+ use sdl && audio_opts="sdl $audio_opts"
+
+ ./configure ${conf_opts} --audio-drv-list="$audio_opts" || die "econf failed"
+
+ mycc=$(cat qemu/config-host.mak | egrep "^CC=" | cut -d "=" -f 2)
+
+ filter-flags -fpie -fstack-protector
+
+ # If using gentoo's compiler set the SPEC to non-hardened
+ if [ ! -z ${GCC_SPECS} -a -f ${GCC_SPECS} ]; then
+ local myccver=$(${mycc} -dumpversion)
+ local gccver=$($(tc-getBUILD_CC) -dumpversion)
+
+ #Is this a SPEC for the right compiler version?
+ myspec="${GCC_SPECS/${gccver}/${myccver}}"
+ if [ "${myspec}" == "${GCC_SPECS}" ]; then
+ shopt -s extglob
+ GCC_SPECS="${GCC_SPECS/%hardened*specs/vanilla.specs}"
+ shopt -u extglob
+ else
+ unset GCC_SPECS
+ fi
+ fi
+
+ emake || die "emake qemu failed"
+
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ insinto /etc/qemu
+ dobin "${FILESDIR}/qemu-ifup"
+ dobin "${FILESDIR}/qemu-ifdown"
+
+ dodoc pc-bios/README
+ dodoc qemu-doc.html
+ dodoc qemu-tech.html
+}
+
+pkg_postinst() {
+ elog "You will need the Universal TUN/TAP driver compiled into your"
+ elog "kernel or loaded as a module to use the virtual network device"
+ elog "if using -net tap. You will also need support for 802.1d"
+ elog "Ethernet Bridging and a configured bridge if using the provided"
+ elog "qemu-ifup script from /etc/qemu."
+ echo
+}