Gentoo Archives: gentoo-commits

From: "Luca Barbato (lu_zero)" <lu_zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/qemu-user: qemu-user-1.1.0.ebuild ChangeLog qemu-user-9999.ebuild
Date: Wed, 20 Jun 2012 10:58:29
Message-Id: 20120620105819.E47D82004B@flycatcher.gentoo.org
1 lu_zero 12/06/20 10:58:19
2
3 Modified: ChangeLog
4 Added: qemu-user-1.1.0.ebuild qemu-user-9999.ebuild
5 Log:
6 New version
7
8 (Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.44 app-emulation/qemu-user/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-user/ChangeLog?rev=1.44&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-user/ChangeLog?rev=1.44&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-user/ChangeLog?r1=1.43&r2=1.44
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v
20 retrieving revision 1.43
21 retrieving revision 1.44
22 diff -u -r1.43 -r1.44
23 --- ChangeLog 3 May 2012 18:49:08 -0000 1.43
24 +++ ChangeLog 20 Jun 2012 10:58:19 -0000 1.44
25 @@ -1,6 +1,13 @@
26 # ChangeLog for app-emulation/qemu-user
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v 1.43 2012/05/03 18:49:08 jdhore Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v 1.44 2012/06/20 10:58:19 lu_zero Exp $
30 +
31 +*qemu-user-9999 (20 Jun 2012)
32 +*qemu-user-1.1.0 (20 Jun 2012)
33 +
34 + 20 Jun 2012; Luca Barbato <lu_zero@g.o> +qemu-user-1.1.0.ebuild,
35 + +qemu-user-9999.ebuild:
36 + New version
37
38 03 May 2012; Jeff Horelick <jdhore@g.o> qemu-user-1.0.ebuild:
39 dev-util/pkgconfig -> virtual/pkgconfig
40
41
42
43 1.1 app-emulation/qemu-user/qemu-user-1.1.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-user/qemu-user-1.1.0.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-user/qemu-user-1.1.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: qemu-user-1.1.0.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-1.1.0.ebuild,v 1.1 2012/06/20 10:58:19 lu_zero Exp $
53
54 EAPI=4
55
56
57 if [[ ${PV} == *9999 ]]; then
58 EGIT_REPO_URI="git://git.qemu.org/qemu.git
59 http://git.qemu.org/git/qemu.git"
60 GIT_ECLASS="git-2"
61 fi
62
63 inherit eutils base flag-o-matic pax-utils toolchain-funcs ${GIT_ECLASS}
64
65 MY_P=${P/-user/}
66
67 if [[ ${PV} != *9999 ]]; then
68 SRC_URI="http://wiki.qemu.org/download/${MY_P}-1.tar.bz2
69 http://dev.gentoo.org/~lu_zero/distfiles/qemu-1.1.0-patches.tar.xz"
70 KEYWORDS="~amd64 ~ppc ~x86 ~ppc64"
71 S="${WORKDIR}/${MY_P}"
72 fi
73
74 DESCRIPTION="Open source dynamic CPU translator"
75 HOMEPAGE="http://www.qemu.org"
76
77 LICENSE="GPL-2 LGPL-2.1"
78 SLOT="0"
79 IUSE=""
80 RESTRICT="test"
81
82 COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64 s390x"
83 IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus unicore32"
84
85 for target in ${IUSE_USER_TARGETS}; do
86 IUSE="${IUSE} +qemu_user_targets_${target}"
87 done
88
89 DEPEND="app-text/texi2html
90 virtual/pkgconfig
91 sys-libs/zlib[static-libs]
92 dev-libs/glib[static-libs]"
93 RDEPEND=""
94
95 QA_WX_LOAD="
96 usr/bin/qemu-static-ppc64abi32-binfmt
97 usr/bin/qemu-static-ppc64
98 usr/bin/qemu-static-x86_64-binfmt
99 usr/bin/qemu-static-x86_64
100 usr/bin/qemu-static-unicore32-binfmt
101 usr/bin/qemu-static-m68k-binfmt
102 usr/bin/qemu-static-ppc-binfmt
103 usr/bin/qemu-static-alpha-binfmt
104 usr/bin/qemu-static-microblazeel-binfmt
105 usr/bin/qemu-static-sparc-binfmt
106 usr/bin/qemu-static-sparc32plus-binfmt
107 usr/bin/qemu-static-ppc
108 usr/bin/qemu-static-mipsn32el-binfmt
109 usr/bin/qemu-static-sh4eb-binfmt
110 usr/bin/qemu-static-ppc64abi32
111 usr/bin/qemu-static-ppc64-binfmt
112 usr/bin/qemu-static-armeb-binfmt
113 usr/bin/qemu-static-microblaze-binfmt
114 usr/bin/qemu-static-mips-binfmt
115 usr/bin/qemu-static-mipsel-binfmt
116 usr/bin/qemu-static-sh4-binfmt
117 usr/bin/qemu-static-s390x-binfmt
118 usr/bin/qemu-static-i386-binfmt
119 usr/bin/qemu-static-cris-binfmt
120 usr/bin/qemu-static-arm-binfmt
121 usr/bin/qemu-static-sparc64-binfmt
122 usr/bin/qemu-static-mipsn32-binfmt
123 "
124
125
126 src_prepare() {
127 cd "${S}"
128 # prevent docs to get automatically installed
129 sed -i '/$(DESTDIR)$(docdir)/d' Makefile
130 # Alter target makefiles to accept CFLAGS set via flag-o
131 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
132 Makefile Makefile.target
133
134 EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \
135 EPATCH_FORCE="yes" epatch
136 }
137
138 src_configure() {
139 filter-flags -fpie -fstack-protector
140
141 local conf_opts user_targets
142
143 for target in ${IUSE_USER_TARGETS} ; do
144 use "qemu_user_targets_${target}" && \
145 user_targets="${user_targets} ${target}-linux-user"
146 done
147
148 conf_opts="--enable-linux-user --disable-strip"
149 conf_opts+=" --disable-bsd-user"
150 conf_opts+=" --disable-system"
151 conf_opts+=" --disable-vnc-tls"
152 conf_opts+=" --disable-curses"
153 conf_opts+=" --disable-sdl"
154 conf_opts+=" --disable-vde"
155 conf_opts+=" --prefix=/usr --disable-bluez --disable-kvm"
156 conf_opts+=" --cc=$(tc-getCC) --host-cc=$(tc-getBUILD_CC)"
157 conf_opts+=" --disable-smartcard --disable-smartcard-nss"
158 conf_opts+=" --extra-ldflags=-Wl,-z,execheap"
159 conf_opts+=" --disable-strip --disable-werror"
160 conf_opts+=" --static"
161
162 ./configure ${conf_opts} --target-list="${user_targets}" || die "econf failed"
163 }
164
165 src_compile() {
166 emake || die "emake qemu failed"
167 }
168
169 src_install() {
170 emake DESTDIR="${ED}" install || die "make install failed"
171
172 # fixup to avoid collisions with qemu
173 base_dir="${ED}/usr/bin"
174 for qemu_bin in "${base_dir}"/qemu-*; do
175 qemu_bin_name=$(basename "${qemu_bin}")
176 mv "${qemu_bin}" "${base_dir}"/"${qemu_bin_name/qemu-/qemu-static-}" || die
177 done
178
179 pax-mark r "${ED}"/usr/bin/qemu-static-*
180 rm -fr "${ED}/usr/share"
181 dohtml qemu-doc.html
182 dohtml qemu-tech.html
183 newinitd "${FILESDIR}/qemu-binfmt.initd" qemu-binfmt
184 }
185
186
187
188 1.1 app-emulation/qemu-user/qemu-user-9999.ebuild
189
190 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-user/qemu-user-9999.ebuild?rev=1.1&view=markup
191 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu-user/qemu-user-9999.ebuild?rev=1.1&content-type=text/plain
192
193 Index: qemu-user-9999.ebuild
194 ===================================================================
195 # Copyright 1999-2012 Gentoo Foundation
196 # Distributed under the terms of the GNU General Public License v2
197 # $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-9999.ebuild,v 1.1 2012/06/20 10:58:19 lu_zero Exp $
198
199 EAPI=4
200
201
202 if [[ ${PV} == *9999 ]]; then
203 EGIT_REPO_URI="git://git.qemu.org/qemu.git
204 http://git.qemu.org/git/qemu.git"
205 GIT_ECLASS="git-2"
206 fi
207
208 inherit eutils base flag-o-matic pax-utils toolchain-funcs ${GIT_ECLASS}
209
210 MY_P=${P/-user/}
211
212 if [[ ${PV} != *9999 ]]; then
213 SRC_URI="http://wiki.qemu.org/download/${MY_P}-1.tar.bz2
214 http://dev.gentoo.org/~lu_zero/distfiles/qemu-1.1.0-patches.tar.xz"
215 KEYWORDS="~amd64 ~ppc ~x86 ~ppc64"
216 S="${WORKDIR}/${MY_P}"
217 fi
218
219 DESCRIPTION="Open source dynamic CPU translator"
220 HOMEPAGE="http://www.qemu.org"
221
222 LICENSE="GPL-2 LGPL-2.1"
223 SLOT="0"
224 IUSE=""
225 RESTRICT="test"
226
227 COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64 s390x"
228 IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus unicore32"
229
230 for target in ${IUSE_USER_TARGETS}; do
231 IUSE="${IUSE} +qemu_user_targets_${target}"
232 done
233
234 DEPEND="app-text/texi2html
235 virtual/pkgconfig
236 sys-libs/zlib[static-libs]
237 dev-libs/glib[static-libs]"
238 RDEPEND=""
239
240 QA_WX_LOAD="
241 usr/bin/qemu-static-ppc64abi32-binfmt
242 usr/bin/qemu-static-ppc64
243 usr/bin/qemu-static-x86_64-binfmt
244 usr/bin/qemu-static-x86_64
245 usr/bin/qemu-static-unicore32-binfmt
246 usr/bin/qemu-static-m68k-binfmt
247 usr/bin/qemu-static-ppc-binfmt
248 usr/bin/qemu-static-alpha-binfmt
249 usr/bin/qemu-static-microblazeel-binfmt
250 usr/bin/qemu-static-sparc-binfmt
251 usr/bin/qemu-static-sparc32plus-binfmt
252 usr/bin/qemu-static-ppc
253 usr/bin/qemu-static-mipsn32el-binfmt
254 usr/bin/qemu-static-sh4eb-binfmt
255 usr/bin/qemu-static-ppc64abi32
256 usr/bin/qemu-static-ppc64-binfmt
257 usr/bin/qemu-static-armeb-binfmt
258 usr/bin/qemu-static-microblaze-binfmt
259 usr/bin/qemu-static-mips-binfmt
260 usr/bin/qemu-static-mipsel-binfmt
261 usr/bin/qemu-static-sh4-binfmt
262 usr/bin/qemu-static-s390x-binfmt
263 usr/bin/qemu-static-i386-binfmt
264 usr/bin/qemu-static-cris-binfmt
265 usr/bin/qemu-static-arm-binfmt
266 usr/bin/qemu-static-sparc64-binfmt
267 usr/bin/qemu-static-mipsn32-binfmt
268 "
269
270
271 src_prepare() {
272 cd "${S}"
273 # prevent docs to get automatically installed
274 sed -i '/$(DESTDIR)$(docdir)/d' Makefile
275 # Alter target makefiles to accept CFLAGS set via flag-o
276 sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
277 Makefile Makefile.target
278
279 EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \
280 EPATCH_FORCE="yes" epatch
281 }
282
283 src_configure() {
284 filter-flags -fpie -fstack-protector
285
286 local conf_opts user_targets
287
288 for target in ${IUSE_USER_TARGETS} ; do
289 use "qemu_user_targets_${target}" && \
290 user_targets="${user_targets} ${target}-linux-user"
291 done
292
293 conf_opts="--enable-linux-user --disable-strip"
294 conf_opts+=" --disable-bsd-user"
295 conf_opts+=" --disable-system"
296 conf_opts+=" --disable-vnc-tls"
297 conf_opts+=" --disable-curses"
298 conf_opts+=" --disable-sdl"
299 conf_opts+=" --disable-vde"
300 conf_opts+=" --prefix=/usr --disable-bluez --disable-kvm"
301 conf_opts+=" --cc=$(tc-getCC) --host-cc=$(tc-getBUILD_CC)"
302 conf_opts+=" --disable-smartcard --disable-smartcard-nss"
303 conf_opts+=" --extra-ldflags=-Wl,-z,execheap"
304 conf_opts+=" --disable-strip --disable-werror"
305 conf_opts+=" --static"
306
307 ./configure ${conf_opts} --target-list="${user_targets}" || die "econf failed"
308 }
309
310 src_compile() {
311 emake || die "emake qemu failed"
312 }
313
314 src_install() {
315 emake DESTDIR="${ED}" install || die "make install failed"
316
317 # fixup to avoid collisions with qemu
318 base_dir="${ED}/usr/bin"
319 for qemu_bin in "${base_dir}"/qemu-*; do
320 qemu_bin_name=$(basename "${qemu_bin}")
321 mv "${qemu_bin}" "${base_dir}"/"${qemu_bin_name/qemu-/qemu-static-}" || die
322 done
323
324 pax-mark r "${ED}"/usr/bin/qemu-static-*
325 rm -fr "${ED}/usr/share"
326 dohtml qemu-doc.html
327 dohtml qemu-tech.html
328 newinitd "${FILESDIR}/qemu-binfmt.initd" qemu-binfmt
329 }