Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/
Date: Tue, 28 Feb 2017 05:14:36
Message-Id: 1488258798.c9eac4cbe40417c25e455aada13593f7824f42ef.tamiko@gentoo
1 commit: c9eac4cbe40417c25e455aada13593f7824f42ef
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 04:30:57 2017 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 05:13:18 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9eac4cb
7
8 app-emulation/qemu: update live ebuild
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 app-emulation/qemu/qemu-9999.ebuild | 117 ++++++++++++++++++------------------
13 1 file changed, 59 insertions(+), 58 deletions(-)
14
15 diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild
16 index b919ffecd6..33c2b1302b 100644
17 --- a/app-emulation/qemu/qemu-9999.ebuild
18 +++ b/app-emulation/qemu/qemu-9999.ebuild
19 @@ -1,7 +1,7 @@
20 # Copyright 1999-2017 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22
23 -EAPI="5"
24 +EAPI="6"
25
26 PYTHON_COMPAT=( python2_7 )
27 PYTHON_REQ_USE="ncurses,readline"
28 @@ -13,7 +13,7 @@ inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
29
30 if [[ ${PV} = *9999* ]]; then
31 EGIT_REPO_URI="git://git.qemu.org/qemu.git"
32 - inherit git-2
33 + inherit git-r3
34 SRC_URI=""
35 else
36 SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
37 @@ -25,19 +25,20 @@ HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
38
39 LICENSE="GPL-2 LGPL-2 BSD-2"
40 SLOT="0"
41 -IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt glusterfs \
42 -gnutls gtk gtk2 infiniband iscsi +jpeg \
43 -kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs
44 -+png pulseaudio python \
45 -rbd sasl +seccomp sdl sdl2 selinux smartcard snappy spice ssh static static-softmmu
46 -static-user systemtap tci test +threads usb usbredir vde +vhost-net \
47 -virgl virtfs +vnc vte xattr xen xfs"
48 -
49 -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
50 -mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc sparc64
51 -x86_64"
52 -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
53 -IUSE_USER_TARGETS="${COMMON_TARGETS} armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
54 +IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt
55 + glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
56 + kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
57 + pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
58 + spice ssh static systemtap tci test +threads usb usbredir vde
59 + +vhost-net virgl virtfs +vnc vte xattr xen xfs"
60 +
61 +COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel
62 + mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc
63 + sparc64 x86_64"
64 +IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
65 + lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
66 +IUSE_USER_TARGETS="${COMMON_TARGETS}
67 + armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
68
69 use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
70 use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
71 @@ -52,35 +53,38 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
72 qemu_softmmu_targets_ppc? ( fdt )
73 qemu_softmmu_targets_ppc64? ( fdt )
74 sdl2? ( sdl )
75 - static? ( static-softmmu static-user )
76 - static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk !gtk2 )
77 + static? ( !alsa !pulseaudio !bluetooth !opengl !gtk !gtk2 )
78 virtfs? ( xattr )
79 vte? ( gtk )"
80
81 +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
82 +# and user/softmmu targets (qemu-*, qemu-system-*).
83 +#
84 # Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
85 #
86 # The attr lib isn't always linked in (although the USE flag is always
87 # respected). This is because qemu supports using the C library's API
88 # when available rather than always using the extranl library.
89 #
90 -# Older versions of gnutls are supported, but it's simpler to just require
91 -# the latest versions. This is also why we require nettle.
92 -#
93 -# TODO: Split out tools deps into another var. e.g. bzip2 is only used by
94 -# system binaries and tools, not user binaries.
95 -COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
96 - sys-libs/zlib[static-libs(+)]
97 - bzip2? ( app-arch/bzip2[static-libs(+)] )
98 - xattr? ( sys-apps/attr[static-libs(+)] )"
99 -SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
100 +# To configure and compile qemu user targets or tools alone the following
101 +# dependencies are not strictly necessary:
102 +# alsa? ( >=media-libs/alsa-lib-1.0.13 )
103 +# fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
104 +# pulseaudio? ( media-sound/pulseaudio )
105 +# seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
106 +# but these are so few it is not worth the effort to separate this list.
107 +TARGETS_DEPEND="
108 + >=dev-libs/glib-2.0[static-libs(+)]
109 >=x11-libs/pixman-0.28.0[static-libs(+)]
110 + sys-libs/zlib[static-libs(+)]
111 accessibility? ( app-accessibility/brltty[static-libs(+)] )
112 aio? ( dev-libs/libaio[static-libs(+)] )
113 alsa? ( >=media-libs/alsa-lib-1.0.13 )
114 bluetooth? ( net-wireless/bluez )
115 + bzip2? ( app-arch/bzip2[static-libs(+)] )
116 caps? ( sys-libs/libcap-ng[static-libs(+)] )
117 curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
118 - fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
119 + fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
120 glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
121 gnutls? (
122 dev-libs/nettle:=[static-libs(+)]
123 @@ -114,6 +118,7 @@ SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
124 )
125 png? ( media-libs/libpng:0=[static-libs(+)] )
126 pulseaudio? ( media-sound/pulseaudio )
127 + python? ( ${PYTHON_DEPS} )
128 rbd? ( sys-cluster/ceph[static-libs(+)] )
129 sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
130 sdl? (
131 @@ -134,13 +139,16 @@ SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
132 >=app-emulation/spice-0.12.0[static-libs(+)]
133 )
134 ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
135 - usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
136 + systemtap? ( dev-util/systemtap )
137 usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
138 + usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
139 vde? ( net-misc/vde[static-libs(+)] )
140 virgl? ( media-libs/virglrenderer[static-libs(+)] )
141 virtfs? ( sys-libs/libcap )
142 + xattr? ( sys-apps/attr[static-libs(+)] )
143 + xen? ( app-emulation/xen-tools:= )
144 xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
145 -USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
146 +
147 X86_FIRMWARE_DEPEND="
148 >=sys-firmware/ipxe-1.0.0_p20130624
149 pin-upstream-blobs? (
150 @@ -153,14 +161,11 @@ X86_FIRMWARE_DEPEND="
151 sys-firmware/sgabios
152 sys-firmware/vgabios
153 )"
154 +
155 CDEPEND="
156 - !static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) " ${use_softmmu_targets}) )
157 - !static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) " ${use_user_targets}) )
158 + !static? ( ${TARGETS_DEPEND//\[static-libs(+)]} )
159 qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
160 - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
161 - python? ( ${PYTHON_DEPS} )
162 - systemtap? ( dev-util/systemtap )
163 - xen? ( app-emulation/xen-tools:= )"
164 + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )"
165 DEPEND="${CDEPEND}
166 dev-lang/perl
167 =dev-lang/python-2*
168 @@ -168,15 +173,19 @@ DEPEND="${CDEPEND}
169 virtual/pkgconfig
170 kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
171 gtk? ( nls? ( sys-devel/gettext ) )
172 - static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND} ) " ${use_softmmu_targets}) )
173 - static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND} ) " ${use_user_targets}) )
174 + static? ( ${TARGETS_DEPEND} )
175 test? (
176 dev-libs/glib[utils]
177 sys-devel/bc
178 )"
179 RDEPEND="${CDEPEND}
180 - selinux? ( sec-policy/selinux-qemu )
181 -"
182 + selinux? ( sec-policy/selinux-qemu )"
183 +
184 +PATCHES=(
185 + "${FILESDIR}"/${PN}-2.5.0-cflags.patch
186 + "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
187 +)
188 +
189
190 STRIP_MASK="/usr/share/qemu/palcode-clipper"
191
192 @@ -186,8 +195,7 @@ QA_PREBUILT="
193 usr/share/qemu/openbios-sparc32
194 usr/share/qemu/palcode-clipper
195 usr/share/qemu/s390-ccw.img
196 - usr/share/qemu/u-boot.e500
197 -"
198 + usr/share/qemu/u-boot.e500"
199
200 QA_WX_LOAD="usr/bin/qemu-i386
201 usr/bin/qemu-x86_64
202 @@ -332,8 +340,7 @@ src_prepare() {
203 -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
204 Makefile Makefile.target || die
205
206 - epatch "${FILESDIR}"/${PN}-2.5.0-cflags.patch
207 - epatch "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
208 + default
209
210 # Fix ld and objcopy being called directly
211 tc-export AR LD OBJCOPY
212 @@ -341,8 +348,6 @@ src_prepare() {
213 # Verbose builds
214 MAKEOPTS+=" V=1"
215
216 - epatch_user
217 -
218 # Run after we've applied all patches.
219 handle_locales
220 }
221 @@ -356,7 +361,6 @@ qemu_src_configure() {
222
223 local buildtype=$1
224 local builddir="${S}/${buildtype}-build"
225 - local static_flag="static-${buildtype}"
226
227 mkdir "${builddir}"
228
229 @@ -456,6 +460,7 @@ qemu_src_configure() {
230 conf_opts+=(
231 --disable-linux-user
232 --enable-system
233 + --disable-tools
234 --with-system-pixman
235 --audio-drv-list="${audio_opts}"
236 )
237 @@ -467,9 +472,9 @@ qemu_src_configure() {
238 --disable-linux-user
239 --disable-system
240 --disable-blobs
241 + --enable-tools
242 $(use_enable bzip2)
243 )
244 - static_flag="static"
245 ;;
246 esac
247
248 @@ -482,7 +487,7 @@ qemu_src_configure() {
249 # We always want to attempt to build with PIE support as it results
250 # in a more secure binary. But it doesn't work with static or if
251 # the current GCC doesn't have PIE support.
252 - if use ${static_flag}; then
253 + if use static; then
254 conf_opts+=( --static --disable-pie )
255 else
256 gcc-specs-pie && conf_opts+=( --enable-pie )
257 @@ -525,7 +530,7 @@ src_configure() {
258
259 [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
260 [[ -n ${user_targets} ]] && qemu_src_configure "user"
261 - [[ -z ${softmmu_targets}${user_targets} ]] && qemu_src_configure "tools"
262 + qemu_src_configure "tools"
263 }
264
265 src_compile() {
266 @@ -539,10 +544,8 @@ src_compile() {
267 default
268 fi
269
270 - if [[ -z ${softmmu_targets}${user_targets} ]]; then
271 - cd "${S}/tools-build"
272 - default
273 - fi
274 + cd "${S}/tools-build"
275 + default
276 }
277
278 src_test() {
279 @@ -643,10 +646,8 @@ src_install() {
280 fi
281 fi
282
283 - if [[ -z ${softmmu_targets}${user_targets} ]]; then
284 - cd "${S}/tools-build"
285 - emake DESTDIR="${ED}" install
286 - fi
287 + cd "${S}/tools-build"
288 + emake DESTDIR="${ED}" install
289
290 # Disable mprotect on the qemu binaries as they use JITs to be fast #459348
291 pushd "${ED}"/usr/bin >/dev/null