1 |
lu_zero 11/06/27 19:27:45 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: qemu-9999.ebuild |
5 |
Log: |
6 |
Introduce live ebuild, useful for static qemu-user deployment |
7 |
|
8 |
(Portage version: 2.1.10.3/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.86 app-emulation/qemu/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.86&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.86&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?r1=1.85&r2=1.86 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v |
20 |
retrieving revision 1.85 |
21 |
retrieving revision 1.86 |
22 |
diff -u -r1.85 -r1.86 |
23 |
--- ChangeLog 24 Mar 2011 19:50:14 -0000 1.85 |
24 |
+++ ChangeLog 27 Jun 2011 19:27:45 -0000 1.86 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for app-emulation/qemu |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.85 2011/03/24 19:50:14 angelos Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.86 2011/06/27 19:27:45 lu_zero Exp $ |
30 |
+ |
31 |
+*qemu-9999 (27 Jun 2011) |
32 |
+ |
33 |
+ 27 Jun 2011; Luca Barbato <lu_zero@g.o> +qemu-9999.ebuild: |
34 |
+ Introduce live ebuild, useful for static qemu-user deployment |
35 |
|
36 |
24 Mar 2011; Christoph Mende <angelos@g.o> qemu-0.11.1.ebuild: |
37 |
Stable on amd64 wrt bug #356685 |
38 |
|
39 |
|
40 |
|
41 |
1.1 app-emulation/qemu/qemu-9999.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-9999.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-9999.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: qemu-9999.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2011 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-9999.ebuild,v 1.1 2011/06/27 19:27:45 lu_zero Exp $ |
51 |
|
52 |
EAPI="2" |
53 |
|
54 |
if [[ ${PV} = *9999* ]]; then |
55 |
EGIT_REPO_URI="git://git.qemu.org/qemu.git" |
56 |
GIT_ECLASS="git" |
57 |
fi |
58 |
|
59 |
inherit eutils flag-o-matic ${GIT_ECLASS} linux-info toolchain-funcs |
60 |
|
61 |
if [[ ${PV} = *9999* ]]; then |
62 |
SRC_URI="" |
63 |
KEYWORDS="" |
64 |
else |
65 |
SRC_URI="http://download.savannah.gnu.org/releases/qemu/${P}.tar.gz" |
66 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
67 |
fi |
68 |
|
69 |
DESCRIPTION="QEMU emulator and ABI wrapper" |
70 |
HOMEPAGE="http://www.qemu.org" |
71 |
|
72 |
LICENSE="GPL-2" |
73 |
SLOT="0" |
74 |
# xen is disabled until the deps are fixed |
75 |
IUSE="+aio alsa bluetooth brltty curl esd fdt hardened jpeg ncurses \ |
76 |
png pulseaudio qemu-ifup sasl sdl ssl static vde" |
77 |
|
78 |
COMMON_TARGETS="i386 x86_64 arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64" |
79 |
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb" |
80 |
IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc32plus" |
81 |
|
82 |
for target in ${IUSE_SOFTMMU_TARGETS}; do |
83 |
IUSE="${IUSE} +qemu_softmmu_targets_${target}" |
84 |
done |
85 |
|
86 |
for target in ${IUSE_USER_TARGETS}; do |
87 |
IUSE="${IUSE} +qemu_user_targets_${target}" |
88 |
done |
89 |
|
90 |
RESTRICT="test" |
91 |
|
92 |
RDEPEND=" |
93 |
!app-emulation/qemu-kvm |
94 |
!app-emulation/qemu-softmmu |
95 |
!app-emulation/qemu-user |
96 |
!app-emulation/qemu-kvm-spice |
97 |
sys-apps/pciutils |
98 |
>=sys-apps/util-linux-2.16.0 |
99 |
sys-libs/zlib |
100 |
aio? ( dev-libs/libaio ) |
101 |
alsa? ( >=media-libs/alsa-lib-1.0.13 ) |
102 |
bluetooth? ( net-wireless/bluez ) |
103 |
brltty? ( app-accessibility/brltty ) |
104 |
curl? ( net-misc/curl ) |
105 |
esd? ( media-sound/esound ) |
106 |
fdt? ( >=sys-apps/dtc-1.2.0 ) |
107 |
jpeg? ( virtual/jpeg ) |
108 |
ncurses? ( sys-libs/ncurses ) |
109 |
png? ( media-libs/libpng ) |
110 |
pulseaudio? ( media-sound/pulseaudio ) |
111 |
qemu-ifup? ( sys-apps/iproute2 net-misc/bridge-utils ) |
112 |
sasl? ( dev-libs/cyrus-sasl ) |
113 |
sdl? ( >=media-libs/libsdl-1.2.11[X] ) |
114 |
ssl? ( net-libs/gnutls ) |
115 |
vde? ( net-misc/vde ) |
116 |
" |
117 |
|
118 |
DEPEND="${RDEPEND} |
119 |
app-text/texi2html |
120 |
>=sys-kernel/linux-headers-2.6.29 |
121 |
ssl? ( dev-util/pkgconfig ) |
122 |
" |
123 |
|
124 |
pkg_setup() { |
125 |
use qemu_softmmu_targets_x86_64 || ewarn "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64" |
126 |
} |
127 |
|
128 |
src_prepare() { |
129 |
# prevent docs to get automatically installed |
130 |
sed -i '/$(DESTDIR)$(docdir)/d' Makefile || die |
131 |
# Alter target makefiles to accept CFLAGS set via flag-o |
132 |
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ |
133 |
Makefile Makefile.target || die |
134 |
# append CFLAGS while linking |
135 |
sed -i 's/$(LDFLAGS)/$(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS)/' rules.mak || die |
136 |
} |
137 |
|
138 |
src_configure() { |
139 |
local conf_opts audio_opts user_targets |
140 |
|
141 |
for target in ${IUSE_SOFTMMU_TARGETS} ; do |
142 |
use "qemu_softmmu_targets_${target}" && \ |
143 |
softmmu_targets="${softmmu_targets} ${target}-softmmu" |
144 |
done |
145 |
|
146 |
for target in ${IUSE_USER_TARGETS} ; do |
147 |
use "qemu_user_targets_${target}" && \ |
148 |
user_targets="${user_targets} ${target}-linux-user" |
149 |
done |
150 |
|
151 |
if [ -z "${softmmu_targets}" ]; then |
152 |
conf_opts="${conf_opts} --disable-system" |
153 |
else |
154 |
einfo "Building the following softmmu targets: ${softmmu_targets}" |
155 |
fi |
156 |
|
157 |
if [ ! -z "${user_targets}" ]; then |
158 |
einfo "Building the following user targets: ${user_targets}" |
159 |
conf_opts="${conf_opts} --enable-linux-user" |
160 |
else |
161 |
conf_opts="${conf_opts} --disable-linux-user" |
162 |
fi |
163 |
|
164 |
# Fix QA issues. QEMU needs executable heaps and we need to mark it as such |
165 |
conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap" |
166 |
|
167 |
# Add support for static builds |
168 |
use static && conf_opts="${conf_opts} --static" |
169 |
|
170 |
# Fix the $(prefix)/etc issue |
171 |
conf_opts="${conf_opts} --sysconfdir=/etc" |
172 |
|
173 |
#config options |
174 |
conf_opts="${conf_opts} $(use_enable aio linux-aio)" |
175 |
conf_opts="${conf_opts} $(use_enable bluetooth bluez)" |
176 |
conf_opts="${conf_opts} $(use_enable brltty brlapi)" |
177 |
conf_opts="${conf_opts} $(use_enable curl)" |
178 |
conf_opts="${conf_opts} $(use_enable fdt)" |
179 |
conf_opts="${conf_opts} $(use_enable hardened user-pie)" |
180 |
conf_opts="${conf_opts} $(use_enable jpeg vnc-jpeg)" |
181 |
conf_opts="${conf_opts} $(use_enable ncurses curses)" |
182 |
conf_opts="${conf_opts} $(use_enable png vnc-png)" |
183 |
conf_opts="${conf_opts} $(use_enable sasl vnc-sasl)" |
184 |
conf_opts="${conf_opts} $(use_enable sdl)" |
185 |
conf_opts="${conf_opts} $(use_enable ssl vnc-tls)" |
186 |
conf_opts="${conf_opts} $(use_enable vde)" |
187 |
conf_opts="${conf_opts} --disable-xen" |
188 |
conf_opts="${conf_opts} --disable-darwin-user --disable-bsd-user" |
189 |
|
190 |
# audio options |
191 |
audio_opts="oss" |
192 |
use alsa && audio_opts="alsa ${audio_opts}" |
193 |
use esd && audio_opts="esd ${audio_opts}" |
194 |
use pulseaudio && audio_opts="pa ${audio_opts}" |
195 |
use sdl && audio_opts="sdl ${audio_opts}" |
196 |
./configure --prefix=/usr \ |
197 |
--disable-strip \ |
198 |
--disable-werror \ |
199 |
--disable-kvm \ |
200 |
--enable-nptl \ |
201 |
--enable-uuid \ |
202 |
${conf_opts} \ |
203 |
--audio-drv-list="${audio_opts}" \ |
204 |
--target-list="${softmmu_targets} ${user_targets}" \ |
205 |
--cc="$(tc-getCC)" \ |
206 |
--host-cc="$(tc-getBUILD_CC)" \ |
207 |
|| die "configure failed" |
208 |
|
209 |
# this is for qemu upstream's threaded support which is |
210 |
# in development and broken |
211 |
# the kvm project has its own support for threaded IO |
212 |
# which is always on and works |
213 |
# --enable-io-thread \ |
214 |
} |
215 |
|
216 |
src_compile() { |
217 |
# Restricting parallel build until we get a patch to fix this |
218 |
emake || die |
219 |
} |
220 |
|
221 |
src_install() { |
222 |
emake DESTDIR="${D}" install || die "make install failed" |
223 |
|
224 |
if [ ! -z "${softmmu_targets}" ]; then |
225 |
exeinto /etc/qemu |
226 |
use qemu-ifup && { doexe \ |
227 |
"${FILESDIR}/qemu-ifup" \ |
228 |
"${FILESDIR}/qemu-ifdown" \ |
229 |
|| die "qemu interface scripts missing" ; } |
230 |
fi |
231 |
|
232 |
dodoc Changelog MAINTAINERS TODO pci-ids.txt || die |
233 |
newdoc pc-bios/README README.pc-bios || die |
234 |
dohtml qemu-doc.html qemu-tech.html || die |
235 |
} |
236 |
|
237 |
pkg_postinst() { |
238 |
use qemu-ifup || return |
239 |
elog "You will need the Universal TUN/TAP driver compiled into your" |
240 |
elog "kernel or loaded as a module to use the virtual network device" |
241 |
elog "if using -net tap. You will also need support for 802.1d" |
242 |
elog "Ethernet Bridging and a configured bridge if using the provided" |
243 |
elog "qemu-ifup script from /etc/qemu." |
244 |
echo |
245 |
} |