Gentoo Archives: gentoo-commits

From: "Lance Albertson (ramereth)" <ramereth@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/qemu-kvm: qemu-kvm-0.11.1-r1.ebuild ChangeLog
Date: Mon, 08 Feb 2010 22:17:04
Message-Id: E1Nebuf-0002st-SO@stork.gentoo.org
1 ramereth 10/02/08 22:17:01
2
3 Modified: ChangeLog
4 Added: qemu-kvm-0.11.1-r1.ebuild
5 Log:
6 Add 'kvm' symlink so that other applications can use it for portability
7 (Portage version: 2.1.7.16/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.17 app-emulation/qemu-kvm/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.17&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?rev=1.17&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-kvm/ChangeLog?r1=1.16&r2=1.17
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v
19 retrieving revision 1.16
20 retrieving revision 1.17
21 diff -u -r1.16 -r1.17
22 --- ChangeLog 3 Feb 2010 05:41:15 -0000 1.16
23 +++ ChangeLog 8 Feb 2010 22:17:01 -0000 1.17
24 @@ -1,6 +1,13 @@
25 # ChangeLog for app-emulation/qemu-kvm
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.16 2010/02/03 05:41:15 cardoe Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.17 2010/02/08 22:17:01 ramereth Exp $
29 +
30 +*qemu-kvm-0.11.1-r1 (08 Feb 2010)
31 +
32 + 08 Feb 2010; Lance Albertson <ramereth@g.o>
33 + +qemu-kvm-0.11.1-r1.ebuild:
34 + Add 'kvm' symlink so that other applications can still use it for
35 + portability
36
37 *qemu-kvm-0.12.2-r1 (03 Feb 2010)
38
39
40
41
42 1.1 app-emulation/qemu-kvm/qemu-kvm-0.11.1-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.11.1-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.11.1-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: qemu-kvm-0.11.1-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2010 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.11.1-r1.ebuild,v 1.1 2010/02/08 22:17:01 ramereth Exp $
52
53 EAPI="2"
54
55 inherit eutils flag-o-matic toolchain-funcs linux-info
56
57 SRC_URI="mirror://sourceforge/kvm/${P}.tar.gz"
58
59 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
60 HOMEPAGE="http://www.linux-kvm.org"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
65 IUSE="alsa bluetooth esd gnutls ncurses pulseaudio sasl +sdl vde"
66
67 COMMON_TARGETS="i386 x86_64 arm cris m68k mips mipsel mips64 mips64el ppc \
68 ppc64 sh4 sh4eb sparc"
69
70 IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} ppcemb"
71 IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc64 sparc32plus"
72
73 for target in ${IUSE_SOFTMMU_TARGETS}; do
74 IUSE="${IUSE} +qemu_softmmu_targets_${target}"
75 done
76
77 for target in ${IUSE_USER_TARGETS}; do
78 IUSE="${IUSE} +qemu_user_targets_${target}"
79 done
80
81 RESTRICT="test"
82
83 RDEPEND="sys-libs/zlib
84 sys-apps/pciutils
85 alsa? ( >=media-libs/alsa-lib-1.0.13 )
86 bluetooth? ( net-wireless/bluez )
87 esd? ( media-sound/esound )
88 gnutls? ( net-libs/gnutls )
89 ncurses? ( sys-libs/ncurses )
90 pulseaudio? ( media-sound/pulseaudio )
91 sasl? ( dev-libs/cyrus-sasl )
92 sdl? ( >=media-libs/libsdl-1.2.11[X] )
93 vde? ( net-misc/vde )
94 !app-emulation/qemu-softmmu
95 !app-emulation/qemu-user
96 !app-emulation/qemu
97 !app-emulation/kqemu"
98
99 DEPEND="${RDEPEND}
100 app-text/texi2html
101 >=sys-kernel/linux-headers-2.6.29
102 gnutls? ( dev-util/pkgconfig )"
103
104 pkg_setup() {
105 if kernel_is lt 2 6 25; then
106 eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
107 eerror "Either upgrade your kernel"
108 die "qemu-kvm version not compatible"
109 elif ! linux_chkconfig_present KVM; then
110 eerror "Please enable KVM support in your kernel, found at:"
111 eerror
112 eerror " Virtualization"
113 eerror " Kernel-based Virtual Machine (KVM) support"
114 eerror
115 eerror "or enable the 'modules' USE flag."
116 die "KVM support not detected!"
117 fi
118
119 enewgroup kvm
120 }
121
122 src_prepare() {
123 # avoid fdt till an updated release appears
124 sed -i -e 's:fdt="yes":fdt="no":' configure
125 # prevent docs to get automatically installed
126 sed -i '/$(DESTDIR)$(docdir)/d' Makefile
127 # Alter target makefiles to accept CFLAGS set via flag-o
128 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
129 Makefile Makefile.target
130 [[ -x /sbin/paxctl ]] && \
131 sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
132 Makefile.target
133 # append CFLAGS while linking
134 sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak
135
136 # remove part to make udev happy
137 sed -e 's~NAME="%k", ~~' -i kvm/scripts/65-kvm.rules
138
139 epatch "${FILESDIR}/qemu-0.11.0-mips64-user-fix.patch"
140 }
141
142 src_configure() {
143 local conf_opts audio_opts softmmu_targets user_targets
144
145 #works fine for me without, drop with next version, if there are
146 #no complains
147 #Thomas Sachau <tommy@g.o
148 #filter-flags -fpie -fstack-protector
149
150 for target in ${IUSE_SOFTMMU_TARGETS} ; do
151 use "qemu_softmmu_targets_${target}" && \
152 softmmu_targets="${softmmu_targets} ${target}-softmmu"
153 done
154
155 for target in ${IUSE_USER_TARGETS} ; do
156 use "qemu_user_targets_${target}" && \
157 user_targets="${user_targets} ${target}-linux-user"
158 done
159
160 if [ ! -z "${softmmu_targets}" ]; then
161 einfo "Building the following softmmu targets: ${softmmu_targets}"
162 fi
163
164 if [ ! -z "${user_targets}" ]; then
165 einfo "Building the following user targets: ${user_targets}"
166 conf_opts="${conf_opts} --enable-linux-user"
167 else
168 conf_opts="${conf_opts} --disable-linux-user"
169 fi
170
171 #config options
172 use gnutls || conf_opts="$conf_opts --disable-vnc-tls"
173 use ncurses || conf_opts="$conf_opts --disable-curses"
174 use sdl || conf_opts="$conf_opts --disable-sdl"
175 use vde || conf_opts="$conf_opts --disable-vde"
176 use bluetooth || conf_opts="$conf_opts --disable-bluez"
177 use sasl || conf_opts="$conf_opts --disable-vnc-sasl"
178 conf_opts="--disable-darwin-user --disable-bsd-user"
179
180 # audio options
181 audio_opts="oss"
182 use alsa && audio_opts="alsa $audio_opts"
183 use esd && audio_opts="esd $audio_opts"
184 use pulseaudio && audio_opts="pa $audio_opts"
185 use sdl && audio_opts="sdl $audio_opts"
186
187 ./configure --prefix=/usr \
188 --disable-strip \
189 --disable-xen \
190 ${conf_opts} \
191 --audio-drv-list="$audio_opts" \
192 --target-list="${softmmu_targets} ${user_targets}" \
193 --cc=$(tc-getCC) \
194 --host-cc=$(tc-getCC) \
195 || die "configure failed"
196 }
197
198 src_install() {
199 emake DESTDIR="${D}" install || die "make install failed"
200
201 insinto /etc/udev/rules.d/
202 doins kvm/scripts/65-kvm.rules
203
204 insinto /etc/qemu/
205 insopts -m0755
206 doins kvm/scripts/qemu-ifup
207 doins kvm/scripts/qemu-ifdown
208
209 dodoc Changelog MAINTAINERS TODO pci-ids.txt || die
210 newdoc pc-bios/README README.pc-bios || die
211 dohtml qemu-doc.html qemu-tech.html
212
213 dobin "${FILESDIR}"/qemu-kvm
214 dosym /usr/bin/qemu-kvm /usr/bin/kvm
215 }
216
217 pkg_postinst() {
218 elog "If you don't have kvm compiled into the kernel, make sure you have"
219 elog "the kernel module loaded before running kvm. The easiest way to"
220 elog "ensure that the kernel module is loaded is to load it on boot."
221 elog "For AMD CPUs the module is called 'kvm-amd'"
222 elog "For Intel CPUs the module is called 'kvm-intel'"
223 elog "Please review /etc/conf.d/modules for how to load these"
224 elog
225 elog "Make sure your user is in the 'kvm' group"
226 elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
227 elog
228 elog "You will need the Universal TUN/TAP driver compiled into your"
229 elog "kernel or loaded as a module to use the virtual network device"
230 elog "if using -net tap. You will also need support for 802.1d"
231 elog "Ethernet Bridging and a configured bridge if using the provided"
232 elog "kvm-ifup script from /etc/kvm."
233 echo
234 }