summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-02-28 13:55:53 +0000
committerLuca Barbato <lu_zero@gentoo.org>2012-02-28 13:55:53 +0000
commit56566858e994ec9c55c064ab64d8b1748b089cc2 (patch)
tree580984b52e952f08b98c3ba95021cc35ecafadd8
parentcorrect installation inside prefix (diff)
downloadhistorical-56566858e994ec9c55c064ab64d8b1748b089cc2.tar.gz
historical-56566858e994ec9c55c064ab64d8b1748b089cc2.tar.bz2
historical-56566858e994ec9c55c064ab64d8b1748b089cc2.zip
New version, static only
Package-Manager: portage-2.2.0_alpha89/cvs/Linux x86_64
-rw-r--r--app-emulation/qemu-user/ChangeLog10
-rw-r--r--app-emulation/qemu-user/Manifest14
-rw-r--r--app-emulation/qemu-user/files/qemu-binfmt.initd132
-rw-r--r--app-emulation/qemu-user/qemu-user-1.0.ebuild127
4 files changed, 275 insertions, 8 deletions
diff --git a/app-emulation/qemu-user/ChangeLog b/app-emulation/qemu-user/ChangeLog
index d63c6f7917c6..5657c0a3447f 100644
--- a/app-emulation/qemu-user/ChangeLog
+++ b/app-emulation/qemu-user/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/qemu-user
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v 1.40 2010/10/15 14:21:23 flameeyes Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/ChangeLog,v 1.41 2012/02/28 13:55:52 lu_zero Exp $
+
+*qemu-user-1.0 (28 Feb 2012)
+
+ 28 Feb 2012; Luca Barbato <lu_zero@gentoo.org> +qemu-user-1.0.ebuild,
+ +files/qemu-binfmt.initd:
+ New version, static only
15 Oct 2010; Diego E. Pettenò <flameeyes@gentoo.org>
-qemu-user-0.10.0.ebuild, -qemu-user-0.10.1.ebuild:
diff --git a/app-emulation/qemu-user/Manifest b/app-emulation/qemu-user/Manifest
index 24de8413b320..d89cd667dddb 100644
--- a/app-emulation/qemu-user/Manifest
+++ b/app-emulation/qemu-user/Manifest
@@ -2,18 +2,20 @@
Hash: SHA256
AUX qemu-0.7.0-ppc-linker.patch 11509 RMD160 d92e368e6adc2e6acdb97d92221781337d5322f7 SHA1 897be37b49b7908ea64972cd20ada0bb4def70cc SHA256 26d3832f1ff70d9d29f06cf8c6e1c1ac4ad353854c9b3b510875d2330ab6d2f9
+AUX qemu-binfmt.initd 7476 RMD160 7110b786df4f765659eff2c3bd3452a70c51ce7e SHA1 7fdc3214d5d92e5d237a3c59e43aa38f43a9c6dd SHA256 70fdcdfabd9423ad95f97fe75a9bb7d99f57a11c425621405b43b5394234ab48
DIST qemu-0.12.2.tar.gz 4691757 RMD160 00d5a89eb069ffb0267c677d946671a27948594d SHA1 9e826ea1458d358598fbf61ab577c8f849cd99c1 SHA256 accec2eec7dbd89e0b49474d1a0277ae3e7239a7700754b1cfb192f091766843
DIST qemu-0.9.0.tar.gz 1901741 RMD160 4296542b6da18a6ac93d20787330d3c1c2ac0a19 SHA1 1e57e48a06eb8729913d92601000466eecef06cb SHA256 491facf9335654967ee53d8fb3540a274bfcbdcc225506bd38c4ee8e9ab405c1
+DIST qemu-1.0-patches.tar.xz 43540 RMD160 79a39d5a8050fe8eedd5e0becb828d2ae0b465c3 SHA1 423880fb32f27e05d1382ed341e6cc4bee840dc3 SHA256 32a8b98cd5fd661268328d71efbfafd65972102b10da363193f3da98bd9b2d72
+DIST qemu-1.0.tar.gz 10848714 RMD160 3a60aef6cfebba6896bdb12c99525da5456172fd SHA1 7dcb1b3516554d6d899d7488cd444dbb7721fcee SHA256 47674b7da559d5e1b44cc401af9ac5ad962d14e9eede12567b13e4b841989737
EBUILD qemu-user-0.12.2.ebuild 1754 RMD160 5f5b5f517d07889f13f61af1741d096b79e45bdf SHA1 d11747cee7fc11a22620dea6ca720c7c843ebe62 SHA256 b8ca632052d78d8e267ca55a03234a262ad2639683a9ee14c8fdc4d58dd1a024
EBUILD qemu-user-0.9.0.ebuild 2385 RMD160 878466bbe7fb8f15cf86613aee4937b5cc3f3229 SHA1 e0df500334c37bfee2c10ec0bc1fbab4f1f7f412 SHA256 76e45f6a629e5a4bca4ecdaad2a2eb8fc4a22df6e31356adabbec87ec272ba6d
-MISC ChangeLog 5771 RMD160 f5d5966e4739f7dfc1d7aa3bba9e5f29b29d8838 SHA1 7587a626c600a244b7004fe06413ac6b4643a2c3 SHA256 4166da87858c400f3774b676c0a58de35015c8dcca8a5a62a4edb810248b7714
+EBUILD qemu-user-1.0.ebuild 3734 RMD160 e488d88a0316e93c08a5ed07266b5b7e747f1a85 SHA1 02b13804ad21a5fe845dd0105a4144cb3e10fad2 SHA256 c862f9d4ba69a8a913b41c9c47d5b4d1c9436e9210e4351358d4990ef987bded
+MISC ChangeLog 5927 RMD160 b0a66c9a591d02b2eba8499b3c404f2a4db1c2be SHA1 640143a0319adb4ee7ef86a8439d6e044196f57c SHA256 2eb212e2e663946b34119b03a6638fdec549c33a2ec6379264c1f74d220e8f3d
MISC metadata.xml 202 RMD160 1a73e85a81ce1045569a8b488999c0823756a0d9 SHA1 de56e79375b449ed9bdf49abd86aa9d28acd54ef SHA256 eda78eb836e5f76704299683d68168157f552076da6446e1a246b345aaa5811f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iJwEAQEIAAYFAk58/TcACgkQfXuS5UK5QB36SgP8DdPNhajh0cUvzuZHlw1XTCxQ
-5DOQBPEQUH3EtSKSx6+Tav0r1o9DUhq6nYhCATqxy8SBIBN5Yy6hBsOwEnkIvY7p
-IvNelUkhkInnHHazR1EyE+nAwFuRyVn1q/GX/XNXf+xTKR7/MXERPBxmc4G+Umoj
-4ay7lkKV1y1GQxqMkXU=
-=QmLr
+iF4EAREIAAYFAk9M3PUACgkQYpJnKVbCxcx+XQD/W9RM8BU8R5O/RvURg60aNYbU
+vfyBaCnVJ/PXj+ZbQ+sBAIvVwXoelvpu8IRrI2n/vKXraG8sLCVEJY0r1ofEPvoR
+=eAct
-----END PGP SIGNATURE-----
diff --git a/app-emulation/qemu-user/files/qemu-binfmt.initd b/app-emulation/qemu-user/files/qemu-binfmt.initd
new file mode 100644
index 000000000000..ff6ca8d3a626
--- /dev/null
+++ b/app-emulation/qemu-user/files/qemu-binfmt.initd
@@ -0,0 +1,132 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/files/qemu-binfmt.initd,v 1.1 2012/02/28 13:55:53 lu_zero Exp $
+
+# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
+
+depend() {
+ after procfs
+}
+
+start() {
+ ebegin "Registering qemu-user binaries"
+
+ if [[ ! -d /proc/sys/fs/binfmt_misc ]] ; then
+ eerror "You need support for \"misc binaries\" in your kernel!"
+ eend 1
+ fi
+
+ if [[ $(mount | grep -c binfmt_misc) -eq 0 ]] ; then
+ mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc &> /dev/null
+ local result=$?
+
+ if [[ $result -ne 0 ]] ; then
+ eend $result
+ fi
+ fi
+
+ # probe cpu type
+ cpu=`uname -m`
+ case "$cpu" in
+ i386|i486|i586|i686|i86pc|BePC|x86_64)
+ cpu="i386"
+ ;;
+ m68k)
+ cpu="m68k"
+ ;;
+ mips*)
+ cpu="mips"
+ ;;
+ "Power Macintosh"|ppc|ppc64)
+ cpu="ppc"
+ ;;
+ armv[4-9]*)
+ cpu="arm"
+ ;;
+ sparc*)
+ cpu="sparc"
+ ;;
+ esac
+
+ # register the interpreter for each cpu except for the native one
+ if [ $cpu != "i386" -a -x "/usr/bin/qemu-static-i386-binfmt" ] ; then
+ echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "alpha" -a -x "/usr/bin/qemu-static-alpha-binfmt" ] ; then
+ echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-alpha-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "arm" -a -x "/usr/bin/qemu-static-arm-binfmt" ] ; then
+ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-arm-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "arm" -a -x "/usr/bin/qemu-static-armeb-binfmt" ] ; then
+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-armeb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "sparc" -a -x "/usr/bin/qemu-static-sparc-binfmt" ] ; then
+ echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-sparc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "ppc" -a -x "/usr/bin/qemu-static-ppc-binfmt" ] ; then
+ echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-ppc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "m68k" -a -x "/usr/bin/qemu-static-m68k-binfmt" ] ; then
+ echo 'Please check cpu value and header information for m68k!'
+ echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-m68k-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "mips" -a -x "/usr/bin/qemu-static-mips-binfmt" ] ; then
+ # FIXME: We could use the other endianness on a MIPS host.
+ echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-mips-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "mips" -a -x "/usr/bin/qemu-static-mipsel-binfmt" ] ; then
+ echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-mipsel-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "mips" -a -x "/usr/bin/qemu-static-mipsn32-binfmt" ] ; then
+ echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-mipsn32-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "mips" -a -x "/usr/bin/qemu-static-mipsn32el-binfmt" ] ; then
+ echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-mipsn32el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "mips" -a -x "/usr/bin/qemu-static-mips64-binfmt" ] ; then
+ echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-mips64-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "mips" -a -x "/usr/bin/qemu-static-mips64el-binfmt" ] ; then
+ echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-mips64el-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "sh" -a -x "/usr/bin/qemu-static-sh4-binfmt" ] ; then
+ echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-static-sh4-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "sh" -a -x "/usr/bin/qemu-static-sh4eb-binfmt" ] ; then
+ echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-static-sh4eb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ if [ $cpu != "s390x" -a -x "/usr/local/bin/qemu-static-s390x-binfmt" ] ; then
+ echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-static-s390x-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Unregistering qemu-user binaries"
+ local arches
+
+ arches="${arches} i386 i486"
+ arches="${arches} alpha"
+ arches="${arches} arm armeb"
+ arches="${arches} sparc"
+ arches="${arches} ppc"
+ arches="${arches} m68k"
+ arches="${arches} mips mipsel mipsn32 mipsn32el mips64 mips64el"
+ arches="${arches} sh4 sh4eb"
+ arches="${arches} s390x"
+
+ for a in ${arches}; do
+ if [[ -f /proc/sys/fs/binfmt_misc/$a ]] ; then
+ echo '-1' > /proc/sys/fs/binfmt_misc/$a
+ fi
+ done
+
+ eend $?
+}
+
+# vim: ts=4 :
+
+
diff --git a/app-emulation/qemu-user/qemu-user-1.0.ebuild b/app-emulation/qemu-user/qemu-user-1.0.ebuild
new file mode 100644
index 000000000000..9d3a219064a1
--- /dev/null
+++ b/app-emulation/qemu-user/qemu-user-1.0.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-1.0.ebuild,v 1.1 2012/02/28 13:55:53 lu_zero Exp $
+
+EAPI=4
+
+inherit eutils base flag-o-matic pax-utils toolchain-funcs
+
+MY_P=${P/-user/}
+
+SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.gz
+ http://dev.gentoo.org/~lu_zero/distfiles/${MY_P}-patches.tar.xz"
+
+DESCRIPTION="Open source dynamic CPU translator"
+HOMEPAGE="http://www.qemu.org"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~ppc64"
+IUSE=""
+RESTRICT="test"
+
+COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64 s390x"
+IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus unicore32"
+
+for target in ${IUSE_USER_TARGETS}; do
+ IUSE="${IUSE} +qemu_user_targets_${target}"
+done
+
+
+DEPEND="app-text/texi2html
+ dev-util/pkgconfig
+ sys-libs/zlib[static-libs]
+ dev-libs/glib[static-libs]"
+RDEPEND=""
+
+QA_WX_LOAD="
+ usr/bin/qemu-static-ppc64abi32-binfmt
+ usr/bin/qemu-static-ppc64
+ usr/bin/qemu-static-x86_64-binfmt
+ usr/bin/qemu-static-x86_64
+ usr/bin/qemu-static-unicore32-binfmt
+ usr/bin/qemu-static-m68k-binfmt
+ usr/bin/qemu-static-ppc-binfmt
+ usr/bin/qemu-static-alpha-binfmt
+ usr/bin/qemu-static-microblazeel-binfmt
+ usr/bin/qemu-static-sparc-binfmt
+ usr/bin/qemu-static-sparc32plus-binfmt
+ usr/bin/qemu-static-ppc
+ usr/bin/qemu-static-mipsn32el-binfmt
+ usr/bin/qemu-static-sh4eb-binfmt
+ usr/bin/qemu-static-ppc64abi32
+ usr/bin/qemu-static-ppc64-binfmt
+ usr/bin/qemu-static-armeb-binfmt
+ usr/bin/qemu-static-microblaze-binfmt
+ usr/bin/qemu-static-mips-binfmt
+ usr/bin/qemu-static-mipsel-binfmt
+ usr/bin/qemu-static-sh4-binfmt
+ usr/bin/qemu-static-s390x-binfmt
+ usr/bin/qemu-static-i386-binfmt
+ usr/bin/qemu-static-cris-binfmt
+ usr/bin/qemu-static-arm-binfmt
+ usr/bin/qemu-static-sparc64-binfmt
+ usr/bin/qemu-static-mipsn32-binfmt
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ 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
+
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+}
+
+src_configure() {
+ filter-flags -fpie -fstack-protector
+
+ local conf_opts user_targets
+
+ for target in ${IUSE_USER_TARGETS} ; do
+ use "qemu_user_targets_${target}" && \
+ user_targets="${user_targets} ${target}-linux-user"
+ done
+
+ conf_opts="--enable-linux-user --disable-strip"
+ conf_opts+=" --disable-darwin-user --disable-bsd-user"
+ conf_opts+=" --disable-system"
+ conf_opts+=" --disable-vnc-tls"
+ conf_opts+=" --disable-curses"
+ conf_opts+=" --disable-sdl"
+ conf_opts+=" --disable-vde"
+ conf_opts+=" --prefix=/usr --disable-bluez --disable-kvm"
+ conf_opts+=" --cc=$(tc-getCC) --host-cc=$(tc-getBUILD_CC)"
+ conf_opts+=" --disable-smartcard --disable-smartcard-nss"
+ conf_opts+=" --extra-ldflags=-Wl,-z,execheap"
+ conf_opts+=" --disable-strip --disable-werror"
+ conf_opts+=" --static"
+
+ ./configure ${conf_opts} --target-list="${user_targets}" || die "econf failed"
+}
+
+src_compile() {
+ emake || die "emake qemu failed"
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die "make install failed"
+
+ # fixup to avoid collisions with qemu
+ base_dir="${ED}/usr/bin"
+ for qemu_bin in "${base_dir}"/qemu-*; do
+ qemu_bin_name=$(basename "${qemu_bin}")
+ mv "${qemu_bin}" "${base_dir}"/"${qemu_bin_name/qemu-/qemu-static-}" || die
+ done
+
+ pax-mark r "${ED}"/usr/bin/qemu-static-*
+ rm -fr "${ED}/usr/share"
+ dohtml qemu-doc.html
+ dohtml qemu-tech.html
+ newinitd "${FILESDIR}/qemu-binfmt.initd" qemu-binfmt
+}