summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2005-04-28 13:26:38 +0000
committerLuca Barbato <lu_zero@gentoo.org>2005-04-28 13:26:38 +0000
commit2bd50cb863afdfa4a4b5f8b111328cdd4f0b7cc4 (patch)
tree74a653e4aab745a306715f2fc287487fe20a3393 /app-emulation/qemu
parentKQEMU license (diff)
downloadgentoo-2-2bd50cb863afdfa4a4b5f8b111328cdd4f0b7cc4.tar.gz
gentoo-2-2bd50cb863afdfa4a4b5f8b111328cdd4f0b7cc4.tar.bz2
gentoo-2-2bd50cb863afdfa4a4b5f8b111328cdd4f0b7cc4.zip
New version
(Portage version: 2.0.51.20-r5)
Diffstat (limited to 'app-emulation/qemu')
-rw-r--r--app-emulation/qemu/ChangeLog8
-rw-r--r--app-emulation/qemu/Manifest17
-rw-r--r--app-emulation/qemu/files/digest-qemu-0.7.02
-rw-r--r--app-emulation/qemu/files/kqemu-sysfs.patch77
-rw-r--r--app-emulation/qemu/qemu-0.7.0.ebuild132
5 files changed, 228 insertions, 8 deletions
diff --git a/app-emulation/qemu/ChangeLog b/app-emulation/qemu/ChangeLog
index ecfcf9f1b92c..97091e4c096e 100644
--- a/app-emulation/qemu/ChangeLog
+++ b/app-emulation/qemu/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/qemu
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.28 2005/01/01 14:16:15 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.29 2005/04/28 13:26:38 lu_zero Exp $
+
+*qemu-0.7.0 (28 Apr 2005)
+
+ 28 Apr 2005; Luca Barbato <lu_zero@gentoo.org> +files/kqemu-sysfs.patch,
+ +qemu-0.7.0.ebuild:
+ New version
18 Dec 2004; Simon Stelling <blubb@gentoo.org> qemu-0.6.1-r1.ebuild:
added ~amd64
diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
index 6e3b577324a6..69dee1935026 100644
--- a/app-emulation/qemu/Manifest
+++ b/app-emulation/qemu/Manifest
@@ -1,13 +1,16 @@
-MD5 8e7cee40dc44b6199cd2d967f7c8afd8 ChangeLog 3617
MD5 898131aae735c3477ff2f9c6882f1178 metadata.xml 223
-MD5 b035e8de3718e77cc27918198bf49fb6 qemu-0.6.1-r1.ebuild 2143
MD5 518988ab13f6b610696b8706d31d2fb9 qemu-0.6.0.ebuild 1895
+MD5 abf57df435080c4bb125d3603330cd98 qemu-0.7.0.ebuild 3776
+MD5 b035e8de3718e77cc27918198bf49fb6 qemu-0.6.1-r1.ebuild 2143
MD5 e65dab4abb0028ab15d60ecd60ca4ba9 qemu-0.6.1.ebuild 2071
+MD5 1ec129b4988d7e42c1c609b1e6c396d7 ChangeLog 3756
MD5 1f8638d68cffbd8b96df97dcb0868b88 files/digest-qemu-0.6.1-r1 63
-MD5 8490b50dc53ceca8208becb949c02ebb files/qemu-0.6.1-20041126.patch 27697
-MD5 9052eb692ddc0cbb296d7712b0cc6f44 files/digest-qemu-0.6.0 62
-MD5 f6094ee9cd2ee3a38404680796df2b75 files/qemu-0.6.0-typo.patch 528
-MD5 0b85ac42eaa41830ac9b4eccf4a118bd files/qemu-0.6.0-sigaction.patch 677
MD5 ede1278e0122a8439c156bd1380a37d5 files/qemu_gcc34.patch.gz 406
-MD5 ac8cdb7d17555b028d8bd7ace90bee3d files/qemu-0.6.0-configure.patch 270
+MD5 0b85ac42eaa41830ac9b4eccf4a118bd files/qemu-0.6.0-sigaction.patch 677
+MD5 9052eb692ddc0cbb296d7712b0cc6f44 files/digest-qemu-0.6.0 62
+MD5 8490b50dc53ceca8208becb949c02ebb files/qemu-0.6.1-20041126.patch 27697
+MD5 f2e48bae97dad4e6e6bccdb212124ae0 files/digest-qemu-0.7.0 127
MD5 1f8638d68cffbd8b96df97dcb0868b88 files/digest-qemu-0.6.1 63
+MD5 ac8cdb7d17555b028d8bd7ace90bee3d files/qemu-0.6.0-configure.patch 270
+MD5 87ec2e1fa832612fb834d7dd49cf7e5c files/kqemu-sysfs.patch 2094
+MD5 f6094ee9cd2ee3a38404680796df2b75 files/qemu-0.6.0-typo.patch 528
diff --git a/app-emulation/qemu/files/digest-qemu-0.7.0 b/app-emulation/qemu/files/digest-qemu-0.7.0
new file mode 100644
index 000000000000..279f446285f5
--- /dev/null
+++ b/app-emulation/qemu/files/digest-qemu-0.7.0
@@ -0,0 +1,2 @@
+MD5 234e9ace03b00259bb57dc5a9c633056 qemu-0.7.0.tar.gz 1211802
+MD5 c6bb3b40fb3d526d731eb0f1f9dee7ee kqemu-0.6.2-1.tar.gz 21002
diff --git a/app-emulation/qemu/files/kqemu-sysfs.patch b/app-emulation/qemu/files/kqemu-sysfs.patch
new file mode 100644
index 000000000000..05c49ca67898
--- /dev/null
+++ b/app-emulation/qemu/files/kqemu-sysfs.patch
@@ -0,0 +1,77 @@
+--- kqemu/kmod.c 2005-02-10 23:09:09.000000000 +0100
++++ kqemu/kmod-sysfs.c 2005-02-22 19:46:44.000000000 +0100
+@@ -15,7 +15,10 @@
+ #include <asm/processor.h>
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
+-
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++#include <linux/device.h>
++#endif
++#include <linux/devfs_fs_kernel.h>
+ #include "kqemu.h"
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19)
+@@ -34,6 +37,10 @@
+ int page_alloc_count;
+ #endif
+
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++static struct class_simple *kqemu_class;
++#endif
++
+ /* lock the page at virtual address 'user_addr' and return its
+ page index. Return -1 if error */
+ unsigned long CDECL kqemu_lock_user_page(unsigned long user_addr)
+@@ -296,17 +303,51 @@
+ max_locked_pages = 32768;
+
+ ret = register_chrdev(KQEMU_MAJOR, "kqemu", &kqemu_fops);
++
+ if (ret < 0) {
+ printk("kqemu: could not get major %d\n", KQEMU_MAJOR);
+ return ret;
+ }
++
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++ kqemu_class = class_simple_create(THIS_MODULE, "kqemu");
++
++ if (IS_ERR(kqemu_class)) {
++ unregister_chrdev(KQEMU_MAJOR, "kqemu");
++ ret = PTR_ERR(kqemu_class);
++ goto out_chrdev;
++ }
++
++ class_simple_device_add(kqemu_class, MKDEV(KQEMU_MAJOR, 0), NULL, "kqemu");
++#endif
++
++ ret = devfs_mk_cdev(MKDEV(KQEMU_MAJOR, 0),
++ S_IFCHR|S_IRUSR|S_IWUSR, "kqemu");
++ if (ret)
++ goto out_class;
++
+ printk("KQEMU installed, max_instances=%d max_locked_mem=%dkB.\n",
+ KQEMU_MAX_INSTANCES,
+ max_locked_pages * 4);
+ return 0;
++
++out_class:
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++ class_simple_device_remove(MKDEV(KQEMU_MAJOR,0));
++ class_simple_destroy(kqemu_class);
++#endif
++out_chrdev:
++ unregister_chrdev(KQEMU_MAJOR, "kqemu");
++
++ return ret;
+ }
+
+ void cleanup_module(void)
+ {
+ unregister_chrdev(KQEMU_MAJOR, "kqemu");
++ devfs_remove("kqemu");
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++ class_simple_device_remove(MKDEV(KQEMU_MAJOR, 0));
++ class_simple_destroy(kqemu_class);
++#endif
+ }
diff --git a/app-emulation/qemu/qemu-0.7.0.ebuild b/app-emulation/qemu/qemu-0.7.0.ebuild
new file mode 100644
index 000000000000..0c5cc179c204
--- /dev/null
+++ b/app-emulation/qemu/qemu-0.7.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-0.7.0.ebuild,v 1.1 2005/04/28 13:26:38 lu_zero Exp $
+
+inherit eutils flag-o-matic linux-mod
+
+DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator"
+HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"
+SRC_URI="http://fabrice.bellard.free.fr/qemu/${P}.tar.gz
+ kqemu? ( http://fabrice.bellard.free.fr/qemu/kqemu-0.6.2-1.tar.gz )"
+#qvm86? ( http://dev.gentoo.org/~lu_zero/distfiles/qvm86-20050409.tar.bz2 )"
+#kqemu? ( http://fabrice.bellard.free.fr/qemu/kqemu-${PV%.*}-1.tar.gz )
+
+LICENSE="GPL-2 LGPL-2.1 KQEMU"
+SLOT="0"
+KEYWORDS="~x86 ~ppc -alpha -sparc ~amd64"
+IUSE="softmmu sdl kqemu" #qvm86 debug nptl qemu-fast nptlonly"
+RESTRICT="nostrip"
+
+DEPEND="virtual/libc
+ sdl? ( media-libs/libsdl )
+ app-text/texi2html"
+RDEPEND="sdl? ( media-libs/libsdl )"
+
+
+MODULE_NAMES=""
+use kqemu && MODULE_NAMES=$MODULE_NAMES" kqemu(misc:${S}/kqemu)"
+#use qvm86 && MODULE_NAMES=$MODULE_NAMES" qvm86(misc:${S}/qvm86)"
+
+set_target_list() {
+ TARGET_LIST="arm-user armeb-user i386-user ppc-user sparc-user"
+ use softmmu &&
+ TARGET_LIST="${TARGET_LIST} i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu"
+ export TARGET_LIST
+}
+
+pkg_setup() {
+# ( use kqemu || use qvm86 ) && linux-mod_pkg_setup
+ ( use kqemu ) && linux-mod_pkg_setup
+}
+
+#RUNTIME_PATH="/emul/gnemul/"
+src_unpack() {
+ unpack ${A}
+
+ use kqemu &&
+
+ (
+ einfo "QEMU Accelerator enabled"
+ einfo "kqemu actually is a closed source software"
+ einfo "Please read carefully the KQEMU license"
+ einfo "and http://fabrice.bellard.free.fr/qemu/qemu-accel.html"
+ einfo "if you want it released under GPL"
+ mv ${S}/../kqemu ${S}
+ cd ${S}/kqemu
+ epatch ${FILESDIR}/kqemu-sysfs.patch
+ )
+# if use qvm86; then
+# mv ${WORKDIR}/qvm86 ${S}
+# cd ${S}
+# epatch qvm86/patch.qvm86
+# fi
+ cd ${S}
+ # Alter target makefiles to accept CFLAGS set via flag-o.
+ sed -i 's/^CFLAGS=-Wall -O2 -g/CFLAGS+=-Wall/' Makefile Makefile.target
+ # Ensure mprotect restrictions are relaxed for emulator binaries
+ [[ -x /sbin/paxctl ]] && \
+ sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
+ Makefile.target
+ # Prevent install of kernel module by qemu's makefile
+ sed -i 's/\(.\/install.sh\)/#\1/' Makefile
+}
+
+src_compile() {
+ #Let the application set it's cflags
+ unset CFLAGS
+
+ myconf=""
+ set_target_list
+# --interp-prefix=${RUNTIME_PATH}/qemu-%M
+ ./configure \
+ --prefix=/usr \
+ --target-list="${TARGET_LIST}" \
+ --enable-slirp \
+ $(use_enable kqemu) \
+ ${myconf} \
+ `use_enable sdl`\
+ || die "could not configure"
+ make || die "make failed"
+# $(use_enable qvm86) \
+}
+
+src_install() {
+ make install \
+ prefix=${D}/usr \
+ bindir=${D}/usr/bin \
+ datadir=${D}/usr/share/qemu \
+ docdir=${D}/usr/share/doc/${P} \
+ mandir=${D}/usr/share/man || die
+
+ chmod -x ${D}/usr/share/man/*/*
+
+ if use kqemu ; then
+#if use kqemu || use qvm86; then
+ linux-mod_src_install
+ fi
+ if use kqemu ; then
+ # Module doc
+ dodoc ${S}/kqemu/README
+ fi
+}
+
+pkg_postinst() {
+ einfo "You will need the Universal TUN/TAP driver compiled into"
+ einfo "kernel or as a module to use the virtual network device."
+ use softmmu || \
+ (
+ ewarn ""
+ ewarn "You have the softmmu useflag disabled."
+ ewarn "In order to have the full system emulator (qemu) you have"
+ ewarn "to emerge qemu again with the softmmu useflag enabled."
+ )
+ if use kqemu; then
+ einfo "kqemu actually is a closed source software"
+ einfo "Please read carefully the KQEMU license"
+ einfo "and http://fabrice.bellard.free.fr/qemu/qemu-accel.html"
+ einfo "if you want it released under GPL"
+ linux-mod_pkg_postinst
+ einfo "make sure you have the kernel module loaded before running"
+ einfo "qemu"
+ fi
+}