summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Redaelli <drizzt@gentoo.org>2006-09-24 12:26:28 +0000
committerTimothy Redaelli <drizzt@gentoo.org>2006-09-24 12:26:28 +0000
commit9976cfe1b5136d1f606103404696917781ae7105 (patch)
treeb3a6daaf4d211cf6ddb9765fefd8da6ce0d7034f /app-emulation
downloaddrizzt-9976cfe1b5136d1f606103404696917781ae7105.tar.gz
drizzt-9976cfe1b5136d1f606103404696917781ae7105.tar.bz2
drizzt-9976cfe1b5136d1f606103404696917781ae7105.zip
Initial import
svn path=/; revision=1
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/gxemul/ChangeLog14
-rw-r--r--app-emulation/gxemul/Manifest20
-rw-r--r--app-emulation/gxemul/files/digest-gxemul-0.4.23
-rw-r--r--app-emulation/gxemul/files/gxemul-0.3.1-mips64-crosscc-check.patch12
-rw-r--r--app-emulation/gxemul/gxemul-0.4.2.ebuild55
-rw-r--r--app-emulation/gxemul/metadata.xml10
-rw-r--r--app-emulation/qemu-softmmu/Manifest20
-rw-r--r--app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.06
-rw-r--r--app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.0.200603293
-rw-r--r--app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.16
-rw-r--r--app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.1-r16
-rw-r--r--app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.23
-rw-r--r--app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.2-r13
-rw-r--r--app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-hacks.patch126
-rw-r--r--app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-opts.patch41
-rw-r--r--app-emulation/qemu-softmmu/files/qemu-0.8.2-sparc-fp.patch18
-rw-r--r--app-emulation/qemu-softmmu/qemu-softmmu-0.8.2-r1.ebuild103
-rw-r--r--app-emulation/qemu-user/Manifest28
-rw-r--r--app-emulation/qemu-user/files/digest-qemu-user-0.8.03
-rw-r--r--app-emulation/qemu-user/files/digest-qemu-user-0.8.0.200603293
-rw-r--r--app-emulation/qemu-user/files/digest-qemu-user-0.8.13
-rw-r--r--app-emulation/qemu-user/files/digest-qemu-user-0.8.23
-rw-r--r--app-emulation/qemu-user/files/qemu-0.7.0-ppc-linker.patch297
-rw-r--r--app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch118
-rw-r--r--app-emulation/qemu-user/files/qemu-0.8.0-stwbrx.patch15
-rw-r--r--app-emulation/qemu-user/files/qemu-ppc-dirty-hack.patch12
-rw-r--r--app-emulation/qemu-user/files/qemu-user-0.7.0-errno.patch11
-rw-r--r--app-emulation/qemu-user/qemu-user-0.8.2.ebuild87
-rw-r--r--app-emulation/vmware-server/Manifest58
-rw-r--r--app-emulation/vmware-server/files/90vmware-server3
-rw-r--r--app-emulation/vmware-server/files/digest-vmware-server-1.0.0.283439
-rw-r--r--app-emulation/vmware-server/files/digest-vmware-server-1.0.1.299969
-rw-r--r--app-emulation/vmware-server/files/general/001_all_no-desktop-icon.patch31
-rw-r--r--app-emulation/vmware-server/files/general/002_all_allow-write-access-to-config.patch15
-rw-r--r--app-emulation/vmware-server/files/general/004_all_do-not-build-modules.patch17
-rw-r--r--app-emulation/vmware-server/files/general/005_all_do-not-overwrite-authd-file.patch44
-rw-r--r--app-emulation/vmware-server/files/general/006_all_xinetd-sendsig-if-possible.patch28
-rw-r--r--app-emulation/vmware-server/files/general/007_all_use-modprobe-over-insmod.patch12
-rw-r--r--app-emulation/vmware-server/files/general/008_all_dhcpd-conf-location.patch13
-rw-r--r--app-emulation/vmware-server/files/general/009_all_init.d-modules-warning.patch19
-rw-r--r--app-emulation/vmware-server/files/vmware-authd6
-rw-r--r--app-emulation/vmware-server/files/vmware-server.rc74
-rw-r--r--app-emulation/vmware-server/files/vmware-server.xml48
-rw-r--r--app-emulation/vmware-server/vmware-server-1.0.1.29996.ebuild106
44 files changed, 1521 insertions, 0 deletions
diff --git a/app-emulation/gxemul/ChangeLog b/app-emulation/gxemul/ChangeLog
new file mode 100644
index 0000000..2e7aaca
--- /dev/null
+++ b/app-emulation/gxemul/ChangeLog
@@ -0,0 +1,14 @@
+# ChangeLog for app-emulation/gxemul
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/gxemul/ChangeLog,v 1.2 2005/05/04 19:06:53 dholm Exp $
+
+ 04 May 2005; David Holm <dholm@gentoo.org> gxemul-0.3.1.ebuild:
+ Added to ~ppc.
+
+*gxemul-0.3.1 (11 Apr 2005)
+
+ 11 Apr 2005; Joshua Kinard <kumba@gentoo.org> +metadata.xml,
+ +files/gxemul-0.3.1-mips64-crosscc-check.patch, +gxemul-0.3.1.ebuild:
+ Package Move: formerly mips64emul; now gxemul. Bump to 0.3.1, and comment
+ ebuild a little more.
+
diff --git a/app-emulation/gxemul/Manifest b/app-emulation/gxemul/Manifest
new file mode 100644
index 0000000..f2b781b
--- /dev/null
+++ b/app-emulation/gxemul/Manifest
@@ -0,0 +1,20 @@
+AUX gxemul-0.3.1-mips64-crosscc-check.patch 652 RMD160 ba86654b854bf8992d6e5ab9abd69f824b5e9d2a SHA1 a96112a0a1631d3e4c3a580347ce96356b20c898 SHA256 bb2e7d0978050d9dfd2b2fb1ee2bed687482219bc3c151bfff7f16a1a0435d4f
+MD5 5ff0b1ae88e5227f27ed31943c08cabe files/gxemul-0.3.1-mips64-crosscc-check.patch 652
+RMD160 ba86654b854bf8992d6e5ab9abd69f824b5e9d2a files/gxemul-0.3.1-mips64-crosscc-check.patch 652
+SHA256 bb2e7d0978050d9dfd2b2fb1ee2bed687482219bc3c151bfff7f16a1a0435d4f files/gxemul-0.3.1-mips64-crosscc-check.patch 652
+DIST gxemul-0.4.2.tar.gz 1909826 RMD160 dcffd9a3d8de93e935a0f2802c1a0aa60c462693 SHA1 d912b4a38cf892d6f3e89c71195d6c52bb3718ca SHA256 8b4655ebb9e1bbd3f873a8f1c6767a3442340c7e20a996fe9e6609ea5f09446a
+EBUILD gxemul-0.4.2.ebuild 1453 RMD160 95cfda314e4fbe6230ef1c193b6d6d92d32c54a4 SHA1 91dbe40d88d79d865692c60991d0c3bbce9fc8f4 SHA256 8705186f068f4e446aba69277f35ce6d995ee85ebd814367014e64729b3d0bd1
+MD5 c3384339cabdd3d3edd75dcfcc9b8cdb gxemul-0.4.2.ebuild 1453
+RMD160 95cfda314e4fbe6230ef1c193b6d6d92d32c54a4 gxemul-0.4.2.ebuild 1453
+SHA256 8705186f068f4e446aba69277f35ce6d995ee85ebd814367014e64729b3d0bd1 gxemul-0.4.2.ebuild 1453
+MISC ChangeLog 561 RMD160 0b9214e75d57bf5925d359644326403e1dd373d0 SHA1 d9cab6ef38d53db582425f4ca49e46e6b0080a13 SHA256 bea2f9ca81c7085c3b4fa827d8db77f3aa4cc44bd172f5a1503e5358fb4c17f0
+MD5 b89fe8c1c968d25bc187b19e0ddebefa ChangeLog 561
+RMD160 0b9214e75d57bf5925d359644326403e1dd373d0 ChangeLog 561
+SHA256 bea2f9ca81c7085c3b4fa827d8db77f3aa4cc44bd172f5a1503e5358fb4c17f0 ChangeLog 561
+MISC metadata.xml 426 RMD160 15e50f0cd07424bbb6d6701d8de987305d2cfbab SHA1 d6a4af16e48698c0a47a7d4a14a3e85d2f689eb8 SHA256 7aeef5680d33c5d12b492dfaa869050782150daa9a3b4dfd61649fe0ac764cbe
+MD5 7cc3fb0d4e01b910cfefd56569262517 metadata.xml 426
+RMD160 15e50f0cd07424bbb6d6701d8de987305d2cfbab metadata.xml 426
+SHA256 7aeef5680d33c5d12b492dfaa869050782150daa9a3b4dfd61649fe0ac764cbe metadata.xml 426
+MD5 870696fd883f3576556af417ec166f4e files/digest-gxemul-0.4.2 241
+RMD160 c2d0eb81750d0b67483fa0467e1d728ab763917e files/digest-gxemul-0.4.2 241
+SHA256 3121843daf02c9660d48217228b06e2e33d3902ad368d508a83124aef558de46 files/digest-gxemul-0.4.2 241
diff --git a/app-emulation/gxemul/files/digest-gxemul-0.4.2 b/app-emulation/gxemul/files/digest-gxemul-0.4.2
new file mode 100644
index 0000000..3092a47
--- /dev/null
+++ b/app-emulation/gxemul/files/digest-gxemul-0.4.2
@@ -0,0 +1,3 @@
+MD5 036021e777b9c5a646ab7e03b53a708a gxemul-0.4.2.tar.gz 1909826
+RMD160 dcffd9a3d8de93e935a0f2802c1a0aa60c462693 gxemul-0.4.2.tar.gz 1909826
+SHA256 8b4655ebb9e1bbd3f873a8f1c6767a3442340c7e20a996fe9e6609ea5f09446a gxemul-0.4.2.tar.gz 1909826
diff --git a/app-emulation/gxemul/files/gxemul-0.3.1-mips64-crosscc-check.patch b/app-emulation/gxemul/files/gxemul-0.3.1-mips64-crosscc-check.patch
new file mode 100644
index 0000000..f5ba7f6
--- /dev/null
+++ b/app-emulation/gxemul/files/gxemul-0.3.1-mips64-crosscc-check.patch
@@ -0,0 +1,12 @@
+diff -Naurp gxemul-0.3.1.orig/configure gxemul-0.3.1/configure
+--- gxemul-0.3.1.orig/configure 2005-03-28 15:55:15.000000000 -0500
++++ gxemul-0.3.1/configure 2005-04-11 14:24:24.662918008 -0400
+@@ -1098,7 +1098,7 @@ if [ z$ENABLEMIPS = zYES ]; then
+ printf "Checking for a GNU cross-compiler for 64-bit MIPS... "
+ echo 'int f(int x) { return x; }' > _testprog.c
+
+- for MIPS_TRY in mips64-unknown-elf mips64-elf mips-unknown-elf64; do
++ for MIPS_TRY in mips64-unknown-elf mips64-elf mips-unknown-elf64 mips-unknown-linux-gnu mips-linux; do
+ printf '#!/bin/sh\n'$MIPS_TRY'-gcc _testprog.c -c\n' > _test.sh
+ chmod 755 _test.sh
+ rm -f _testprog.o
diff --git a/app-emulation/gxemul/gxemul-0.4.2.ebuild b/app-emulation/gxemul/gxemul-0.4.2.ebuild
new file mode 100644
index 0000000..625c07e
--- /dev/null
+++ b/app-emulation/gxemul/gxemul-0.4.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/gxemul/gxemul-0.3.1.ebuild,v 1.2 2005/05/04 19:06:53 dholm Exp $
+
+inherit eutils
+
+DESCRIPTION="A Machine Emulator, Mainly emulates MIPS, but supports other CPU types."
+HOMEPAGE="http://gavare.se/gxemul/"
+SRC_URI="http://gavare.se/gxemul/src/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~sparc ~x86 ~ppc"
+IUSE="X cacheemu delays mips16"
+
+RDEPEND="|| ( ( x11-libs/libX11
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libxkbfile
+ x11-libs/libXft
+ x11-libs/libXaw
+ unicode? ( x11-apps/luit ) )
+ virtual/x11 )"
+
+DEPEND="${RDEPEND}
+ || ( x11-proto/xproto virtual/x11 )"
+
+src_compile() {
+ cd ${S}
+ local myconf=""
+
+ # Patch to let gxemul's configure script pick
+ # up mips64 cross-compilers
+# epatch ${FILESDIR}/${P}-mips64-crosscc-check.patch
+
+ # Based on USE, enable or disable some options
+ use X || myconf="${myconf} --disable-x"
+ use cacheemu && myconf="${myconf} --enable-caches"
+ use delays && myconf="${myconf} --enable-delays"
+ use mips16 && myconf="${myconf} --enable-mips16"
+
+ echo -e ""
+ einfo "Configuring with: ${myconf}"
+ ./configure ${myconf} || die "configure failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin gxemul || die "gxemul not found in ${S}"
+ doman man/*.1
+ dodoc BUGS HISTORY LICENSE README RELEASE TODO
+ dohtml doc/*
+}
diff --git a/app-emulation/gxemul/metadata.xml b/app-emulation/gxemul/metadata.xml
new file mode 100644
index 0000000..aa5d83c
--- /dev/null
+++ b/app-emulation/gxemul/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>kumba@gentoo.org</email>
+ <name>Joshua Kinard</name>
+ </maintainer>
+ <herd>no-herd</herd>
+ <longdescription>Machine Emulator. Supports emulation across several architectures. Primarily for MIPS support, but other platform support coming soon.</longdescription>
+</pkgmetadata>
diff --git a/app-emulation/qemu-softmmu/Manifest b/app-emulation/qemu-softmmu/Manifest
new file mode 100644
index 0000000..6350688
--- /dev/null
+++ b/app-emulation/qemu-softmmu/Manifest
@@ -0,0 +1,20 @@
+AUX qemu-0.8.0-gcc4-hacks.patch 4634 RMD160 1d9d3f188c7c94e86794db2aae1336472852cadf SHA1 d193cc7b5793d80ab4540c7e24e6e75a246babb6 SHA256 dad86d110f86f6edc307d0073546ed583d3f4109784ba06afebbd1126dba0f38
+MD5 5c525594aaac2ffa5e676a2b196ffd82 files/qemu-0.8.0-gcc4-hacks.patch 4634
+RMD160 1d9d3f188c7c94e86794db2aae1336472852cadf files/qemu-0.8.0-gcc4-hacks.patch 4634
+SHA256 dad86d110f86f6edc307d0073546ed583d3f4109784ba06afebbd1126dba0f38 files/qemu-0.8.0-gcc4-hacks.patch 4634
+AUX qemu-0.8.0-gcc4-opts.patch 1661 RMD160 409b9670b8c910c5fc80cf52c5ec35dad6ae7eee SHA1 53365f8e018f11f599822b62d1271250364b0b4d SHA256 bc3f100113007809a247a79464913f9b37bed49e821c41c1defdf08d2fa080dc
+MD5 67e6ae7ea59a24ed2bbc63c6ccdcfee9 files/qemu-0.8.0-gcc4-opts.patch 1661
+RMD160 409b9670b8c910c5fc80cf52c5ec35dad6ae7eee files/qemu-0.8.0-gcc4-opts.patch 1661
+SHA256 bc3f100113007809a247a79464913f9b37bed49e821c41c1defdf08d2fa080dc files/qemu-0.8.0-gcc4-opts.patch 1661
+AUX qemu-0.8.2-sparc-fp.patch 591 RMD160 bbce6e754d32e8e5cb4c28e534b7a8ae27bee4b7 SHA1 785541312b7edacd279c81ce6df550e1a4f5839b SHA256 839166847b3b39fa481b49e27110aaf207067cc5acecaf55131d2ec31d92ad59
+MD5 b3e7fd1797acd3ca68ffa4a31750d518 files/qemu-0.8.2-sparc-fp.patch 591
+RMD160 bbce6e754d32e8e5cb4c28e534b7a8ae27bee4b7 files/qemu-0.8.2-sparc-fp.patch 591
+SHA256 839166847b3b39fa481b49e27110aaf207067cc5acecaf55131d2ec31d92ad59 files/qemu-0.8.2-sparc-fp.patch 591
+DIST qemu-0.8.2.tar.gz 1810909 RMD160 715c24997330352aa675cd7279731cec251f833a SHA1 d775239a545e7d0c5b677660a2122df590afde6d SHA256 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3
+EBUILD qemu-softmmu-0.8.2-r1.ebuild 2793 RMD160 748a21b87416b73514573753f6fa7eabe3be6f7e SHA1 c38de77bf312cf3b7f7aa4f488d40c1ca482b31a SHA256 7a1d126e9f3b37141c74bc5213e3d002f07e118d559c3cfe07afacc946ede996
+MD5 f3e65d6804af16ede4341d93af450549 qemu-softmmu-0.8.2-r1.ebuild 2793
+RMD160 748a21b87416b73514573753f6fa7eabe3be6f7e qemu-softmmu-0.8.2-r1.ebuild 2793
+SHA256 7a1d126e9f3b37141c74bc5213e3d002f07e118d559c3cfe07afacc946ede996 qemu-softmmu-0.8.2-r1.ebuild 2793
+MD5 e9b66fd821b0760086e3574d3a90398c files/digest-qemu-softmmu-0.8.2-r1 235
+RMD160 1690afc2131b50cf62fe141bf5b621687fb107e3 files/digest-qemu-softmmu-0.8.2-r1 235
+SHA256 f29c0addbe47b46f7c4ab7d2cb4965bac24abdaa456bc0815d5d07a407f7450b files/digest-qemu-softmmu-0.8.2-r1 235
diff --git a/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.0 b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.0
new file mode 100644
index 0000000..cb14d07
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.0
@@ -0,0 +1,6 @@
+MD5 02cfdecda90458d6393781496ec6b48b kqemu-0.7.2.tar.gz 79314
+RMD160 cdb154d51eb616d6ad9924da0175276a655edba7 kqemu-0.7.2.tar.gz 79314
+SHA256 4158b2c67603f5256a78d0065d715bde068a457aa58bbfef12dda20fe7f7ad8b kqemu-0.7.2.tar.gz 79314
+MD5 eb175b26583280706fe7e4d8910d320d qemu-0.8.0.tar.gz 1497965
+RMD160 3fc6da938f75364d0805ca0ecf8cb84a4b546dc7 qemu-0.8.0.tar.gz 1497965
+SHA256 de388539ce86971a2cbe8474fca8b6160898c95772e3e6e08a7794d48db32a61 qemu-0.8.0.tar.gz 1497965
diff --git a/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.0.20060329 b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.0.20060329
new file mode 100644
index 0000000..1fd8e2b
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.0.20060329
@@ -0,0 +1,3 @@
+MD5 0a0e5d61666f951917127ea4c41f3cad qemu-0.8.0.20060329.tar.bz2 1325034
+RMD160 a6ec15e1b08dd6e2dd88d953bfa31e3db1dc212e qemu-0.8.0.20060329.tar.bz2 1325034
+SHA256 4ccb27692ffaee119728442298da84198d6319de79a18d497d14604e140c3eb0 qemu-0.8.0.20060329.tar.bz2 1325034
diff --git a/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.1 b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.1
new file mode 100644
index 0000000..ecd1814
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.1
@@ -0,0 +1,6 @@
+MD5 02cfdecda90458d6393781496ec6b48b kqemu-0.7.2.tar.gz 79314
+RMD160 cdb154d51eb616d6ad9924da0175276a655edba7 kqemu-0.7.2.tar.gz 79314
+SHA256 4158b2c67603f5256a78d0065d715bde068a457aa58bbfef12dda20fe7f7ad8b kqemu-0.7.2.tar.gz 79314
+MD5 67d924324a5ab79d017bd97a1e767285 qemu-0.8.1.tar.gz 1623264
+RMD160 04d163d4792bbea39fc0b1e52af124cdb7e907dc qemu-0.8.1.tar.gz 1623264
+SHA256 a1f83666f5c05eaee9bfc608a3a5034ad95d0fd3c99937bb399bf9235a6aa0c9 qemu-0.8.1.tar.gz 1623264
diff --git a/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.1-r1 b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.1-r1
new file mode 100644
index 0000000..ecd1814
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.1-r1
@@ -0,0 +1,6 @@
+MD5 02cfdecda90458d6393781496ec6b48b kqemu-0.7.2.tar.gz 79314
+RMD160 cdb154d51eb616d6ad9924da0175276a655edba7 kqemu-0.7.2.tar.gz 79314
+SHA256 4158b2c67603f5256a78d0065d715bde068a457aa58bbfef12dda20fe7f7ad8b kqemu-0.7.2.tar.gz 79314
+MD5 67d924324a5ab79d017bd97a1e767285 qemu-0.8.1.tar.gz 1623264
+RMD160 04d163d4792bbea39fc0b1e52af124cdb7e907dc qemu-0.8.1.tar.gz 1623264
+SHA256 a1f83666f5c05eaee9bfc608a3a5034ad95d0fd3c99937bb399bf9235a6aa0c9 qemu-0.8.1.tar.gz 1623264
diff --git a/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.2 b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.2
new file mode 100644
index 0000000..767c6c8
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.2
@@ -0,0 +1,3 @@
+MD5 5b3a89eb2f256a8a6f3bb07f7b3f1b07 qemu-0.8.2.tar.gz 1810909
+RMD160 715c24997330352aa675cd7279731cec251f833a qemu-0.8.2.tar.gz 1810909
+SHA256 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3 qemu-0.8.2.tar.gz 1810909
diff --git a/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.2-r1 b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.2-r1
new file mode 100644
index 0000000..767c6c8
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/digest-qemu-softmmu-0.8.2-r1
@@ -0,0 +1,3 @@
+MD5 5b3a89eb2f256a8a6f3bb07f7b3f1b07 qemu-0.8.2.tar.gz 1810909
+RMD160 715c24997330352aa675cd7279731cec251f833a qemu-0.8.2.tar.gz 1810909
+SHA256 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3 qemu-0.8.2.tar.gz 1810909
diff --git a/app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-hacks.patch b/app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-hacks.patch
new file mode 100644
index 0000000..b5aa0fd
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-hacks.patch
@@ -0,0 +1,126 @@
+2005-10-28 Gwenole Beauchesne <gbeauchesne@mandriva.com>
+
+ * Various additional hacks for GCC4.
+
+Index: qemu-0.8.1/cpu-all.h
+===================================================================
+--- qemu-0.8.1.orig/cpu-all.h
++++ qemu-0.8.1/cpu-all.h
+@@ -339,7 +339,13 @@ static inline void stl_le_p(void *ptr, i
+
+ static inline void stq_le_p(void *ptr, uint64_t v)
+ {
++#if defined(__i386__) && __GNUC__ >= 4
++ const union { uint64_t v; uint32_t p[2]; } x = { .v = v };
++ ((uint32_t *)ptr)[0] = x.p[0];
++ ((uint32_t *)ptr)[1] = x.p[1];
++#else
+ *(uint64_t *)ptr = v;
++#endif
+ }
+
+ /* float access */
+Index: qemu-0.8.1/softmmu_header.h
+===================================================================
+--- qemu-0.8.1.orig/softmmu_header.h
++++ qemu-0.8.1/softmmu_header.h
+@@ -108,7 +108,7 @@ DATA_TYPE REGPARM(1) glue(glue(__ld, SUF
+ void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, DATA_TYPE v, int is_user);
+
+ #if (DATA_SIZE <= 4) && (TARGET_LONG_BITS == 32) && defined(__i386__) && \
+- (ACCESS_TYPE <= 1) && defined(ASM_SOFTMMU)
++ (ACCESS_TYPE <= 1) && defined(ASM_SOFTMMU) && (__GNUC__ < 4)
+
+ #define CPU_TLB_ENTRY_BITS 4
+
+@@ -150,7 +150,7 @@ static inline RES_TYPE glue(glue(ld, USU
+ "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_read)),
+ "i" (CPU_MEM_INDEX),
+ "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX))
+- : "%eax", "%ecx", "%edx", "memory", "cc");
++ : "%eax", "%edx", "memory", "cc");
+ return res;
+ }
+
+@@ -197,13 +197,14 @@ static inline int glue(glue(lds, SUFFIX)
+ "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_read)),
+ "i" (CPU_MEM_INDEX),
+ "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX))
+- : "%eax", "%ecx", "%edx", "memory", "cc");
++ : "%eax", "%edx", "memory", "cc");
+ return res;
+ }
+ #endif
+
+-static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE v)
++static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE val)
+ {
++ RES_TYPE v = val;
+ asm volatile ("movl %0, %%edx\n"
+ "movl %0, %%eax\n"
+ "shrl %3, %%edx\n"
+@@ -240,16 +241,14 @@ static inline void glue(glue(st, SUFFIX)
+ "2:\n"
+ :
+ : "r" (ptr),
+-/* NOTE: 'q' would be needed as constraint, but we could not use it
+- with T1 ! */
+- "r" (v),
++ "q" (v),
+ "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS),
+ "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
+ "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)),
+ "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_write)),
+ "i" (CPU_MEM_INDEX),
+ "m" (*(uint8_t *)&glue(glue(__st, SUFFIX), MMUSUFFIX))
+- : "%eax", "%ecx", "%edx", "memory", "cc");
++ : "%eax", "%edx", "memory", "cc");
+ }
+
+ #else
+Index: qemu-0.8.1/target-i386/helper.c
+===================================================================
+--- qemu-0.8.1.orig/target-i386/helper.c
++++ qemu-0.8.1/target-i386/helper.c
+@@ -3145,8 +3145,15 @@ void helper_fxrstor(target_ulong ptr, in
+ nb_xmm_regs = 8 << data64;
+ addr = ptr + 0xa0;
+ for(i = 0; i < nb_xmm_regs; i++) {
++#if defined(__i386__) && __GNUC__ >= 4
++ env->xmm_regs[i].XMM_L(0) = ldl(addr);
++ env->xmm_regs[i].XMM_L(1) = ldl(addr + 4);
++ env->xmm_regs[i].XMM_L(2) = ldl(addr + 8);
++ env->xmm_regs[i].XMM_L(3) = ldl(addr + 12);
++#else
+ env->xmm_regs[i].XMM_Q(0) = ldq(addr);
+ env->xmm_regs[i].XMM_Q(1) = ldq(addr + 8);
++#endif
+ addr += 16;
+ }
+ }
+Index: qemu-0.8.1/target-i386/ops_sse.h
+===================================================================
+--- qemu-0.8.1.orig/target-i386/ops_sse.h
++++ qemu-0.8.1/target-i386/ops_sse.h
+@@ -34,6 +34,12 @@
+ #define Q(n) XMM_Q(n)
+ #define SUFFIX _xmm
+ #endif
++#if defined(__i386__) && __GNUC__ >= 4
++#define RegCopy(d, s) __builtin_memcpy(&(d), &(s), sizeof(d))
++#endif
++#ifndef RegCopy
++#define RegCopy(d, s) d = s
++#endif
+
+ void OPPROTO glue(op_psrlw, SUFFIX)(void)
+ {
+@@ -570,7 +576,7 @@ void OPPROTO glue(op_pshufw, SUFFIX) (vo
+ r.W(1) = s->W((order >> 2) & 3);
+ r.W(2) = s->W((order >> 4) & 3);
+ r.W(3) = s->W((order >> 6) & 3);
+- *d = r;
++ RegCopy(*d, r);
+ }
+ #else
+ void OPPROTO op_shufps(void)
diff --git a/app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-opts.patch b/app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-opts.patch
new file mode 100644
index 0000000..4819dfb
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/qemu-0.8.0-gcc4-opts.patch
@@ -0,0 +1,41 @@
+2005-11-11 Gwenole Beauchesne <gbeauchesne@mandriva.com>
+
+ * Globaaly save %ebx, %esi, %edi on entry to generated
+ function. This avoids some register spills in synthetic opcodes.
+ NOTE: this also easily fixes gcc4 compiled qemu-system-x86_64 on x86.
+
+Index: qemu-0.8.1/Makefile.target
+===================================================================
+--- qemu-0.8.1.orig/Makefile.target
++++ qemu-0.8.1/Makefile.target
+@@ -68,6 +68,10 @@ OP_CFLAGS+= -falign-functions=0 -fno-gcs
+ else
+ OP_CFLAGS+= -malign-functions=0
+ endif
++ifeq ($(TARGET_ARCH), x86_64)
++# XXX globally save %ebx, %esi, %edi on entry to generated function
++OP_CFLAGS+= -fcall-used-ebx -fcall-used-esi -fcall-used-edi
++endif
+
+ ifdef TARGET_GPROF
+ USE_I386_LD=y
+Index: qemu-0.8.1/cpu-exec.c
+===================================================================
+--- qemu-0.8.1.orig/cpu-exec.c
++++ qemu-0.8.1/cpu-exec.c
+@@ -677,6 +677,15 @@ int cpu_exec(CPUState *env1)
+ : /* no outputs */
+ : "r" (gen_func)
+ : "r1", "r2", "r3", "r8", "r9", "r10", "r12", "r14");
++#elif defined(TARGET_X86_64) && defined(__i386__)
++ asm volatile ("push %%ebx\n"
++ "push %%esi\n"
++ "push %%edi\n"
++ "call *%0\n"
++ "pop %%edi\n"
++ "pop %%esi\n"
++ "pop %%ebx\n"
++ : : "r" (gen_func) : "ebx", "esi", "edi");
+ #elif defined(TARGET_I386) && defined(USE_CODE_COPY)
+ {
+ if (!(tb->cflags & CF_CODE_COPY)) {
diff --git a/app-emulation/qemu-softmmu/files/qemu-0.8.2-sparc-fp.patch b/app-emulation/qemu-softmmu/files/qemu-0.8.2-sparc-fp.patch
new file mode 100644
index 0000000..f190f66
--- /dev/null
+++ b/app-emulation/qemu-softmmu/files/qemu-0.8.2-sparc-fp.patch
@@ -0,0 +1,18 @@
+diff -urN qemu-0.8.2.old/target-sparc/op_helper.c qemu-0.8.2/target-sparc/op_helper.c
+--- qemu-0.8.2.old/target-sparc/op_helper.c 2006-07-22 19:23:34.000000000 +0200
++++ qemu-0.8.2/target-sparc/op_helper.c 2006-08-01 09:46:34.000000000 +0200
+@@ -12,12 +12,12 @@
+ #ifdef USE_INT_TO_FLOAT_HELPERS
+ void do_fitos(void)
+ {
+- FT0 = int32_to_float32(*((int32_t *)&FT1));
++ FT0 = int32_to_float32(*((int32_t *)&FT1), &env->fp_status);
+ }
+
+ void do_fitod(void)
+ {
+- DT0 = int32_to_float64(*((int32_t *)&FT1));
++ DT0 = int32_to_float64(*((int32_t *)&FT1), &env->fp_status);
+ }
+ #endif
+
diff --git a/app-emulation/qemu-softmmu/qemu-softmmu-0.8.2-r1.ebuild b/app-emulation/qemu-softmmu/qemu-softmmu-0.8.2-r1.ebuild
new file mode 100644
index 0000000..31a58f7
--- /dev/null
+++ b/app-emulation/qemu-softmmu/qemu-softmmu-0.8.2-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/qemu-softmmu-0.8.2-r1.ebuild,v 1.2 2006/08/17 08:09:42 lu_zero Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator"
+HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"
+SRC_URI="${HOMEPAGE}${P/-softmmu/}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 KQEMU"
+SLOT="0"
+KEYWORDS="-alpha ~amd64 ~ppc -sparc ~x86"
+IUSE="sdl kqemu alsa" #qvm86 debug nptl qemu-fast nptlonly"
+RESTRICT="nostrip test"
+
+DEPEND="virtual/libc
+ sdl? ( media-libs/libsdl )
+ alsa? ( media-libs/alsa-lib )
+ !<=app-emulation/qemu-0.7.0
+ kqemu? ( >=app-emulation/kqemu-1.3.0_pre7 )
+ app-text/texi2html"
+RDEPEND="sdl? ( media-libs/libsdl )"
+
+S="${WORKDIR}/${P/-softmmu/}"
+
+set_target_list() {
+ TARGET_LIST="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu arm-softmmu mips-softmmu"
+ export TARGET_LIST
+}
+
+#pkg_setup() {
+# if [ "$(gcc-major-version)" == "4" ]; then
+# eerror "qemu requires gcc-3 in order to build and work correctly"
+# eerror "please compile it with gcc-3"
+# die "gcc 4 cannot build qemu"
+# fi
+#}
+
+#RUNTIME_PATH="/emul/gnemul/"
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch "${FILESDIR}/qemu-${PV}-sparc-fp.patch"
+ epatch "${FILESDIR}"/qemu-0.8.0-gcc4-hacks.patch
+ epatch "${FILESDIR}"/qemu-0.8.0-gcc4-opts.patch
+
+ # Alter target makefiles to accept CFLAGS set via flag-o.
+ sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
+ Makefile Makefile.target tests/Makefile
+ # 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 its cflags
+ unset CFLAGS
+
+ # Switch off hardened tech
+ filter-flags -fpie -fstack-protector
+
+ set_target_list
+
+ myconf="--disable-gcc-check"
+ if ! use sdl ; then
+ myconf="$myconf --disable-gfx-check"
+ fi
+ ./configure \
+ --prefix=/usr \
+ --target-list="${TARGET_LIST}" \
+ --enable-slirp --enable-adlib \
+ --cc=$(tc-getCC) \
+ --host-cc=$(tc-getCC) \
+ --kernel-path=${KV_DIR} \
+ $(use_enable sdl)\
+ $(use_enable kqemu) \
+ $(use_enable alsa) \
+ ${myconf} \
+ || die "could not configure"
+
+ emake || die "make failed"
+}
+
+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/*/*
+}
+
+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."
+}
diff --git a/app-emulation/qemu-user/Manifest b/app-emulation/qemu-user/Manifest
new file mode 100644
index 0000000..0ea230e
--- /dev/null
+++ b/app-emulation/qemu-user/Manifest
@@ -0,0 +1,28 @@
+AUX qemu-0.7.0-ppc-linker.patch 11509 RMD160 d92e368e6adc2e6acdb97d92221781337d5322f7 SHA1 897be37b49b7908ea64972cd20ada0bb4def70cc SHA256 26d3832f1ff70d9d29f06cf8c6e1c1ac4ad353854c9b3b510875d2330ab6d2f9
+MD5 e9cd7872886a74aaf6b2fd5eb3659ebb files/qemu-0.7.0-ppc-linker.patch 11509
+RMD160 d92e368e6adc2e6acdb97d92221781337d5322f7 files/qemu-0.7.0-ppc-linker.patch 11509
+SHA256 26d3832f1ff70d9d29f06cf8c6e1c1ac4ad353854c9b3b510875d2330ab6d2f9 files/qemu-0.7.0-ppc-linker.patch 11509
+AUX qemu-0.8.0-gcc4-hacks.patch 4451 RMD160 9195413c569dc51cc6ea21b733562c2d34026ed8 SHA1 fec0792b21cd1a529efc9d108bfd683c26ee7547 SHA256 ab6e2c142400b8b66990e9f0a3b44f0df7170460c3824775b2ecc27f06773f06
+MD5 cb2b0532b6eab6f80c14b33cfba70662 files/qemu-0.8.0-gcc4-hacks.patch 4451
+RMD160 9195413c569dc51cc6ea21b733562c2d34026ed8 files/qemu-0.8.0-gcc4-hacks.patch 4451
+SHA256 ab6e2c142400b8b66990e9f0a3b44f0df7170460c3824775b2ecc27f06773f06 files/qemu-0.8.0-gcc4-hacks.patch 4451
+AUX qemu-0.8.0-stwbrx.patch 657 RMD160 e836fe37fdcb5c4021467900b0b588958ee29e14 SHA1 1988ac4afb9ef57aae53b050ec697b229c81fe99 SHA256 863648f94316f7ce1a49f31760b1e1083dce278e3099d25ac1b156a3e40d5856
+MD5 3413fbd9b74c40431378d1d89ce2fd5c files/qemu-0.8.0-stwbrx.patch 657
+RMD160 e836fe37fdcb5c4021467900b0b588958ee29e14 files/qemu-0.8.0-stwbrx.patch 657
+SHA256 863648f94316f7ce1a49f31760b1e1083dce278e3099d25ac1b156a3e40d5856 files/qemu-0.8.0-stwbrx.patch 657
+AUX qemu-ppc-dirty-hack.patch 422 RMD160 b108c7197a51ac9595246de846efcae8174ceb36 SHA1 b0dc9dab7e9e4c2b2735646222ae6a6c7ae4f85b SHA256 0242ac42ae38189ab6469d226c9e9467f8be55d86cf047ba5a713f92dd027edc
+MD5 297287b50341a53d302b58ab9ee73a5f files/qemu-ppc-dirty-hack.patch 422
+RMD160 b108c7197a51ac9595246de846efcae8174ceb36 files/qemu-ppc-dirty-hack.patch 422
+SHA256 0242ac42ae38189ab6469d226c9e9467f8be55d86cf047ba5a713f92dd027edc files/qemu-ppc-dirty-hack.patch 422
+AUX qemu-user-0.7.0-errno.patch 487 RMD160 0ba3efb79379c96652d0a08f33adef13695c75b7 SHA1 37317be3df18aa4843bb027d2d1e5b3ef1cf27cd SHA256 013031cd5c27de4dd4ab39f10a8be751813a313e006339a35b9722bb0939f193
+MD5 3202f7445799cce82ccaac9749e1443d files/qemu-user-0.7.0-errno.patch 487
+RMD160 0ba3efb79379c96652d0a08f33adef13695c75b7 files/qemu-user-0.7.0-errno.patch 487
+SHA256 013031cd5c27de4dd4ab39f10a8be751813a313e006339a35b9722bb0939f193 files/qemu-user-0.7.0-errno.patch 487
+DIST qemu-0.8.2.tar.gz 1810909 RMD160 715c24997330352aa675cd7279731cec251f833a SHA1 d775239a545e7d0c5b677660a2122df590afde6d SHA256 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3
+EBUILD qemu-user-0.8.2.ebuild 2271 RMD160 f0338c675a631fc8ebefe2bdac36a04e687166a8 SHA1 aa1bde6e5b485fcee18630378228c4bf5714d380 SHA256 06d111f8a978d8a92e82839fa65086addfa140204dd588c9b4fb5153f0e5c575
+MD5 b04795228790182c87f52853c911e1ed qemu-user-0.8.2.ebuild 2271
+RMD160 f0338c675a631fc8ebefe2bdac36a04e687166a8 qemu-user-0.8.2.ebuild 2271
+SHA256 06d111f8a978d8a92e82839fa65086addfa140204dd588c9b4fb5153f0e5c575 qemu-user-0.8.2.ebuild 2271
+MD5 e9b66fd821b0760086e3574d3a90398c files/digest-qemu-user-0.8.2 235
+RMD160 1690afc2131b50cf62fe141bf5b621687fb107e3 files/digest-qemu-user-0.8.2 235
+SHA256 f29c0addbe47b46f7c4ab7d2cb4965bac24abdaa456bc0815d5d07a407f7450b files/digest-qemu-user-0.8.2 235
diff --git a/app-emulation/qemu-user/files/digest-qemu-user-0.8.0 b/app-emulation/qemu-user/files/digest-qemu-user-0.8.0
new file mode 100644
index 0000000..5f8bde2
--- /dev/null
+++ b/app-emulation/qemu-user/files/digest-qemu-user-0.8.0
@@ -0,0 +1,3 @@
+MD5 eb175b26583280706fe7e4d8910d320d qemu-0.8.0.tar.gz 1497965
+RMD160 3fc6da938f75364d0805ca0ecf8cb84a4b546dc7 qemu-0.8.0.tar.gz 1497965
+SHA256 de388539ce86971a2cbe8474fca8b6160898c95772e3e6e08a7794d48db32a61 qemu-0.8.0.tar.gz 1497965
diff --git a/app-emulation/qemu-user/files/digest-qemu-user-0.8.0.20060329 b/app-emulation/qemu-user/files/digest-qemu-user-0.8.0.20060329
new file mode 100644
index 0000000..1fd8e2b
--- /dev/null
+++ b/app-emulation/qemu-user/files/digest-qemu-user-0.8.0.20060329
@@ -0,0 +1,3 @@
+MD5 0a0e5d61666f951917127ea4c41f3cad qemu-0.8.0.20060329.tar.bz2 1325034
+RMD160 a6ec15e1b08dd6e2dd88d953bfa31e3db1dc212e qemu-0.8.0.20060329.tar.bz2 1325034
+SHA256 4ccb27692ffaee119728442298da84198d6319de79a18d497d14604e140c3eb0 qemu-0.8.0.20060329.tar.bz2 1325034
diff --git a/app-emulation/qemu-user/files/digest-qemu-user-0.8.1 b/app-emulation/qemu-user/files/digest-qemu-user-0.8.1
new file mode 100644
index 0000000..27ca8ef
--- /dev/null
+++ b/app-emulation/qemu-user/files/digest-qemu-user-0.8.1
@@ -0,0 +1,3 @@
+MD5 67d924324a5ab79d017bd97a1e767285 qemu-0.8.1.tar.gz 1623264
+RMD160 04d163d4792bbea39fc0b1e52af124cdb7e907dc qemu-0.8.1.tar.gz 1623264
+SHA256 a1f83666f5c05eaee9bfc608a3a5034ad95d0fd3c99937bb399bf9235a6aa0c9 qemu-0.8.1.tar.gz 1623264
diff --git a/app-emulation/qemu-user/files/digest-qemu-user-0.8.2 b/app-emulation/qemu-user/files/digest-qemu-user-0.8.2
new file mode 100644
index 0000000..767c6c8
--- /dev/null
+++ b/app-emulation/qemu-user/files/digest-qemu-user-0.8.2
@@ -0,0 +1,3 @@
+MD5 5b3a89eb2f256a8a6f3bb07f7b3f1b07 qemu-0.8.2.tar.gz 1810909
+RMD160 715c24997330352aa675cd7279731cec251f833a qemu-0.8.2.tar.gz 1810909
+SHA256 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3 qemu-0.8.2.tar.gz 1810909
diff --git a/app-emulation/qemu-user/files/qemu-0.7.0-ppc-linker.patch b/app-emulation/qemu-user/files/qemu-0.7.0-ppc-linker.patch
new file mode 100644
index 0000000..09ae1d8
--- /dev/null
+++ b/app-emulation/qemu-user/files/qemu-0.7.0-ppc-linker.patch
@@ -0,0 +1,297 @@
+#DPATCHLEVEL=1
+diff -Naur qemu.orig/ppc.ld qemu/ppc.ld
+--- qemu.orig/ppc.ld 2005-09-04 20:11:31.000000000 +0300
++++ qemu/ppc.ld 2005-11-21 01:57:35.000000000 +0200
+@@ -1,116 +1,195 @@
+-/* ld script to make i386 Linux kernel
+- * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
+- */
+-OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
+-OUTPUT_ARCH(powerpc)
+-SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/alpha-unknown-linux-gnu/lib);
++/* Default linker script, for normal executables */
++OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
++ "elf32-powerpc")
++OUTPUT_ARCH(powerpc:common)
+ ENTRY(_start)
++SEARCH_DIR("/usr/powerpc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
++/* Do we need any of these for elf?
++ __DYNAMIC = 0; */
+ SECTIONS
+ {
+ /* Read-only sections, merged into text segment: */
+- . = 0x60000000 + SIZEOF_HEADERS;
+- .interp : { *(.interp) }
+- .hash : { *(.hash) }
+- .dynsym : { *(.dynsym) }
+- .dynstr : { *(.dynstr) }
+- .gnu.version : { *(.gnu.version) }
+- .gnu.version_d : { *(.gnu.version_d) }
+- .gnu.version_r : { *(.gnu.version_r) }
+- .rel.text :
+- { *(.rel.text) *(.rel.gnu.linkonce.t*) }
+- .rela.text :
+- { *(.rela.text) *(.rela.gnu.linkonce.t*) }
+- .rel.data :
+- { *(.rel.data) *(.rel.gnu.linkonce.d*) }
+- .rela.data :
+- { *(.rela.data) *(.rela.gnu.linkonce.d*) }
+- .rel.rodata :
+- { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
+- .rela.rodata :
+- { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
+- .rel.got : { *(.rel.got) }
+- .rela.got : { *(.rela.got) }
+- .rel.ctors : { *(.rel.ctors) }
+- .rela.ctors : { *(.rela.ctors) }
+- .rel.dtors : { *(.rel.dtors) }
+- .rela.dtors : { *(.rela.dtors) }
+- .rel.init : { *(.rel.init) }
+- .rela.init : { *(.rela.init) }
+- .rel.fini : { *(.rel.fini) }
+- .rela.fini : { *(.rela.fini) }
+- .rel.bss : { *(.rel.bss) }
+- .rela.bss : { *(.rela.bss) }
+- .rel.plt : { *(.rel.plt) }
+- .rela.plt : { *(.rela.plt) }
+- .init : { *(.init) } =0x47ff041f
+- .text :
++ PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS;
++ .interp : { *(.interp) }
++ .hash : { *(.hash) }
++ .dynsym : { *(.dynsym) }
++ .dynstr : { *(.dynstr) }
++ .gnu.version : { *(.gnu.version) }
++ .gnu.version_d : { *(.gnu.version_d) }
++ .gnu.version_r : { *(.gnu.version_r) }
++ .rel.init : { *(.rel.init) }
++ .rela.init : { *(.rela.init) }
++ .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
++ .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
++ .rel.fini : { *(.rel.fini) }
++ .rela.fini : { *(.rela.fini) }
++ .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
++ .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
++ .rel.data.rel.ro : { *(.rel.data.rel.ro*) }
++ .rela.data.rel.ro : { *(.rel.data.rel.ro*) }
++ .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
++ .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
++ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
++ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
++ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
++ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
++ .rel.ctors : { *(.rel.ctors) }
++ .rela.ctors : { *(.rela.ctors) }
++ .rel.dtors : { *(.rel.dtors) }
++ .rela.dtors : { *(.rela.dtors) }
++ .rel.got : { *(.rel.got) }
++ .rela.got : { *(.rela.got) }
++ .rela.got1 : { *(.rela.got1) }
++ .rela.got2 : { *(.rela.got2) }
++ .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
++ .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
++ .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
++ .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
++ .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
++ .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
++ .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
++ .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
++ .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
++ .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
++ .rel.plt : { *(.rel.plt) }
++ .rela.plt : { *(.rela.plt) }
++ .init :
+ {
+- *(.text)
++ KEEP (*(.init))
++ } =0
++ .text :
++ {
++ *(.text .stub .text.* .gnu.linkonce.t.*)
++ KEEP (*(.text.*personality*))
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+- *(.gnu.linkonce.t*)
+- } =0x47ff041f
+- _etext = .;
++ } =0
++ .fini :
++ {
++ KEEP (*(.fini))
++ } =0
++ PROVIDE (__etext = .);
++ PROVIDE (_etext = .);
+ PROVIDE (etext = .);
+- .fini : { *(.fini) } =0x47ff041f
++ .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
++ .rodata1 : { *(.rodata1) }
++ .sdata2 :
++ {
++ PROVIDE (_SDA2_BASE_ = 32768);
++ *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
++ }
++ .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
++ .eh_frame_hdr : { *(.eh_frame_hdr) }
++ .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
++ .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
++ /* Adjust the address for the data segment. We want to adjust up to
++ the same address within the page on the next page up. */
++ . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x1000);
++ /* Exception handling */
++ .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
++ .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
++ /* Thread Local Storage sections */
++ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
++ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
++ /* Ensure the __preinit_array_start label is properly aligned. We
++ could instead move the label definition inside the section, but
++ the linker would then create the section even if it turns out to
++ be empty, which isn't pretty. */
+ . = ALIGN(32 / 8);
+ PROVIDE (__preinit_array_start = .);
+- .preinit_array : { *(.preinit_array) }
++ .preinit_array : { KEEP (*(.preinit_array)) }
+ PROVIDE (__preinit_array_end = .);
+ PROVIDE (__init_array_start = .);
+- .init_array : { *(.init_array) }
++ .init_array : { KEEP (*(.init_array)) }
+ PROVIDE (__init_array_end = .);
+ PROVIDE (__fini_array_start = .);
+- .fini_array : { *(.fini_array) }
++ .fini_array : { KEEP (*(.fini_array)) }
+ PROVIDE (__fini_array_end = .);
+- .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
+- .rodata1 : { *(.rodata1) }
+- .reginfo : { *(.reginfo) }
+- /* Adjust the address for the data segment. We want to adjust up to
+- the same address within the page on the next page up. */
+- . = ALIGN(0x100000) + (. & (0x100000 - 1));
+- .data :
++ .ctors :
+ {
+- *(.data)
+- *(.gnu.linkonce.d*)
+- CONSTRUCTORS
++ /* gcc uses crtbegin.o to find the start of
++ the constructors, so we make sure it is
++ first. Because this is a wildcard, it
++ doesn't matter if the user does not
++ actually link against crtbegin.o; the
++ linker won't look for a file to match a
++ wildcard. The wildcard also means that it
++ doesn't matter which directory crtbegin.o
++ is in. */
++ KEEP (*crtbegin*.o(.ctors))
++ /* We don't want to include the .ctor section from
++ from the crtend.o file until after the sorted ctors.
++ The .ctor section from the crtend file contains the
++ end of ctors marker and it must be last */
++ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
++ KEEP (*(SORT(.ctors.*)))
++ KEEP (*(.ctors))
+ }
+- .data1 : { *(.data1) }
+- .ctors :
++ .dtors :
+ {
+- *(.ctors)
++ KEEP (*crtbegin*.o(.dtors))
++ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
++ KEEP (*(SORT(.dtors.*)))
++ KEEP (*(.dtors))
+ }
+- .dtors :
++ .jcr : { KEEP (*(.jcr)) }
++ .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
++ .got1 : { *(.got1) }
++ .got2 : { *(.got2) }
++ .dynamic : { *(.dynamic) }
++ . = DATA_SEGMENT_RELRO_END (0, .);
++ .data :
+ {
+- *(.dtors)
++ *(.data .data.* .gnu.linkonce.d.*)
++ KEEP (*(.gnu.linkonce.d.*personality*))
++ SORT(CONSTRUCTORS)
+ }
+- .plt : { *(.plt) }
+- .got : { *(.got.plt) *(.got) }
+- .dynamic : { *(.dynamic) }
++ .data1 : { *(.data1) }
++ .got : { *(.got.plt) *(.got) }
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. */
+- .sdata : { *(.sdata) }
+- _edata = .;
++ .sdata :
++ {
++ PROVIDE (_SDA_BASE_ = 32768);
++ *(.sdata .sdata.* .gnu.linkonce.s.*)
++ }
++ _edata = .;
+ PROVIDE (edata = .);
+ __bss_start = .;
+- .sbss : { *(.sbss) *(.scommon) }
+- .bss :
++ .sbss :
++ {
++ PROVIDE (__sbss_start = .);
++ PROVIDE (___sbss_start = .);
++ *(.dynsbss)
++ *(.sbss .sbss.* .gnu.linkonce.sb.*)
++ *(.scommon)
++ PROVIDE (__sbss_end = .);
++ PROVIDE (___sbss_end = .);
++ }
++ .plt : { *(.plt) }
++ .bss :
+ {
+ *(.dynbss)
+- *(.bss)
++ *(.bss .bss.* .gnu.linkonce.b.*)
+ *(COMMON)
++ /* Align here to ensure that the .bss section occupies space up to
++ _end. Align after .bss to ensure correct alignment even if the
++ .bss section disappears because there are no input sections. */
++ . = ALIGN(32 / 8);
+ }
+- _end = . ;
++ . = ALIGN(32 / 8);
++ _end = .;
+ PROVIDE (end = .);
++ . = DATA_SEGMENT_END (.);
+ /* Stabs debugging sections. */
+- .stab 0 : { *(.stab) }
+- .stabstr 0 : { *(.stabstr) }
+- .stab.excl 0 : { *(.stab.excl) }
+- .stab.exclstr 0 : { *(.stab.exclstr) }
+- .stab.index 0 : { *(.stab.index) }
++ .stab 0 : { *(.stab) }
++ .stabstr 0 : { *(.stabstr) }
++ .stab.excl 0 : { *(.stab.excl) }
++ .stab.exclstr 0 : { *(.stab.exclstr) }
++ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+- .comment 0 : { *(.comment) }
++ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+@@ -124,7 +203,7 @@
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+- .debug_info 0 : { *(.debug_info) }
++ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+@@ -136,5 +215,6 @@
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+- /* These must appear regardless of . */
++ /DISCARD/ : { *(.fixup) }
++ /DISCARD/ : { *(.note.GNU-stack) }
+ }
diff --git a/app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch b/app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch
new file mode 100644
index 0000000..f7cbdcf
--- /dev/null
+++ b/app-emulation/qemu-user/files/qemu-0.8.0-gcc4-hacks.patch
@@ -0,0 +1,118 @@
+2005-10-28 Gwenole Beauchesne <gbeauchesne@mandriva.com>
+
+ * Various additional hacks for GCC4.
+
+--- qemu-0.7.2/target-i386/ops_sse.h.gcc4-hacks 2005-09-04 19:11:31.000000000 +0200
++++ qemu-0.7.2/target-i386/ops_sse.h 2005-10-28 10:09:21.000000000 +0200
+@@ -34,6 +34,12 @@
+ #define Q(n) XMM_Q(n)
+ #define SUFFIX _xmm
+ #endif
++#if defined(__i386__) && __GNUC__ >= 4
++#define RegCopy(d, s) __builtin_memcpy(&(d), &(s), sizeof(d))
++#endif
++#ifndef RegCopy
++#define RegCopy(d, s) d = s
++#endif
+
+ void OPPROTO glue(op_psrlw, SUFFIX)(void)
+ {
+@@ -570,7 +576,7 @@ void OPPROTO glue(op_pshufw, SUFFIX) (vo
+ r.W(1) = s->W((order >> 2) & 3);
+ r.W(2) = s->W((order >> 4) & 3);
+ r.W(3) = s->W((order >> 6) & 3);
+- *d = r;
++ RegCopy(*d, r);
+ }
+ #else
+ void OPPROTO op_shufps(void)
+--- qemu-0.7.2/target-i386/helper.c.gcc4-hacks 2005-09-04 19:11:31.000000000 +0200
++++ qemu-0.7.2/target-i386/helper.c 2005-10-28 10:09:21.000000000 +0200
+@@ -3130,8 +3130,15 @@ void helper_fxrstor(target_ulong ptr, in
+ nb_xmm_regs = 8 << data64;
+ addr = ptr + 0xa0;
+ for(i = 0; i < nb_xmm_regs; i++) {
++#if defined(__i386__) && __GNUC__ >= 4
++ env->xmm_regs[i].XMM_L(0) = ldl(addr);
++ env->xmm_regs[i].XMM_L(1) = ldl(addr + 4);
++ env->xmm_regs[i].XMM_L(2) = ldl(addr + 8);
++ env->xmm_regs[i].XMM_L(3) = ldl(addr + 12);
++#else
+ env->xmm_regs[i].XMM_Q(0) = ldq(addr);
+ env->xmm_regs[i].XMM_Q(1) = ldq(addr + 8);
++#endif
+ addr += 16;
+ }
+ }
+--- qemu-0.7.2/cpu-all.h.gcc4-hacks 2005-09-04 19:11:31.000000000 +0200
++++ qemu-0.7.2/cpu-all.h 2005-10-28 10:09:21.000000000 +0200
+@@ -339,7 +339,13 @@
+
+ static inline void stq_le_p(void *ptr, uint64_t v)
+ {
++#if defined(__i386__) && __GNUC__ >= 4
++ const union { uint64_t v; uint32_t p[2]; } x = { .v = v };
++ ((uint32_t *)ptr)[0] = x.p[0];
++ ((uint32_t *)ptr)[1] = x.p[1];
++#else
+ *(uint64_t *)ptr = v;
++#endif
+ }
+
+ /* float access */
+--- qemu-0.7.2/softmmu_header.h.gcc4-hacks 2005-10-28 10:08:08.000000000 +0200
++++ qemu-0.7.2/softmmu_header.h 2005-10-28 10:09:21.000000000 +0200
+@@ -104,7 +104,7 @@
+ void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, DATA_TYPE v, int is_user);
+
+ #if (DATA_SIZE <= 4) && (TARGET_LONG_BITS == 32) && defined(__i386__) && \
+- (ACCESS_TYPE <= 1) && defined(ASM_SOFTMMU)
++ (ACCESS_TYPE <= 1) && defined(ASM_SOFTMMU) && (__GNUC__ < 4)
+
+ #define CPU_TLB_ENTRY_BITS 4
+
+@@ -131,7 +131,7 @@ static inline RES_TYPE glue(glue(ld, USU
+ "m" (*(uint32_t *)offsetof(CPUState, tlb_read[CPU_MEM_INDEX][0].address)),
+ "i" (CPU_MEM_INDEX),
+ "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX))
+- : "%eax", "%ecx", "%edx", "memory", "cc");
++ : "%eax", "%edx", "memory", "cc");
+ return res;
+ }
+
+@@ -178,13 +178,14 @@ static inline int glue(glue(lds, SUFFIX)
+ "m" (*(uint32_t *)offsetof(CPUState, tlb_read[CPU_MEM_INDEX][0].address)),
+ "i" (CPU_MEM_INDEX),
+ "m" (*(uint8_t *)&glue(glue(__ld, SUFFIX), MMUSUFFIX))
+- : "%eax", "%ecx", "%edx", "memory", "cc");
++ : "%eax", "%edx", "memory", "cc");
+ return res;
+ }
+ #endif
+
+-static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE v)
++static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE val)
+ {
++ RES_TYPE v = val;
+ asm volatile ("movl %0, %%edx\n"
+ "movl %0, %%eax\n"
+ "shrl %3, %%edx\n"
+@@ -236,16 +237,14 @@
+ "2:\n"
+ :
+ : "r" (ptr),
+-/* NOTE: 'q' would be needed as constraint, but we could not use it
+- with T1 ! */
+- "r" (v),
++ "q" (v),
+ "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS),
+ "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
+ "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)),
+ "m" (*(uint32_t *)offsetof(CPUState, tlb_table[CPU_MEM_INDEX][0].addr_write)),
+ "i" (CPU_MEM_INDEX),
+ "m" (*(uint8_t *)&glue(glue(__st, SUFFIX), MMUSUFFIX))
+- : "%eax", "%ecx", "%edx", "memory", "cc");
++ : "%eax", "%edx", "memory", "cc");
+ }
+
+ /* TODO: handle 64-bit access sizes and addresses */
diff --git a/app-emulation/qemu-user/files/qemu-0.8.0-stwbrx.patch b/app-emulation/qemu-user/files/qemu-0.8.0-stwbrx.patch
new file mode 100644
index 0000000..b642702
--- /dev/null
+++ b/app-emulation/qemu-user/files/qemu-0.8.0-stwbrx.patch
@@ -0,0 +1,15 @@
+diff -Nur qemu-0.8.0-old/cpu-all.h qemu-0.8.0/cpu-all.h
+--- qemu-0.8.0-old/cpu-all.h 2006-04-21 23:45:55.000000000 +0200
++++ qemu-0.8.0/cpu-all.h 2006-04-22 00:54:14.000000000 +0200
+@@ -250,7 +250,10 @@
+ static inline void stl_le_p(void *ptr, int v)
+ {
+ #ifdef __powerpc__
+- __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
++ __asm__ __volatile__ ("stwbrx %0,0,%1"
++ : /* no output registers */
++ : "r" (v), "r" (ptr) /* copy v and ptr to registers */
++ : "memory"); /* memory will be clobbered*/
+ #else
+ uint8_t *p = ptr;
+ p[0] = v;
diff --git a/app-emulation/qemu-user/files/qemu-ppc-dirty-hack.patch b/app-emulation/qemu-user/files/qemu-ppc-dirty-hack.patch
new file mode 100644
index 0000000..7895fc8
--- /dev/null
+++ b/app-emulation/qemu-user/files/qemu-ppc-dirty-hack.patch
@@ -0,0 +1,12 @@
+diff -Nau qemu-0.7.1.orig/ppc.ld qemu-0.7.1/ppc.ld
+--- qemu-0.7.1.orig/ppc.ld 2005-07-24 19:52:08.000000000 +0100
++++ qemu-0.7.1/ppc.ld 2005-08-06 01:03:46.000000000 +0100
+@@ -8,7 +8,7 @@
+ SECTIONS
+ {
+ /* Read-only sections, merged into text segment: */
+- . = 0x60000000 + SIZEOF_HEADERS;
++ . = 0x60000000 + 0x400;
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
diff --git a/app-emulation/qemu-user/files/qemu-user-0.7.0-errno.patch b/app-emulation/qemu-user/files/qemu-user-0.7.0-errno.patch
new file mode 100644
index 0000000..291adc1
--- /dev/null
+++ b/app-emulation/qemu-user/files/qemu-user-0.7.0-errno.patch
@@ -0,0 +1,11 @@
+diff -ruN qemu-0.7.0.orig/target-i386/helper2.c qemu-0.7.0/target-i386/helper2.c
+--- qemu-0.7.0.orig/target-i386/helper2.c 2005-04-27 22:52:05.000000000 +0200
++++ qemu-0.7.0/target-i386/helper2.c 2005-05-25 22:07:50.000000000 +0200
+@@ -17,6 +17,7 @@
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
++#include <errno.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <stdio.h>
diff --git a/app-emulation/qemu-user/qemu-user-0.8.2.ebuild b/app-emulation/qemu-user/qemu-user-0.8.2.ebuild
new file mode 100644
index 0000000..6816896
--- /dev/null
+++ b/app-emulation/qemu-user/qemu-user-0.8.2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-user/qemu-user-0.8.2.ebuild,v 1.1 2006/08/16 14:55:00 lu_zero Exp $
+
+inherit eutils flag-o-matic
+
+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/-user/}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="-alpha ~amd64 ~ppc -sparc ~x86"
+IUSE="" #qvm86 debug nptl qemu-fast nptlonly"
+RESTRICT="nostrip test"
+
+DEPEND="virtual/libc
+ app-text/texi2html
+ !<=app-emulation/qemu-0.7.0"
+RDEPEND=""
+
+S="${WORKDIR}/${P/-user/}"
+
+set_target_list() {
+ TARGET_LIST="arm-user armeb-user i386-user ppc-user mips-user"
+ export TARGET_LIST
+}
+
+#pkg_setup() {
+# if [ "$(gcc-major-version)" == "4" ]; then
+# die "Qemu must build with GCC 3"
+# fi
+#}
+
+#RUNTIME_PATH="/emul/gnemul/"
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/qemu-0.7.0-ppc-linker.patch
+ epatch ${FILESDIR}/qemu-0.8.0-gcc4-hacks.patch
+ epatch ${FILESDIR}/qemu-0.8.0-stwbrx.patch
+ epatch ${FILESDIR}/qemu-user-0.7.0-errno.patch
+
+ # Alter target makefiles to accept CFLAGS set via flag-o.
+ sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
+ Makefile Makefile.target tests/Makefile
+ # 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 its cflags
+ unset CFLAGS
+
+ # Switch off hardened tech
+ filter-flags -fpie -fstack-protector
+
+ myconf="--disable-gcc-check"
+ set_target_list
+# --interp-prefix=${RUNTIME_PATH}/qemu-%M
+ ./configure \
+ --prefix=/usr \
+ --target-list="${TARGET_LIST}" \
+ --enable-slirp \
+ --kernel-path=${KV_DIR} \
+ ${myconf} \
+ || die "could not configure"
+
+ emake || die "make failed"
+}
+
+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
+
+ rm -fR ${D}/usr/share/{man,qemu}
+ rm -fR ${D}/usr/bin/qemu-img
+}
diff --git a/app-emulation/vmware-server/Manifest b/app-emulation/vmware-server/Manifest
new file mode 100644
index 0000000..976584d
--- /dev/null
+++ b/app-emulation/vmware-server/Manifest
@@ -0,0 +1,58 @@
+AUX 90vmware-server 91 RMD160 2a9e2e9d428a06ceac7faec500e6b1423da34b25 SHA1 e090847500dd99d161a46cd361ed2297b3d3ecae SHA256 3175cd9665850cf0d25a96849135c93ab129127370d55572f0137ba3d210e423
+MD5 d845f6ccdeb1a1ffda1fb84c09a473ee files/90vmware-server 91
+RMD160 2a9e2e9d428a06ceac7faec500e6b1423da34b25 files/90vmware-server 91
+SHA256 3175cd9665850cf0d25a96849135c93ab129127370d55572f0137ba3d210e423 files/90vmware-server 91
+AUX general/001_all_no-desktop-icon.patch 1131 RMD160 3ab69d825994cc3bb177143d27091fc292cec46a SHA1 14264460c8500f1ead267059e2b9b9a5dc8c057f SHA256 b4055370b0092e71a2b2b0f27edeb7bc063ad265f95ab4530e52c3ab3167ad62
+MD5 23d97e5e436a0d827b48db3ed9948aa7 files/general/001_all_no-desktop-icon.patch 1131
+RMD160 3ab69d825994cc3bb177143d27091fc292cec46a files/general/001_all_no-desktop-icon.patch 1131
+SHA256 b4055370b0092e71a2b2b0f27edeb7bc063ad265f95ab4530e52c3ab3167ad62 files/general/001_all_no-desktop-icon.patch 1131
+AUX general/002_all_allow-write-access-to-config.patch 647 RMD160 0f25f7dd60dfcb5a72b1f7b9cf344d6f431143a9 SHA1 cabd3dd071ef62d4c70f52d1a3e02334ec7f3a73 SHA256 41492cde60da6d449c0f427ac7bd65598838ec17ac0e3a5f545feeb1d29ea391
+MD5 3df74f4dfaa783b6a2f9eba3f0030afa files/general/002_all_allow-write-access-to-config.patch 647
+RMD160 0f25f7dd60dfcb5a72b1f7b9cf344d6f431143a9 files/general/002_all_allow-write-access-to-config.patch 647
+SHA256 41492cde60da6d449c0f427ac7bd65598838ec17ac0e3a5f545feeb1d29ea391 files/general/002_all_allow-write-access-to-config.patch 647
+AUX general/004_all_do-not-build-modules.patch 589 RMD160 b2153579c65a232de9c2e6dbd9bbe108d85f95e5 SHA1 394a67a30f1f29084836183303641915ce982bfd SHA256 916754b0616ea330490b9572be1a9216bb7dd441ba328b1e01e777b29fac4e1e
+MD5 8b7edbd7b3b93bf2b437f88cfa375f28 files/general/004_all_do-not-build-modules.patch 589
+RMD160 b2153579c65a232de9c2e6dbd9bbe108d85f95e5 files/general/004_all_do-not-build-modules.patch 589
+SHA256 916754b0616ea330490b9572be1a9216bb7dd441ba328b1e01e777b29fac4e1e files/general/004_all_do-not-build-modules.patch 589
+AUX general/005_all_do-not-overwrite-authd-file.patch 1921 RMD160 79ea31b4e1a628f35aa8e7489aa337e15c09a62a SHA1 d38250dcab6b92bd9ecf314e22bc2516fb7ea81c SHA256 c93d5c06b2e7dfa268c7e1f3b3b78dc2e15d3e7721558ae4dc2e21d1edb95154
+MD5 7d30a79230c5c2d13fbfbeb1df2fdb94 files/general/005_all_do-not-overwrite-authd-file.patch 1921
+RMD160 79ea31b4e1a628f35aa8e7489aa337e15c09a62a files/general/005_all_do-not-overwrite-authd-file.patch 1921
+SHA256 c93d5c06b2e7dfa268c7e1f3b3b78dc2e15d3e7721558ae4dc2e21d1edb95154 files/general/005_all_do-not-overwrite-authd-file.patch 1921
+AUX general/006_all_xinetd-sendsig-if-possible.patch 1227 RMD160 f27ea918c99e6a3db0fba8d53b5329833aa4cc58 SHA1 43986e1a5af682db2799a336f10c62fa27b7ca46 SHA256 1fcbbdf11f99f80881ee43ae47ed099d5f10aa3985bfe16606fdf2d307836ff0
+MD5 7990840c4bacdd7ce2baf98194c43f77 files/general/006_all_xinetd-sendsig-if-possible.patch 1227
+RMD160 f27ea918c99e6a3db0fba8d53b5329833aa4cc58 files/general/006_all_xinetd-sendsig-if-possible.patch 1227
+SHA256 1fcbbdf11f99f80881ee43ae47ed099d5f10aa3985bfe16606fdf2d307836ff0 files/general/006_all_xinetd-sendsig-if-possible.patch 1227
+AUX general/007_all_use-modprobe-over-insmod.patch 448 RMD160 136dfcfe2df7a7ebf2844749f473a6c6d0bb3084 SHA1 0ad152b3cb738521296322b56e9f247926690e67 SHA256 9497f8ad6acb2460e27bd5430670e79129ec2ffbf6f5b8dae62084e5e56059ee
+MD5 f5a4bba93e2ef942332dbe7105f2b204 files/general/007_all_use-modprobe-over-insmod.patch 448
+RMD160 136dfcfe2df7a7ebf2844749f473a6c6d0bb3084 files/general/007_all_use-modprobe-over-insmod.patch 448
+SHA256 9497f8ad6acb2460e27bd5430670e79129ec2ffbf6f5b8dae62084e5e56059ee files/general/007_all_use-modprobe-over-insmod.patch 448
+AUX general/008_all_dhcpd-conf-location.patch 382 RMD160 6b0c1a3571fb0d7bc537930d9a77fb4d960aa104 SHA1 344da932ea8652d85028d4f17a3a66afd90c01b7 SHA256 577454af27bc9107220055f9d8b93b40e31650c205d31d5a351c5a1ecc16d658
+MD5 4c61820a38a35404d3a37fbddc1f6ba5 files/general/008_all_dhcpd-conf-location.patch 382
+RMD160 6b0c1a3571fb0d7bc537930d9a77fb4d960aa104 files/general/008_all_dhcpd-conf-location.patch 382
+SHA256 577454af27bc9107220055f9d8b93b40e31650c205d31d5a351c5a1ecc16d658 files/general/008_all_dhcpd-conf-location.patch 382
+AUX general/009_all_init.d-modules-warning.patch 991 RMD160 6205e976db47cd3361b5eca8593414d411a2ab8d SHA1 3742749baa606a57d447931f0af791696a49e660 SHA256 5fbc9f101abb3816a732f64a75e90ce7fcb6783c3cd7bae521d8785e88634498
+MD5 9689ef9d197dcc43dc2f390e6de4ec21 files/general/009_all_init.d-modules-warning.patch 991
+RMD160 6205e976db47cd3361b5eca8593414d411a2ab8d files/general/009_all_init.d-modules-warning.patch 991
+SHA256 5fbc9f101abb3816a732f64a75e90ce7fcb6783c3cd7bae521d8785e88634498 files/general/009_all_init.d-modules-warning.patch 991
+AUX vmware-authd 315 RMD160 3624da708d60aa1c1319278553cc96ac07324bb4 SHA1 91bb3c7dd6651ac81765e23d4f83fcbd5ae9af0e SHA256 490794ea4c6e35fb4113c8cf17d3872ae5877ddec5f8e0164203e96cf48f5ef2
+MD5 a237d4e862ce8615d286c979dd9fd2fd files/vmware-authd 315
+RMD160 3624da708d60aa1c1319278553cc96ac07324bb4 files/vmware-authd 315
+SHA256 490794ea4c6e35fb4113c8cf17d3872ae5877ddec5f8e0164203e96cf48f5ef2 files/vmware-authd 315
+AUX vmware-server.rc 1431 RMD160 ac1de3520c321e44dc0c33fdb19e5bb5b3c77336 SHA1 6bd5840c13a08f408c3e74a1a13b261e5b9d3151 SHA256 85219a46bd21f08ac4f6cc2c9f6c22079c9f684cdb991f32f8f2dd443c7fa463
+MD5 da8012d4c7991299bdada6bd6390182b files/vmware-server.rc 1431
+RMD160 ac1de3520c321e44dc0c33fdb19e5bb5b3c77336 files/vmware-server.rc 1431
+SHA256 85219a46bd21f08ac4f6cc2c9f6c22079c9f684cdb991f32f8f2dd443c7fa463 files/vmware-server.rc 1431
+AUX vmware-server.xml 1592 RMD160 0d7e9ed13ebb3c73dd847e95fa95499296609e8c SHA1 02db2ee7ca0abb8b8793c9f56d858bb08c1c715f SHA256 56aafee80ad705e8d832f8853c36d763d37b87d1cb132a41c50eb63085ae854d
+MD5 aa1b576735134579f04b29763901dc4f files/vmware-server.xml 1592
+RMD160 0d7e9ed13ebb3c73dd847e95fa95499296609e8c files/vmware-server.xml 1592
+SHA256 56aafee80ad705e8d832f8853c36d763d37b87d1cb132a41c50eb63085ae854d files/vmware-server.xml 1592
+DIST VMware-server-1.0.1-29996.tar.gz 105500734 RMD160 f4d5805a230afd45ee2234065ffc7c172dd12e18 SHA1 d5e9719fe6dcfef7f13b7e91e31c51905bbeab60 SHA256 08cfa19d9e5475fdaf12114d99bdeecacfd703dd3ec129958bf6f7e98d11641b
+DIST vmware-any-any-update104.tar.gz 297243 RMD160 426616f026de409ca057ec1a0913dc9b3d43ef03 SHA1 9ca5224d832f2b0c0041a1e6afa0103915cdad0f SHA256 c0a9efad2677e93ed914e296131916f8b316377644c5d8c716e6575cd58b3c69
+DIST vmware-server-perl-fixed-rpath-libs.tar.bz2 73834 RMD160 7f64627b5b945e8d7dabe39c165a4b66b71fb4d3 SHA1 9d696750ca3ec92b31ca8112fd80dcd832494044 SHA256 c42299dd033187c67b45b739da66583fbd94cdcba745200b89a25ac96cd9364b
+EBUILD vmware-server-1.0.1.29996.ebuild 3011 RMD160 d99fec6d8b5ddd111afaae6215bad8715eb50013 SHA1 26480d0200ae2fbc5e3fce9815894e0d7c278466 SHA256 b89ee2d174fd57d1d75072c87e616d3f3a1a763616a5078d10146ae7f4b8d0cf
+MD5 15968083b44dec24fe06d014aaa3eff5 vmware-server-1.0.1.29996.ebuild 3011
+RMD160 d99fec6d8b5ddd111afaae6215bad8715eb50013 vmware-server-1.0.1.29996.ebuild 3011
+SHA256 b89ee2d174fd57d1d75072c87e616d3f3a1a763616a5078d10146ae7f4b8d0cf vmware-server-1.0.1.29996.ebuild 3011
+MD5 30fd2fb78c5ce19d4bb96ab9d36916ff files/digest-vmware-server-1.0.1.29996 867
+RMD160 5062ade4b17e858c57c12b0b2cb122757865734a files/digest-vmware-server-1.0.1.29996 867
+SHA256 609d72c5e8466cd340b69bb5b87a063e77320a412b6ce035e495c4544802964a files/digest-vmware-server-1.0.1.29996 867
diff --git a/app-emulation/vmware-server/files/90vmware-server b/app-emulation/vmware-server/files/90vmware-server
new file mode 100644
index 0000000..dd0d596
--- /dev/null
+++ b/app-emulation/vmware-server/files/90vmware-server
@@ -0,0 +1,3 @@
+PATH=/opt/vmware/server/bin
+ROOTPATH=/opt/vmware/server/bin
+MANPATH=/opt/vmware/server/man
diff --git a/app-emulation/vmware-server/files/digest-vmware-server-1.0.0.28343 b/app-emulation/vmware-server/files/digest-vmware-server-1.0.0.28343
new file mode 100644
index 0000000..f5cae1b
--- /dev/null
+++ b/app-emulation/vmware-server/files/digest-vmware-server-1.0.0.28343
@@ -0,0 +1,9 @@
+MD5 a25b4beb53785c05ef3b3077d87f6e2b VMware-server-1.0.0-28343.tar.gz 105298140
+RMD160 ac3ba270717a18216c405d967f8535803ca68e3d VMware-server-1.0.0-28343.tar.gz 105298140
+SHA256 c6583d04c083d54bdf74bc94705e0603c5d918df9756918d2053438d49c5641a VMware-server-1.0.0-28343.tar.gz 105298140
+MD5 8cba16d3f6b3723b43d555a5f7cbf850 vmware-any-any-update104.tar.gz 297243
+RMD160 426616f026de409ca057ec1a0913dc9b3d43ef03 vmware-any-any-update104.tar.gz 297243
+SHA256 c0a9efad2677e93ed914e296131916f8b316377644c5d8c716e6575cd58b3c69 vmware-any-any-update104.tar.gz 297243
+MD5 e494568dd025080cc80e7ad801f0b743 vmware-server-perl-fixed-rpath-libs.tar.bz2 73834
+RMD160 7f64627b5b945e8d7dabe39c165a4b66b71fb4d3 vmware-server-perl-fixed-rpath-libs.tar.bz2 73834
+SHA256 c42299dd033187c67b45b739da66583fbd94cdcba745200b89a25ac96cd9364b vmware-server-perl-fixed-rpath-libs.tar.bz2 73834
diff --git a/app-emulation/vmware-server/files/digest-vmware-server-1.0.1.29996 b/app-emulation/vmware-server/files/digest-vmware-server-1.0.1.29996
new file mode 100644
index 0000000..acc2fee
--- /dev/null
+++ b/app-emulation/vmware-server/files/digest-vmware-server-1.0.1.29996
@@ -0,0 +1,9 @@
+MD5 9846bff6c3c8af97d4e3ae2700f8dd3a VMware-server-1.0.1-29996.tar.gz 105500734
+RMD160 f4d5805a230afd45ee2234065ffc7c172dd12e18 VMware-server-1.0.1-29996.tar.gz 105500734
+SHA256 08cfa19d9e5475fdaf12114d99bdeecacfd703dd3ec129958bf6f7e98d11641b VMware-server-1.0.1-29996.tar.gz 105500734
+MD5 8cba16d3f6b3723b43d555a5f7cbf850 vmware-any-any-update104.tar.gz 297243
+RMD160 426616f026de409ca057ec1a0913dc9b3d43ef03 vmware-any-any-update104.tar.gz 297243
+SHA256 c0a9efad2677e93ed914e296131916f8b316377644c5d8c716e6575cd58b3c69 vmware-any-any-update104.tar.gz 297243
+MD5 e494568dd025080cc80e7ad801f0b743 vmware-server-perl-fixed-rpath-libs.tar.bz2 73834
+RMD160 7f64627b5b945e8d7dabe39c165a4b66b71fb4d3 vmware-server-perl-fixed-rpath-libs.tar.bz2 73834
+SHA256 c42299dd033187c67b45b739da66583fbd94cdcba745200b89a25ac96cd9364b vmware-server-perl-fixed-rpath-libs.tar.bz2 73834
diff --git a/app-emulation/vmware-server/files/general/001_all_no-desktop-icon.patch b/app-emulation/vmware-server/files/general/001_all_no-desktop-icon.patch
new file mode 100644
index 0000000..1d864f7
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/001_all_no-desktop-icon.patch
@@ -0,0 +1,31 @@
+--- vmware-distrib/bin/vmware-config.pl.ori 2005-11-09 01:45:08.000000000 +0000
++++ vmware-distrib/bin/vmware-config.pl 2005-11-09 01:48:21.000000000 +0000
+@@ -8433,7 +8433,7 @@
+ error('Please shut down any running VMs and run this script again.' .
+ "\n\n");
+ } else {
+- if (system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware')
++ if (system(shell_string('/etc/init.d' . '/vmware')
+ . ' stop')) {
+ error('Unable to stop services for ' . vmware_product_name() .
+ "\n\n");
+@@ -8463,8 +8463,8 @@
+ }
+ if (vmware_product() ne 'server') {
+ configure_gtk2();
+- createMimePackageFile();
+- configureDesktopFiles();
++# createMimePackageFile();
++# configureDesktopFiles();
+ configure_mon();
+ configure_pp();
+ configure_net();
+@@ -8532,7 +8532,7 @@
+ db_save();
+ # Then start VMware's services
+ if (!$gOption{'skipstopstart'}) {
+- system(shell_string(db_get_answer('INITSCRIPTSDIR') . '/vmware') . ' start');
++ system(shell_string('/etc/init.d' . '/vmware') . ' start');
+ print "\n";
+ }
+
diff --git a/app-emulation/vmware-server/files/general/002_all_allow-write-access-to-config.patch b/app-emulation/vmware-server/files/general/002_all_allow-write-access-to-config.patch
new file mode 100644
index 0000000..e646b7b
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/002_all_allow-write-access-to-config.patch
@@ -0,0 +1,15 @@
+diff -urN vmware-distrib.orig/bin/vmware-config.pl vmware-distrib/bin/vmware-config.pl
+--- vmware-distrib.orig/bin/vmware-config.pl 2005-12-16 00:51:03.000000000 -0500
++++ vmware-distrib/bin/vmware-config.pl 2005-12-21 14:34:03.000000000 -0500
+@@ -7327,7 +7327,10 @@
+ error('Unable to write configuration file "' . $name . '".' . "\n\n");
+ }
+ db_add_file($name, 0x1);
+- safe_chmod(0644, $name);
++ safe_chmod(0664, $name);
++ my $gid = (getgrnam('vmware'))[2];
++ my $uid = (stat($name))[4];
++ safe_chown($uid,$gid,$name);
+
+ # Append the promotional configuration if it exists
+ $promoconfig = $libdir . '/configurator/PROMOCONFIG';
diff --git a/app-emulation/vmware-server/files/general/004_all_do-not-build-modules.patch b/app-emulation/vmware-server/files/general/004_all_do-not-build-modules.patch
new file mode 100644
index 0000000..cec3b3e
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/004_all_do-not-build-modules.patch
@@ -0,0 +1,17 @@
+diff -uNr vmware-server-distrib.orig/bin/vmware-config.pl vmware-server-distrib/bin/vmware-config.pl
+--- vmware-server-distrib.orig/bin/vmware-config.pl 2006-02-18 18:12:26.000000000 +0000
++++ vmware-server-distrib/bin/vmware-config.pl 2006-02-18 18:14:17.000000000 +0000
+@@ -8571,10 +8571,10 @@
+ configure_gtk2();
+ # createMimePackageFile();
+ # configureDesktopFiles();
+- configure_mon();
+- configure_pp();
++# configure_mon();
++# configure_pp();
+ configure_net();
+- build_vmnet();
++# build_vmnet();
+ }
+
+ # Create the directory for the UNIX domain sockets
diff --git a/app-emulation/vmware-server/files/general/005_all_do-not-overwrite-authd-file.patch b/app-emulation/vmware-server/files/general/005_all_do-not-overwrite-authd-file.patch
new file mode 100644
index 0000000..0c45cad
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/005_all_do-not-overwrite-authd-file.patch
@@ -0,0 +1,44 @@
+--- vmware-server-distrib/bin/vmware-config.pl 2006-03-17 21:13:22.000000000 +0100
++++ vmware-server-distrib/bin/vmware-config.pl 2006-03-17 22:37:00.000000000 +0100
+@@ -6278,10 +6278,30 @@
+ my $authd_conf_file = "$conf_dir/vmware-authd";
+ my $authd = db_get_answer('SBINDIR') . "/vmware-authd";
+
++ # Never overwrite an existing conf file unless it has the exact modification
++ # date as in the database in which case we can be pretty sure that it is the
++ # one that we wrote and it should be safe to assume that we can overwrite it.
++ if( -f $authd_conf_file ) {
++ my @statbuf = stat( $authd_conf_file );
++ if( ! defined( $statbuf[9] ) ) {
++ error(
++ 'Unable to get the last modification timestamp of file "'
++ . $authd_conf_file . "\".\n\n"
++ );
++ }
++ if(
++ ! db_file_in( $authd_conf_file )
++ || db_file_ts( $authd_conf_file ) != $statbuf[9]
++ ) {
++ if (get_answer('The file "' . $authd_conf_file . '" already exists and seems to have'
++ . ' been modified manually. Overwrite?', 'yesno', 'no') eq 'no')
++ { return; }
++ }
++ }
++
+ # Create the new vmware-authd file
+- # XXX This file should be registered with the installer's database. --hpreg
+ if (not open(CONF, '>' . $authd_conf_file)) {
+- query('Unable to create the "' . $authd_conf_file . '"file. '
++ query('Unable to create the "' . $authd_conf_file . '" file. '
+ . 'Consequently, this program cannot add a "' . $authd . '" entry '
+ . 'in the file. You will have to do it by hand before running '
+ . vmware_product_name() . '.' . "\n\n" . 'Hit enter to continue.',
+@@ -6304,6 +6324,8 @@
+ END
+ close CONF;
+
++ db_add_file( $authd_conf_file, 0x1 );
++
+ # Make sure the IP service is registered, as RH 9.0's xinetd is picky about
+ # that (was bug 26864). --hpreg
+ if (check_port_not_registered($port) == 1) {
diff --git a/app-emulation/vmware-server/files/general/006_all_xinetd-sendsig-if-possible.patch b/app-emulation/vmware-server/files/general/006_all_xinetd-sendsig-if-possible.patch
new file mode 100644
index 0000000..89c4e16
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/006_all_xinetd-sendsig-if-possible.patch
@@ -0,0 +1,28 @@
+--- vmware-server-distrib/bin/vmware-config.pl 2006-03-20 20:04:45.000000000 +0000
++++ vmware-server-distrib/bin/vmware-config.pl 2006-03-20 20:08:01.000000000 +0000
+@@ -6255,17 +6255,17 @@
+ #Restart xinetd
+ sub restart_xinetd {
+ my $xinetd_restart = db_get_answer('INITSCRIPTSDIR') . '/xinetd';
++ if (!system(shell_string($gHelper{'killall'}) . ' -USR2 xinetd')) {
++ return;
++ }
+ if (-e $xinetd_restart) {
+- if (!system(shell_string($xinetd_restart) . ' restart')) {
+- return;
++ if (system(shell_string($xinetd_restart) . ' restart')) {
++ query('Unable to make the Internet super-server (xinetd) re-read its '
++ . 'configuration file. Please restart xinetd by hand:' . "\n"
++ . ' killall -v -USR2 xinetd' . "\n\n"
++ . 'Hit enter to continue.', '', 0);
+ }
+ }
+- if (system(shell_string($gHelper{'killall'}) . ' -USR2 xinetd')) {
+- query('Unable to make the Internet super-server (xinetd) re-read its '
+- . 'configuration file. Please restart xinetd by hand:' . "\n"
+- . ' killall -v -USR2 xinetd' . "\n\n"
+- . 'Hit enter to continue.', '', 0);
+- }
+ }
+
+ # Update the Internet super-server's configuration file, and make the
diff --git a/app-emulation/vmware-server/files/general/007_all_use-modprobe-over-insmod.patch b/app-emulation/vmware-server/files/general/007_all_use-modprobe-over-insmod.patch
new file mode 100644
index 0000000..c29a87e
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/007_all_use-modprobe-over-insmod.patch
@@ -0,0 +1,12 @@
+diff -uNr vmware-server-distrib/installer/services.sh vmware-server-distrib.new/installer/services.sh
+--- vmware-server-distrib/installer/services.sh 2006-02-05 00:21:25.000000000 +0000
++++ vmware-server-distrib.new/installer/services.sh 2006-02-20 23:48:07.000000000 +0000
+@@ -538,7 +538,7 @@
+ }
+
+ vmware_load_module() {
+- /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" || exit 1
++ /sbin/modprobe -s -f "$1" || exit 1
+ exit 0
+ }
+
diff --git a/app-emulation/vmware-server/files/general/008_all_dhcpd-conf-location.patch b/app-emulation/vmware-server/files/general/008_all_dhcpd-conf-location.patch
new file mode 100644
index 0000000..575ab85
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/008_all_dhcpd-conf-location.patch
@@ -0,0 +1,13 @@
+--- vmware-distrib/bin/vmware-config.pl.ori 2005-11-09 01:45:08.000000000 +0000
++++ vmware-distrib/bin/vmware-config.pl 2005-11-09 01:48:21.000000000 +0000
+@@ -5448,8 +5448,8 @@
+ my $network;
+ my $netmask;
+
+- if (-r '/etc/dhcpd.conf') {
+- $conf = '/etc/dhcpd.conf';
++ if (-r '/etc/dhcp/dhcpd.conf') {
++ $conf = '/etc/dhcp/dhcpd.conf';
+ } else {
+ return;
+ }
diff --git a/app-emulation/vmware-server/files/general/009_all_init.d-modules-warning.patch b/app-emulation/vmware-server/files/general/009_all_init.d-modules-warning.patch
new file mode 100644
index 0000000..4eab043
--- /dev/null
+++ b/app-emulation/vmware-server/files/general/009_all_init.d-modules-warning.patch
@@ -0,0 +1,19 @@
+diff -uNr vmware-server-distrib.orig/installer/services.sh vmware-server-distrib/installer/services.sh
+--- vmware-server-distrib.orig/installer/services.sh 2006-07-01 03:14:16.000000000 +0000
++++ vmware-server-distrib/installer/services.sh 2006-07-14 11:59:28.000000000 +0000
+@@ -606,8 +606,13 @@
+ start)
+ if [ -e "$vmware_etc_dir"/not_configured ]; then
+ echo "`vmware_product_name`"' is installed, but it has not been (correctly) configured'
+- echo 'for the running kernel. To (re-)configure it, invoke the'
+- echo 'following command: '"$vmdb_answer_BINDIR"'/vmware-config.pl.'
++ echo 'for the running kernel.'
++ echo
++ echo 'Please ensure that the modules have been compiled for this kernel:'
++ echo ' emerge --oneshot vmware-modules'
++ echo
++ echo 'Also ensure '"`vmware_product_name`"' has been configured:'
++ echo ' '"$vmdb_answer_BINDIR"'/vmware-config.pl'
+ echo
+
+ exit 1
diff --git a/app-emulation/vmware-server/files/vmware-authd b/app-emulation/vmware-server/files/vmware-authd
new file mode 100644
index 0000000..fce8f64
--- /dev/null
+++ b/app-emulation/vmware-server/files/vmware-authd
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_unix.so shadow nullok
+auth required pam_unix_auth.so shadow nullok
+account required pam_listfile.so item=group sense=allow file=/etc/vmware/vmwaregroup onerr=fail
+account sufficient pam_unix.so
+account required pam_unix_acct.so
diff --git a/app-emulation/vmware-server/files/vmware-server.rc b/app-emulation/vmware-server/files/vmware-server.rc
new file mode 100644
index 0000000..238d759
--- /dev/null
+++ b/app-emulation/vmware-server/files/vmware-server.rc
@@ -0,0 +1,74 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-server/files/vmware-server.rc,v 1.1 2006/07/31 20:23:50 ikelos Exp $
+
+depend() {
+ need localmount xinetd
+ use logger net
+ after samba
+}
+
+vmware-prettify() {
+ # Yea, the code is ugly but the output is pretty
+ state=$1
+ waserror=0
+ msgtype=0
+ while read line
+ do
+ [ "$line" == "" ] && continue
+ if [ "$msgtype" -le "0" ]
+ then
+ if [ "$msgtype" == "-1" ]
+ then
+ ewarn $line
+ continue
+ fi
+ if [ "${line/*:*/}" == "" ]
+ then
+ einfon $line
+ echo
+ eend 0
+ msgtype=1
+ else
+ ewarn $line
+ msgtype=-1
+ waserror=1
+ fi
+ continue
+ fi
+
+ # Strip out anything after the <esc> code
+ message=`echo $line | sed -e "s/^\(.*\).*$/\1/"`
+ einfon " $message"
+ echo
+
+ echo $line | grep done > /dev/null
+ status=$?
+ eend $status
+
+ if [ "$status" != "0" ]
+ then
+ logger -p local0.err -t vmware-${state} "$line"
+ waserror=$status
+ fi
+ done
+ if [ "$msgtype" == "-1" ]
+ then
+ eend 1 "VMware is not properly configured! See above."
+ fi
+ return $waserror
+}
+
+start() {
+ test -x /etc/vmware/init.d/vmware || \
+ eend 1 "vmware init script not found. Aborting" || return 1
+
+ /etc/vmware/init.d/vmware start | vmware-prettify start
+ return $?
+}
+
+stop() {
+ /etc/vmware/init.d/vmware stop | vmware-prettify stop
+ return $?
+}
diff --git a/app-emulation/vmware-server/files/vmware-server.xml b/app-emulation/vmware-server/files/vmware-server.xml
new file mode 100644
index 0000000..8d5e2ef
--- /dev/null
+++ b/app-emulation/vmware-server/files/vmware-server.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-vmware-vm">
+ <comment xml:lang="en">VMware virtual machine</comment>
+ <magic priority="50">
+ <match type="string" value='config.version = "' offset="0:4096"/>
+ </magic>
+ <glob pattern="*.vmx"/>
+ </mime-type>
+
+ <mime-type type="application/x-vmware-vmdisk">
+ <comment xml:lang="en">VMware virtual disk</comment>
+ <magic priority="50">
+ <match type="string" value="# Disk DescriptorFile" offset="0"/>
+ <match type="string" value="KDMV" offset="0"/>
+ </magic>
+ <glob pattern="*.vmdk"/>
+ </mime-type>
+
+ <mime-type type="application/x-vmware-team">
+ <comment xml:lang="en">VMware team</comment>
+ <magic priority="50">
+ <match type="string" value='&lt;Foundry version="1"&gt;' offset="0">
+ <match type="string" value="&lt;VMTeam&gt;" offset="23:24"/>
+ </match>
+ </magic>
+ <glob pattern="*.vmtm"/>
+ </mime-type>
+
+ <mime-type type="application/x-vmware-snapshot">
+ <comment xml:lang="en">VMware virtual machine snapshot</comment>
+ <magic priority="50">
+ <match type="string" value="\\0xD0\\0xBE\\0xD0\\0xBE" offset="0"/>
+ </magic>
+ <glob pattern="*.vmsn"/>
+ </mime-type>
+
+ <mime-type type="application/x-vmware-vmfoundry">
+ <comment xml:lang="en">VMware virtual machine foundry</comment>
+ <magic priority="50">
+ <match type="string" value='&lt;Foundry version="1"&gt;' offset="0">
+ <match type="string" value="&lt;VM&gt;" offset="23:24"/>
+ </match>
+ </magic>
+ <glob pattern="*.vmxf"/>
+ </mime-type>
+</mime-info>
diff --git a/app-emulation/vmware-server/vmware-server-1.0.1.29996.ebuild b/app-emulation/vmware-server/vmware-server-1.0.1.29996.ebuild
new file mode 100644
index 0000000..dbd9949
--- /dev/null
+++ b/app-emulation/vmware-server/vmware-server-1.0.1.29996.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-server/vmware-server-1.0.1.29996.ebuild,v 1.1 2006/08/19 16:42:12 ikelos Exp $
+
+# Unlike many other binary packages the user doesn't need to agree to a licence
+# to download VMWare. The agreeing to a licence is part of the configure step
+# which the user must run manually.
+
+inherit eutils versionator vmware
+
+MY_PV=$(replace_version_separator 3 '-' )
+MY_P="VMware-server-${MY_PV}"
+
+DESCRIPTION="VMware Server for Linux"
+HOMEPAGE="http://www.vmware.com/"
+SRC_URI="http://download3.vmware.com/software/vmserver/${MY_P}.tar.gz
+ http://ftp.cvut.cz/vmware/${ANY_ANY}.tar.gz
+ http://ftp.cvut.cz/vmware/obselete/${ANY_ANY}.tar.gz
+ http://knihovny.cvut.cz/ftp/pub/vmware/${ANY_ANY}.tar.gz
+ http://knihovny.cvut.cz/ftp/pub/vmware/obselete/${ANY_ANY}.tar.gz
+ http://dev.gentoo.org/~ikelos/devoverlay-distfiles/${PN}-perl-fixed-rpath-libs.tar.bz2"
+
+LICENSE="vmware"
+IUSE=""
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="nostrip"
+
+DEPEND=">=sys-libs/glibc-2.3.5
+ >=dev-lang/perl-5
+ sys-apps/pciutils
+ sys-apps/findutils
+ virtual/os-headers"
+# vmware-server should not use virtual/libc as this is a
+# precompiled binary package thats linked to glibc.
+RDEPEND=">=sys-libs/glibc-2.3.5
+ amd64? (
+ app-emulation/emul-linux-x86-baselibs
+ app-emulation/emul-linux-x86-gtklibs
+ )
+ !amd64? (
+ virtual/xft
+ || (
+ (
+ x11-libs/libX11
+ x11-libs/libXtst
+ x11-libs/libXext
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXrender
+ )
+ virtual/x11
+ )
+ )
+ >=dev-lang/perl-5
+ !app-emulation/vmware-player
+ !app-emulation/vmware-workstation
+ ~app-emulation/vmware-modules-1.0.0.15
+ sys-apps/pciutils
+ virtual/pam
+ sys-apps/xinetd"
+
+S=${WORKDIR}/vmware-server-distrib
+
+RUN_UPDATE="no"
+PATCHES="general"
+
+src_unpack() {
+ EPATCH_SUFFIX="patch"
+ vmware_src_unpack
+ cd ${WORKDIR}
+ unpack ${PN}-perl-fixed-rpath-libs.tar.bz2
+
+ # patch the vmware /etc/pam.d file to ensure that only
+ # vmware group members can log in
+ use pam && cp ${FILESDIR}/vmware-authd ${S}/etc/pam.d/vmware-authd
+}
+
+src_install() {
+ vmware_src_install
+
+ # Fix the amd64 emulation pam stuff
+ use amd64 && use pam && dosed "s:pam_:/emul/linux/x86/lib/security/pam_:" ${config_dir}/pam.d/vmware-authd
+
+ echo "${VMWARE_GROUP}" > ${D}${config_dir}/vmwaregroup
+
+ dosym /etc/init.d/xinetd ${config_dir}/init.d
+}
+
+pkg_config() {
+ einfo "Running ${ROOT}${dir}/bin/vmware-config.pl"
+ ${ROOT}${dir}/bin/vmware-config.pl
+}
+
+pkg_postinst() {
+ vmware_pkg_postinst
+ einfo "Remember by default xinetd only allows connections from localhost"
+ einfo "To allow external users access to vmware-server you must edit"
+ einfo " /etc/xinetd.d/vmware-authd"
+ einfo "and specify a new 'only_from' line"
+ echo
+ ewarn "VMWare Server also has issues when running on a JFS filesystem. For more"
+ ewarn "information see http://bugs.gentoo.org/show_bug.cgi?id=122500#c94"
+}
+