public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
@ 2011-11-28 15:41 Alexey Shvetsov
  0 siblings, 0 replies; 6+ messages in thread
From: Alexey Shvetsov @ 2011-11-28 15:41 UTC (permalink / raw
  To: gentoo-commits

commit:     91eeab213a1a18e7c7e1470ebf0647504409fe72
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 15:41:25 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 15:41:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=91eeab21

Revork ebuilds

(Portage version: 2.2.0_alpha78/git/Linux x86_64, unsigned Manifest commit)

---
 app-emulation/xen-tools/Manifest                   |   40 +--
 .../files/xen-tools-3.3.1-sandbox-fix.patch        |   21 -
 .../files/xen-tools-3.4.2-as-needed.patch          |   13 -
 .../files/xen-tools-3.4.2-fix-definitions.patch    |   16 -
 .../files/xen-tools-3.4.2-fix-include.patch        |   28 --
 .../files/xen-tools-3.4.2-ldflags-respect.patch    |   31 --
 .../xen-tools-3.4.2-remove-default-cflags.patch    |  257 ------------
 .../files/xen-tools-3.4.2-werror-idiocy-v2.patch   |  429 --------------------
 .../files/xen-tools-4.1.1-libxl-tap.patch          |   37 --
 app-emulation/xen-tools/files/xend.initd-r1        |   71 ----
 app-emulation/xen-tools/files/xendomains.initd-r1  |  117 ------
 app-emulation/xen-tools/metadata.xml               |    2 -
 app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild  |  250 ------------
 ...s-4.1.2-r1.ebuild => xen-tools-4.1.2-r2.ebuild} |   38 +--
 14 files changed, 11 insertions(+), 1339 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index b28974f..a4ed5c6 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,38 +1,2 @@
-AUX ipxe-nopie.patch 952 RMD160 243c65b1e9e27fde14b10c5f605cce635de88032 SHA1 06870bb3bb063aabe16e721f487f0756a5889e8f SHA256 22d1e84568e4bdf204404c45cd4d323a78a1b5a5a29cc4a0707894e22f40bd48
-AUX xen-consoles.logrotate 63 RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 SHA1 6f88a4da3349aade6070dfc5c4465e2c00f3e68c SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19
-AUX xen-tools-3.3.0-nostrip.patch 1021 RMD160 f702b588596dfdebf71fafbf866d270ac5bb549e SHA1 bb4db097af6e206ed68bcc1a1c3ef48b02e9a4c5 SHA256 2debac718c01a7eac4daf3182a7ae04aa562137d791cd510ecf1848d7eaccebd
-AUX xen-tools-3.3.1-sandbox-fix.patch 828 RMD160 6c637b0883b72f12ce33b9c6d2dc7cf5267fc85a SHA1 51b35f096c0ad5c83e9654cfe0267b8efc51367e SHA256 519236a71e81e1da1c9a7616745422e6f205f4f7901abba7af0e0aef665af343
-AUX xen-tools-3.4.0-network-bridge-broadcast.patch 496 RMD160 3a8c57fe70837861f6f69d1d260c6fa6adad43e3 SHA1 cc02643eee7a39e97b53674066516c80ec0c3b38 SHA256 d00a1954447fc29500ab2f1a8c7900310e0dee81942be5c922ad66b6b42dfb74
-AUX xen-tools-3.4.2-as-needed.patch 765 RMD160 dbb5ad2ec52e96c40f109e28c91b566e88cb6220 SHA1 9e38f5c06153b5293daa55abe00106404ff6555f SHA256 91f9bf0723462a70d025c8b7ce0dee50e170b68f1a22092f28d92b140a4e5772
-AUX xen-tools-3.4.2-fix-definitions.patch 358 RMD160 d9cbf9cacb780f5de2ad7f05d981d292aa7dc994 SHA1 1a6163deb6b177b00e013fdfc6f1faf0bf20769e SHA256 0e43548bb3727beff625050fadacd04c1b2a0bec315531f793928a6808654aa8
-AUX xen-tools-3.4.2-fix-include.patch 894 RMD160 c1c17e63f4296b175159cae579b9d25f8654d7d3 SHA1 f7549495b1cecf8142c98ea4601d77e5f69619ec SHA256 3095dc197c48d0e4bf3ee122e427e00bfdd8e52f4e2b421fdca30ce32886d476
-AUX xen-tools-3.4.2-ldflags-respect.patch 1057 RMD160 d463f678e845e1d92012ec7013e211f52489839b SHA1 54916dd7f1d2c83df0219a5a092fcb2db8d2f71b SHA256 d1afe208eab5b00f5c3204b231b8f68a2d2335699a42b913f1ea9101f280736c
-AUX xen-tools-3.4.2-remove-default-cflags.patch 10646 RMD160 cc8175c33251310645fd6cc400c6180a7fcdcf75 SHA1 5e94fce8db6b67df6264e92a69f9f3802610b93f SHA256 f234c45b0a96c4eb5c97e7a8d76fb1f4a3dff110c4ea2ec68e8db71e03044d98
-AUX xen-tools-3.4.2-werror-idiocy-v2.patch 16827 RMD160 80fe78d3fd5f2d23d4852cf8608c616ae7e4e8b6 SHA1 619f42bf7ac7886a4b214bf813ad3369265f424b SHA256 45dfc85ea28c7a70bfcf94986758370e27c32698d78b90a2066335dd378f3669
-AUX xen-tools-4.1.1-bridge.patch 449 RMD160 165524a3a92014f79e886b0a20dba8b1c1920cc2 SHA1 32db884422a48819d71003860f99779b7b82540a SHA256 71eea5408e3600c3c6f7ce4e8363ea2c19db36c1882e20cf0ef8143af527782b
-AUX xen-tools-4.1.1-curl.patch 550 RMD160 87e09f92f292d89c86416036d4207b0460a3dc6e SHA1 dec0e47d62d85cb21d9fb6d097ab183f02b80310 SHA256 4bdb2875b36e7dbb0bd8d61b697da78007bb22922f56e020795c91ebb9ddd50b
-AUX xen-tools-4.1.1-libxl-tap.patch 1071 RMD160 a345fab381af82ffdf7a4206d9db30f6845e5867 SHA1 bbe2ddd9eb8119ae172fd9671fe58bda80bf9095 SHA256 ee03a5b68a9edf5d4fe78a322ff261e13f6ded879f3898b0ea72c407f678f885
-AUX xen-tools-4.1.1-upstream-23104-1976adbf2b80.patch 26848 RMD160 7d3bd028c5da4b2a48f1e992900bbf1866c9c4ea SHA1 55c5476e632649d4d635db1023193216455d076d SHA256 8654c4b587b350baaaea12cde3ef1737dc80088fba281556bf4c714fa4d8111f
-AUX xen-tools-4.1.2-pyxml.patch 408 RMD160 131ff6e6a1b3bd71ff584d3cbfca4b078abd77b1 SHA1 5fa6ce64ef125e97df65ed357e1c40964a7a3619 SHA256 6a8d8ca5478bc68850fd930749ca22207807c87f8624c0c3596a8cd70bc06c65
-AUX xenconsoled.confd 44 RMD160 0134f85258cf524807c4e2eae94739a70808c20d SHA1 6435bba449e9cffd3f99c5afdeb3cc37ecbd744d SHA256 2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060
-AUX xenconsoled.initd 652 RMD160 5aa785e9c73c5eb8460863af2c1bc50d2a07faf4 SHA1 dceffade1f3f5f2503fc6c3ccb4b9f9788365d00 SHA256 1a5594e4e924b94490c5c942b1b63e5fe857b8ad8061060e5d8a3bdfc9f0f1b7
-AUX xend.initd-r1 1664 RMD160 8d7ea19e96c49631a8f432dd93ae91ca4f37d26b SHA1 bd3a8f083288cd89624d31f3c7932e1a831d99a3 SHA256 6ea8848ca1203c5ef8490014ded86ec67100385c217660d393b25dc6519d254d
-AUX xend.initd-r2 1064 RMD160 07b94d60a9c93577864086945389ef9821913522 SHA1 60f246da00f829776f1bb9a16ec07a6f91cbd24e SHA256 b9dcd925856eb5213b9052169492492d686b5d1ccae65b1c94a8ac944708d155
-AUX xendomains-screen.confd 594 RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 SHA1 7f9ed2986495d5fa4a6f8b050cd632fde6a19994 SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a
-AUX xendomains.confd 291 RMD160 75d55db5360da12fc3d721c37001ccbfbb844e52 SHA1 e7be8973a4bcbfc7680258e369b07e2ed097ef49 SHA256 2fac318bb96b357dd185f7729d83c0a0b941799cdb89c24ed83051bb085735dc
-AUX xendomains.initd-r1 2930 RMD160 9a1c467d63043ce04c5f3c268745a30e4db1d006 SHA1 e649a34fae4cfc25f9f904008a79603c47df9836 SHA256 cf03eb7d8eb6d79bce02e857a4a6bcff68a6a63c55ff283f18ebb8d013a27111
-AUX xendomains.initd-r2 2933 RMD160 31d35c58d0286a34bebd636e85a9368054b8f6c0 SHA1 5e9cbdb5f2b1770bf30ba99ca7c67dbf38b78e84 SHA256 da69c146e5213df5376bd9b2758d9d5957c802e5513c6ea510e604d00f1d9e40
-AUX xenstored.confd 42 RMD160 3407e1ff0958d5797e257da284798a21fe31a5db SHA1 c18f64d2a41de25695b7dfb924478e3fa64ed0c3 SHA256 afcc14f014fe4ec478f85d230efefba9ffad024bf8c83b30074e8a3712cc7831
-AUX xenstored.initd 812 RMD160 57a880e0024f3733bb3ebe945389eed6474b96f5 SHA1 9837c052afac31ee623ef02280a43114866869c8 SHA256 8f9df8ad835e45f9c995244e9e80d1a9ee630787bf2da88b7c4a73354d056fd8
-DIST ipxe-git-v1.0.0.tar.gz 1996881 RMD160 dcd9b6eaafa1ce05c1ebf2a15f2f73ad7a8c5547 SHA1 da052c8de5f3485fe0253c19cf52ed6d72528485 SHA256 d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723
-DIST xen-3.4.2.tar.gz 11187726 RMD160 2ef81df1f44356d60e04e21df2173ce5357d8509 SHA1 3cd2cafacd52bbac2e2da1cfd846ee6260b43455 SHA256 d17c33136041cc8da69214ccf527fc48637bee7a9ab4d68a88ec50e6a9d20b0b
-DIST xen-4.1.1.tar.gz 10355625 RMD160 4b3c0641b0f098889f627662aa6b8fea00c5b636 SHA1 f1b5ef4b663c339faf9c77fc895327cfbcc9776c SHA256 246289227507466b5da8b2d0da84a5b0e68a392527b16cde38898d0348890f5b
-DIST xen-4.1.2.tar.gz 10365786 RMD160 457797ec4be286afbbcad940a9ce04e44f3f40d6 SHA1 db584cb0a0cc614888d7df3b196d514fdb2edd6e SHA256 7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d
-EBUILD xen-tools-3.4.2-r3.ebuild 7049 RMD160 05ffd0fdba6761df2d59f3bd7421599e1f20f4a1 SHA1 e36b7900c84de2ca1f861af081678ff3c7eb943a SHA256 d1513d443231dd27cb0267acac47c00c9bf95c25aa296e90ee6bb21a134e1e51
-EBUILD xen-tools-3.4.2-r5.ebuild 7383 RMD160 b31318f590f2d563c036a7acffe65cecc9bf677f SHA1 34312c51b92c28dc7d7ab718c1b5f67b1554be61 SHA256 0ae0c406503dbc8342d5a4abc72d896ec0205317c9e6ec8690f71a40bd7bb8c4
-EBUILD xen-tools-4.1.1-r5.ebuild 10316 RMD160 92450a0dba081cda3e23e94072953b858538d31e SHA1 f1af2fba3958c0813b37adc16c82d69d720f2458 SHA256 80485abdbcaf256d21289f0cf260de671d72bbcc023bf49df3bd99db99b23720
-EBUILD xen-tools-4.1.1-r6.ebuild 10651 RMD160 993111049c34acbbf59857b3794e68319a50e301 SHA1 4af2c578e12f6f9b29490dc04488a956d526af4c SHA256 4147a0918b80cda6c22cfe4219c4767a5b2a50b65790852de9f33ce0c16122fd
-EBUILD xen-tools-4.1.2-r1.ebuild 10661 RMD160 e6d79f599d28ba19f8452f2cd953e537ca263a31 SHA1 9c5858944006f46cf53234a83867de8889ce44ea SHA256 e80e19f6fb1feebd4f52c55de17564792b32e2c8da89b5a6bc7eceee10f4d9f7
-EBUILD xen-tools-9999.ebuild 9797 RMD160 a295e2bc881a274318a8c1c047c5eb7f0d3c9873 SHA1 064ff777ba534f689303c4b89bfd23b9add7d1df SHA256 795b2d62d02001ee304880e0c9fa1611e12e969e7c94fb0e4aecb1a850ba7e13
-MISC ChangeLog 26416 RMD160 9dedc8200cef808e17460fc462dfa58b4697a00b SHA1 527ac5a862ec32895ab6b1bc476721a6564a929b SHA256 6177a750826abbe6084535a884b47bf43d5109c037a36bd320db079f54edffa3
-MISC metadata.xml 947 RMD160 96890462f83ee4a47c9c77993ba76ef82a732af5 SHA1 7ff424eead47cb6ce81930c10d3b22b0d8f73d61 SHA256 74f0e5bea356989a42fd4086d87271ed7c25331306acb333707476f53cac4d60
+DIST ipxe-git-v1.0.0.tar.gz 1996881 SHA256 d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723 SHA512 6921fb857ca615899a5912d5590ca36b6f46daf828b85edc75461c08a189d9fed71ee74a82e42724da7a1355e45070d28a0a61694b3a4872c3554390e4bb4147 WHIRLPOOL 160e24eea479c9d67a8a5c7c5182864904ee594167f061adc40a3e74974197b6befe2ecdb76af1c101ff1a5697b060dae71dd3f9f969c8e18054526584d57031
+DIST xen-4.1.2.tar.gz 10365786 SHA256 7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d SHA512 8f50f238b0b474ec5556279cbd51d704b4365033f2541a5d0376f287b26b7e8f0193172041109d97bb76d35ace3adf71e12f89f5766ff79a8ea861e7282f00d7 WHIRLPOOL 93a4bdd05125ef722464ef682798191c8b3db7228cbc0a27bcbe7932a7776491f90e727e1fcc4a9e7ec3eada7f56c567c07ad61cdda2f514109f702800fe5566

diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch b/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch
deleted file mode 100644
index be0527a..0000000
--- a/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urN xen-3.3.1/tools/ioemu-qemu-xen/xen-setup xen-3.3.1-fix/tools/ioemu-qemu-xen/xen-setup
---- xen-3.3.1/tools/ioemu-qemu-xen/xen-setup	2009-01-05 04:36:22.000000000 -0700
-+++ xen-3.3.1-fix/tools/ioemu-qemu-xen/xen-setup	2009-04-25 17:55:03.000000000 -0600
-@@ -3,6 +3,8 @@
- 
- # git-clean -x -d && ./xen-setup && make prefix=/usr CMDLINE_CFLAGS='-O0 -g' -j4 && make install DESTDIR=`pwd`/dist/ prefix=/usr && rsync -a --stats --delete . thule:shadow/qemu-iwj.git/ && rsync -a --stats dist/. root@thule:/
- 
-+target=i386-dm
-+
- rm -f $target/Makefile
- rm -f $target/config.mak
- rm -f config-host.mak
-@@ -11,8 +13,6 @@
- 
- ./configure --disable-gfx-check --disable-gcc-check --disable-curses --disable-slirp "$@" --prefix=/usr
- 
--target=i386-dm
--
- if [ "x$XEN_ROOT" != x ]; then
- 	echo "XEN_ROOT=$XEN_ROOT" >>config-host.mak
- fi

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch
deleted file mode 100644
index 5d97373..0000000
--- a/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- xen-3.4.2.orig/tools/libxc/Makefile	2009-11-10 16:12:56.000000000 +0100
-+++ xen-3.4.2/tools/libxc/Makefile	2009-12-12 18:46:27.547714651 +0100
-@@ -167,9 +167,8 @@
- xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D)
- xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D)
- 
--libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l)
- libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
--	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS)
-+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) $(call zlib-options,l)
- 
- -include $(DEPS)
- 

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch
deleted file mode 100644
index 403d612..0000000
--- a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- tools/blktap/lib/blktaplib.h.orig	2011-09-21 19:29:30.240868534 +0800
-+++ tools/blktap/lib/blktaplib.h	2011-09-21 19:34:21.184868372 +0800
-@@ -195,8 +195,13 @@
- 	pid_t     pid;
- } msg_pid_t;
- 
-+#ifndef READ
- #define READ 0
-+#endif
-+
-+#ifndef WRITE
- #define WRITE 1
-+#endif
- 
- /*Control Messages between manager and tapdev*/
- #define CTLMSG_PARAMS      1

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch
deleted file mode 100644
index 2fe3f05..0000000
--- a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- ./tools/blktap/drivers/blktapctrl.c	2011-09-20 00:27:01.846896986 +0800
-+++ ./tools/blktap/drivers/blktapctrl.c	2011-09-20 00:29:09.910897067 +0800
-@@ -40,6 +40,7 @@
- #include <err.h>
- #include <errno.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <sys/wait.h>
- #include <signal.h>
- #include <fcntl.h>
---- ./tools/blktap/drivers/block-qcow2.c     2011-09-22 04:15:49.339854677 +0800
-+++ ./tools/blktap/drivers/block-qcow2.c  2009-11-10 23:12:55.000000000 +0800
-@@ -26,6 +26,7 @@
- #include "aes.h"
- #include <assert.h>
- #include <stdint.h>
-+#include <sys/stat.h>
- #include <fcntl.h>
- #include <stdio.h>
- #include <stdlib.h>
---- ./tools/ioemu-qemu-xen/block-qcow2.c	2011-09-19 23:43:40.005898352 +0800
-+++ ./tools/ioemu-qemu-xen/block-qcow2.c	2011-09-19 23:26:53.979898723 +0800
-@@ -26,6 +26,7 @@
- #include <zlib.h>
- #include "aes.h"
- #include <assert.h>
-+#include <sys/stat.h>
-

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch
deleted file mode 100644
index fd77712..0000000
--- a/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- ./tools/fs-back/Makefile	2011-09-26 23:14:30.454759297 +0800
-+++ ./tools/fs-back/Makefile	2011-09-27 16:37:57.445748680 +0800
-@@ -23,7 +23,7 @@ 
- all: $(IBIN)
- 
- fs-backend: $(OBJS) fs-backend.c
--	$(CC) $(CFLAGS) -o fs-backend $(OBJS) $(LIBS) fs-backend.c
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o fs-backend $(OBJS) $(LIBS) fs-backend.c
- 
- install: all
- 	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR)
---- ./tools/libfsimage/common/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ ./tools/libfsimage/common/Makefile	2011-09-27 16:41:16.516748626 +0800
-@@ -6,7 +6,7 @@ 
- 
- LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
- LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
--LDFLAGS = $(LDFLAGS-y)
-+#LDFLAGS = $(LDFLAGS-y)
- 
- LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c
- 
---- ./tools/misc/lomount/Makefile	2011-09-27 14:23:26.596752233 +0800
-+++ ./tools/misc/lomount/Makefile	2011-09-27 16:37:57.445748680 +0800
-@@ -23,5 +23,5 @@ 
- 	$(RM) *.a *.so *.o *.rpm $(BIN)
- 
- %: %.c $(HDRS) Makefile
--	$(CC) $(CFLAGS) -o $@ $< 
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< 
- 

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch
deleted file mode 100644
index 8ca546b..0000000
--- a/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-Only in xen-3.4.2/: cflags.sh
-diff -ur xen-3.4.2.orig//config/StdGNU.mk xen-3.4.2//config/StdGNU.mk
---- xen-3.4.2.orig//config/StdGNU.mk	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//config/StdGNU.mk	2011-09-26 02:18:14.630771549 +0800
-@@ -48,7 +48,7 @@
- SHLIB_CFLAGS = -shared
- 
- ifneq ($(debug),y)
--CFLAGS += -O2 -fomit-frame-pointer
-+CFLAGS += -fomit-frame-pointer
- else
- # Less than -O1 produces bad code and large stack frames
- CFLAGS += -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls
-diff -ur xen-3.4.2.orig//config/SunOS.mk xen-3.4.2//config/SunOS.mk
---- xen-3.4.2.orig//config/SunOS.mk	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//config/SunOS.mk	2011-09-26 02:18:14.640771549 +0800
-@@ -45,7 +45,7 @@
- SHLIB_CFLAGS = -R $(SunOS_LIBDIR) -shared
- 
- ifneq ($(debug),y)
--CFLAGS += -O2 -fno-omit-frame-pointer
-+CFLAGS += -fno-omit-frame-pointer
- else
- # Less than -O1 produces bad code and large stack frames
- CFLAGS += -O1 -fno-omit-frame-pointer
-diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk
---- xen-3.4.2.orig//Config.mk	2011-09-26 02:17:29.221771569 +0800
-+++ xen-3.4.2//Config.mk	2011-09-26 02:18:14.686771549 +0800
-@@ -14,7 +14,7 @@
- 
- # Tools to run on system hosting the build
- HOSTCC      = gcc
--HOSTCFLAGS  = -Wall  -Wstrict-prototypes -O2 -fomit-frame-pointer
-+HOSTCFLAGS  = -Wall  -Wstrict-prototypes -fomit-frame-pointer
- HOSTCFLAGS += -fno-strict-aliasing
- 
- DISTDIR     ?= $(XEN_ROOT)/dist
-diff -ur xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk xen-3.4.2//extras/mini-os/arch/ia64/arch.mk
---- xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//extras/mini-os/arch/ia64/arch.mk	2011-09-26 02:18:14.689771549 +0800
-@@ -1,8 +1,8 @@
- 
- ARCH_CFLAGS := -mfixed-range=f2-f5,f12-f15,f32-f127 -mconstant-gp
--ARCH_CFLAGS += -O2
-+#ARCH_CFLAGS += -O2
- ARCH_ASFLAGS := -x assembler-with-cpp
--ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127 -fomit-frame-pointer
-+ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127
- ARCH_ASFLAGS += -fno-builtin -fno-common -fno-strict-aliasing -mconstant-gp
- 
- ARCH_LDFLAGS = -warn-common
-diff -ur xen-3.4.2.orig//stubdom/grub.patches/00cvs xen-3.4.2//stubdom/grub.patches/00cvs
---- xen-3.4.2.orig//stubdom/grub.patches/00cvs	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//stubdom/grub.patches/00cvs	2011-09-26 02:18:14.549771549 +0800
-@@ -223,8 +223,8 @@
- +++ grub/configure.ac	2008-04-10 23:26:50.000000000 +0100
- @@ -86,13 +86,13 @@ if test "x$ac_cv_prog_gcc" = xyes; then
-      fi
--     STAGE1_CFLAGS="-O2"
--     GRUB_CFLAGS="-O2"
-+     STAGE1_CFLAGS=""
-+     GRUB_CFLAGSS=""
- -    AC_CACHE_CHECK([whether optimization for size works], size_flag, [
- +    AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [
-        saved_CFLAGS=$CFLAGS
-@@ -237,7 +237,7 @@
- +    if test "x$grub_cv_cc_Os" = xyes; then
-        STAGE2_CFLAGS="-Os"
-      else
--       STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
-+       STAGE2_CFLAGS=" -fno-strength-reduce -fno-unroll-loops"
- @@ -100,16 +100,16 @@ if test "x$ac_cv_prog_gcc" = xyes; then
-      # OpenBSD has a GCC extension for protecting applications from
-      # stack smashing attacks, but GRUB doesn't want this feature.
-diff -ur xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure
---- xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure	2011-09-26 02:24:37.261771380 +0800
-@@ -1849,7 +1849,7 @@
- GCC=`test $ac_compiler_gnu = yes && echo yes`
- ac_test_CFLAGS=${CFLAGS+set}
- ac_save_CFLAGS=$CFLAGS
--CFLAGS="-g"
-+CFLAGS=""
- echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
- echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
- if test "${ac_cv_prog_cc_g+set}" = set; then
-@@ -1898,15 +1898,15 @@
-   CFLAGS=$ac_save_CFLAGS
- elif test $ac_cv_prog_cc_g = yes; then
-   if test "$GCC" = yes; then
--    CFLAGS="-g -O2"
-+    CFLAGS=""
-   else
--    CFLAGS="-g"
-+    CFLAGS=""
-   fi
- else
-   if test "$GCC" = yes; then
--    CFLAGS="-O2"
-+#    CFLAGS="-O2"
-   else
--    CFLAGS=
-+    CFLAGS=""
-   fi
- fi
- echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-Only in xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver: configure~
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure	2011-09-26 02:17:29.223771569 +0800
-+++ xen-3.4.2//tools/ioemu-qemu-xen/configure	2011-09-26 02:22:14.583771444 +0800
-@@ -464,7 +464,7 @@
- 
- 
- # default flags for all hosts
--CFLAGS="$CFLAGS -O2 -g -fno-strict-aliasing"
-+CFLAGS="$CFLAGS -g -fno-strict-aliasing"
- CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
- LDFLAGS="$LDFLAGS -g"
- if test "$werror" = "yes" ; then
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile	2009-11-05 19:44:56.000000000 +0800
-+++ xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile	2011-09-26 02:18:14.264771549 +0800
-@@ -12,7 +12,7 @@
- OBJCOPY = $(CROSS)objcopy
- 
- # we rely on GCC inline:ing the stuff we tell it to in many places here.
--CFLAGS  = -Winline -Wall -g -O2 -static
-+CFLAGS  = -Winline -Wall -g -static
- NOSTDFLAGS = -nostartfiles -nostdlib
- ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/cris/
- LDLIBS  =
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c	2009-11-05 19:44:56.000000000 +0800
-+++ xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c	2011-09-26 02:18:14.669771549 +0800
-@@ -6,7 +6,7 @@
- * http://www.linux.com/howtos/Assembly-HOWTO/mips.shtml
- *
- * mipsel-linux-gcc -nostdlib -mno-abicalls -fno-PIC -mabi=32 \
--*                  -O2 -static -o hello-mips hello-mips.c
-+*                  -static -o hello-mips hello-mips.c
- *
- */
- #define __NR_SYSCALL_BASE	4000
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile	2009-11-05 19:44:56.000000000 +0800
-+++ xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile	2011-09-26 02:18:14.262771549 +0800
-@@ -2,7 +2,7 @@
- -include ../config-host.mak
- VPATH=$(SRC_PATH)/tests
- 
--CFLAGS=-Wall -O2 -g -fno-strict-aliasing
-+CFLAGS=-Wall -g -fno-strict-aliasing
- #CFLAGS+=-msse2
- LDFLAGS=
- 
-@@ -52,7 +52,7 @@
- 
- .PHONY: test-mmap
- test-mmap: test-mmap.c
--	$(CC) $(CFLAGS) -Wall -static -O2 $(LDFLAGS) -o $@ $<
-+	$(CC) $(CFLAGS) -Wall -static $(LDFLAGS) -o $@ $<
- 	-./test-mmap
- 	-$(QEMU) ./test-mmap
- 	-$(QEMU) -p 8192 ./test-mmap 8192
-@@ -88,17 +88,17 @@
- 	arm-linux-ld -o $@ $<
- 
- hello-arm.o: hello-arm.c
--	arm-linux-gcc -Wall -g -O2 -c -o $@ $<
-+	arm-linux-gcc -Wall -g -c -o $@ $<
- 
- test-arm-iwmmxt: test-arm-iwmmxt.s
- 	cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
- 
- # MIPS test
- hello-mips: hello-mips.c
--	mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
-+	mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $<
- 
- hello-mipsel: hello-mips.c
--	mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
-+	mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $<
- 
- # testsuite for the CRIS port.
- test-cris:
-diff -ur xen-3.4.2.orig//tools/libaio/src/Makefile xen-3.4.2//tools/libaio/src/Makefile
---- xen-3.4.2.orig//tools/libaio/src/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/libaio/src/Makefile	2011-09-26 02:18:14.288771549 +0800
-@@ -6,7 +6,7 @@
- libdir=$(prefix)/lib
- 
- ARCH := $(shell uname -m | sed -e s/i.86/i386/)
--CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
-+CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -fPIC
- SO_CFLAGS=-shared $(CFLAGS)
- L_CFLAGS=$(CFLAGS)
- LINK_FLAGS=
-diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist
---- xen-3.4.2.orig//tools/libxen/Makefile.dist	2011-09-26 02:17:29.223771569 +0800
-+++ xen-3.4.2//tools/libxen/Makefile.dist	2011-09-26 02:18:14.553771549 +0800
-@@ -22,7 +22,7 @@
- CFLAGS = -Iinclude                     \
-          $(shell xml2-config --cflags) \
-          $(shell curl-config --cflags) \
--         -W -Wall -Wmissing-prototypes  -std=c99 -O2 -fPIC
-+         -W -Wall -Wmissing-prototypes  -std=c99 -fPIC
- 
- LDFLAGS = $(shell xml2-config --libs) \
-           $(shell curl-config --libs)
-diff -ur xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4 xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4
---- xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4	2011-09-26 02:18:14.659771549 +0800
-@@ -62,7 +62,7 @@
- CFLAGS += -Wno-unused-parameter 
- 
- CFLAGS += -g
--CFLAGS += -O2
-+#CFLAGS += -O2
- CFLAGS += -fno-strict-aliasing 
- CFLAGS += -fno-common 
- #CFLAGS += -fomit-frame-pointer
-diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk
---- xen-3.4.2.orig//extras/mini-os/minios.mk	2011-09-26 02:29:41.869771248 +0800
-+++ xen-3.4.2//extras/mini-os/minios.mk	2011-09-26 02:33:55.708771108 +0800
-@@ -23,7 +23,7 @@
- DEF_CFLAGS += -DGNT_DEBUG
- DEF_CFLAGS += -DGNTMAP_DEBUG
- else
--DEF_CFLAGS += -O3
-+#DEF_CFLAGS += -O3
- endif
- 
- # Make the headers define our internal stuff
-diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile
---- xen-3.4.2.orig//tools/vnet/libxutil/Makefile	2011-09-26 02:29:41.872771248 +0800
-+++ xen-3.4.2//tools/vnet/libxutil/Makefile	2011-09-26 02:37:59.835771029 +0800
-@@ -26,7 +26,7 @@
- 
- $(call cc-option-add,CFLAGS,CC,-fgnu89-inline)
- CFLAGS   +=  -fno-strict-aliasing
--CFLAGS   += -O3
-+#CFLAGS   += -O3
- #CFLAGS   += -g
- 
- MAJOR    := 3.0
-diff -ur xen-3.4.2.orig//tools/vnet/vnetd/Makefile xen-3.4.2//tools/vnet/vnetd/Makefile
---- xen-3.4.2.orig//tools/vnet/vnetd/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/vnet/vnetd/Makefile	2011-09-26 02:37:59.834771029 +0800
-@@ -44,7 +44,7 @@
- CPPFLAGS += -D __ARCH_I386_ATOMIC__
- 
- #----------------------------------------------------------------------------
--CFLAGS += -O3
-+#CFLAGS += -O3
- CFLAGS += $(INCLUDES) $(LIBS)
- 
- LDFLAGS += $(LIBS)
\ No newline at end of file

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch
deleted file mode 100644
index f9c746d..0000000
--- a/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch
+++ /dev/null
@@ -1,429 +0,0 @@
-diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk
---- xen-3.4.2.orig//Config.mk	2009-11-10 23:16:03.000000000 +0800
-+++ xen-3.4.2//Config.mk	2011-09-25 02:34:11.605793042 +0800
-@@ -14,7 +14,7 @@
- 
- # Tools to run on system hosting the build
- HOSTCC      = gcc
--HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-+HOSTCFLAGS  = -Wall  -Wstrict-prototypes -O2 -fomit-frame-pointer
- HOSTCFLAGS += -fno-strict-aliasing
- 
- DISTDIR     ?= $(XEN_ROOT)/dist
-diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk
---- xen-3.4.2.orig//extras/mini-os/minios.mk	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//extras/mini-os/minios.mk	2011-09-25 02:34:11.855793042 +0800
-@@ -6,7 +6,7 @@
- 
- # Define some default flags.
- # NB. '-Wcast-qual' is nasty, so I omitted it.
--DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls
-+DEF_CFLAGS += -fno-builtin -Wall  -Wredundant-decls -Wno-format -Wno-redundant-decls
- DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
- DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
- DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
-diff -ur xen-3.4.2.orig//tools/blktap/drivers/Makefile xen-3.4.2//tools/blktap/drivers/Makefile
---- xen-3.4.2.orig//tools/blktap/drivers/Makefile	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//tools/blktap/drivers/Makefile	2011-09-25 02:34:11.750793042 +0800
-@@ -5,7 +5,7 @@
- QCOW_UTIL    = img2qcow qcow2raw qcow-create
- LIBAIO_DIR   = ../../libaio/src
- 
--CFLAGS   += -Werror
-+CFLAGS   += 
- CFLAGS   += -Wno-unused
- CFLAGS   += -I../lib
- CFLAGS   += $(CFLAGS_libxenctrl)
-diff -ur xen-3.4.2.orig//tools/blktap/lib/Makefile xen-3.4.2//tools/blktap/lib/Makefile
---- xen-3.4.2.orig//tools/blktap/lib/Makefile	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//tools/blktap/lib/Makefile	2011-09-25 02:34:11.748793042 +0800
-@@ -13,7 +13,7 @@
- SRCS     :=
- SRCS     += xenbus.c blkif.c xs_api.c
- 
--CFLAGS   += -Werror
-+CFLAGS   += 
- CFLAGS   += -Wno-unused
- CFLAGS   += -fPIC
- # get asprintf():
-diff -ur xen-3.4.2.orig//tools/console/Makefile xen-3.4.2//tools/console/Makefile
---- xen-3.4.2.orig//tools/console/Makefile	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//tools/console/Makefile	2011-09-25 02:34:11.704793042 +0800
-@@ -2,7 +2,7 @@
- XEN_ROOT=../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS  += -Werror
-+CFLAGS  += 
- 
- CFLAGS  += $(CFLAGS_libxenctrl)
- CFLAGS  += $(CFLAGS_libxenstore)
-diff -ur xen-3.4.2.orig//tools/debugger/xenitp/Makefile xen-3.4.2//tools/debugger/xenitp/Makefile
---- xen-3.4.2.orig//tools/debugger/xenitp/Makefile	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//tools/debugger/xenitp/Makefile	2011-09-25 02:34:11.744793042 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=../../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--#CFLAGS  += -Werror -g -O0
-+#CFLAGS  +=  -g -O0
- 
- CFLAGS  += $(CFLAGS_libxenctrl)
- 
-diff -ur xen-3.4.2.orig//tools/firmware/Rules.mk xen-3.4.2//tools/firmware/Rules.mk
---- xen-3.4.2.orig//tools/firmware/Rules.mk	2009-11-10 23:12:55.000000000 +0800
-+++ xen-3.4.2//tools/firmware/Rules.mk	2011-09-25 02:34:11.565793045 +0800
-@@ -10,7 +10,7 @@
- CFLAGS += -DNDEBUG
- endif
- 
--CFLAGS += -Werror
-+CFLAGS += 
- 
- # Disable PIE/SSP if GCC supports them. They can break us.
- $(call cc-option-add,CFLAGS,CC,-nopie)
-diff -ur xen-3.4.2.orig//tools/flask/libflask/Makefile xen-3.4.2//tools/flask/libflask/Makefile
---- xen-3.4.2.orig//tools/flask/libflask/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/flask/libflask/Makefile	2011-09-25 02:34:11.657793042 +0800
-@@ -9,7 +9,7 @@
- SRCS       :=
- SRCS       += flask_op.c
- 
--CFLAGS   += -Werror
-+CFLAGS   += 
- CFLAGS   += -fno-strict-aliasing
- CFLAGS   += $(INCLUDES) -I./include -I$(XEN_LIBXC) -I$(XEN_INCLUDE)
- 
-diff -ur xen-3.4.2.orig//tools/flask/loadpolicy/Makefile xen-3.4.2//tools/flask/loadpolicy/Makefile
---- xen-3.4.2.orig//tools/flask/loadpolicy/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/flask/loadpolicy/Makefile	2011-09-25 02:34:11.660793042 +0800
-@@ -6,7 +6,7 @@
- LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask
- 
- PROFILE=#-pg
--BASECFLAGS=-Wall -g -Werror
-+BASECFLAGS=-Wall -g 
- BASECFLAGS+= $(PROFILE)
- #BASECFLAGS+= -I$(XEN_ROOT)/tools
- BASECFLAGS+= $(CFLAGS_libxenctrl)
-diff -ur xen-3.4.2.orig//tools/fs-back/Makefile xen-3.4.2//tools/fs-back/Makefile
---- xen-3.4.2.orig//tools/fs-back/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/fs-back/Makefile	2011-09-25 02:34:11.637793042 +0800
-@@ -5,7 +5,7 @@
- 
- IBIN         = fs-backend 
- 
--CFLAGS   += -Werror
-+CFLAGS   += 
- CFLAGS   += -Wno-unused
- CFLAGS   += -fno-strict-aliasing
- CFLAGS   += $(CFLAGS_libxenctrl)
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure	2009-11-05 19:44:56.000000000 +0800
-+++ xen-3.4.2//tools/ioemu-qemu-xen/configure	2011-09-25 02:34:11.888793042 +0800
-@@ -468,7 +468,7 @@
- CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
- LDFLAGS="$LDFLAGS -g"
- if test "$werror" = "yes" ; then
--CFLAGS="$CFLAGS -Werror"
-+CFLAGS="$CFLAGS"
- fi
- 
- if test "$solaris" = "no" ; then
-@@ -1150,7 +1150,7 @@
- echo "sparse enabled    $sparse"
- echo "profiler          $profiler"
- echo "static build      $static"
--echo "-Werror enabled   $werror"
-+
- if test "$darwin" = "yes" ; then
-     echo "Cocoa support     $cocoa"
- fi
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target	2011-09-25 02:33:23.946793064 +0800
-+++ xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target	2011-09-25 02:34:11.584793042 +0800
-@@ -26,7 +26,7 @@
- TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
- VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
- CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
--#CFLAGS+=-Werror
-+#CFLAGS+=
- LIBS=
- # user emulator name
- ifndef TARGET_ARCH2
-diff -ur xen-3.4.2.orig//tools/libaio/harness/Makefile xen-3.4.2//tools/libaio/harness/Makefile
---- xen-3.4.2.orig//tools/libaio/harness/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/libaio/harness/Makefile	2011-09-25 02:34:11.674793042 +0800
-@@ -4,7 +4,7 @@
- HARNESS_SRCS:=main.c
- # io_queue.c
- 
--CFLAGS=-Wall -Werror -g -O -laio
-+CFLAGS=-Wall  -g -O -laio
- #-lpthread -lrt
- 
- all: $(PROGS)
-diff -ur xen-3.4.2.orig//tools/libfsimage/Rules.mk xen-3.4.2//tools/libfsimage/Rules.mk
---- xen-3.4.2.orig//tools/libfsimage/Rules.mk	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/libfsimage/Rules.mk	2011-09-25 02:34:11.566793044 +0800
-@@ -1,6 +1,6 @@
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror
-+CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ 
- LDFLAGS += -L../common/
- 
- PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
-diff -ur xen-3.4.2.orig//tools/libxc/Makefile xen-3.4.2//tools/libxc/Makefile
---- xen-3.4.2.orig//tools/libxc/Makefile	2011-09-25 02:33:23.987793064 +0800
-+++ xen-3.4.2//tools/libxc/Makefile	2011-09-25 02:34:11.687793042 +0800
-@@ -52,7 +52,7 @@
- 
- -include $(XEN_TARGET_ARCH)/Makefile
- 
--CFLAGS   += -Werror -Wmissing-prototypes
-+CFLAGS   +=  -Wmissing-prototypes
- CFLAGS   += $(INCLUDES) -I. -I../xenstore -I../include
- 
- # Needed for posix_fadvise64() in xc_linux.c
-diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist
---- xen-3.4.2.orig//tools/libxen/Makefile.dist	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/libxen/Makefile.dist	2011-09-25 02:34:11.593793042 +0800
-@@ -22,7 +22,7 @@
- CFLAGS = -Iinclude                     \
-          $(shell xml2-config --cflags) \
-          $(shell curl-config --cflags) \
--         -W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC
-+         -W -Wall -Wmissing-prototypes  -std=c99 -O2 -fPIC
- 
- LDFLAGS = $(shell xml2-config --libs) \
-           $(shell curl-config --libs)
-diff -ur xen-3.4.2.orig//tools/misc/lomount/Makefile xen-3.4.2//tools/misc/lomount/Makefile
---- xen-3.4.2.orig//tools/misc/lomount/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/misc/lomount/Makefile	2011-09-25 02:34:11.666793042 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=../../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS  += -Werror
-+CFLAGS  += 
- 
- HDRS     = $(wildcard *.h)
- OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
-diff -ur xen-3.4.2.orig//tools/misc/Makefile xen-3.4.2//tools/misc/Makefile
---- xen-3.4.2.orig//tools/misc/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/misc/Makefile	2011-09-25 02:34:11.669793042 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS   += -Werror
-+CFLAGS   += 
- 
- INCLUDES += -I $(XEN_XC)
- INCLUDES += -I $(XEN_LIBXC)
-diff -ur xen-3.4.2.orig//tools/pygrub/setup.py xen-3.4.2//tools/pygrub/setup.py
---- xen-3.4.2.orig//tools/pygrub/setup.py	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/pygrub/setup.py	2011-09-25 02:34:11.901793042 +0800
-@@ -3,7 +3,7 @@
- import os
- import sys
- 
--extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
-+extra_compile_args  = [ "-fno-strict-aliasing" ]
- 
- XEN_ROOT = "../.."
- 
-diff -ur xen-3.4.2.orig//tools/python/setup.py xen-3.4.2//tools/python/setup.py
---- xen-3.4.2.orig//tools/python/setup.py	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/python/setup.py	2011-09-25 02:34:11.897793042 +0800
-@@ -4,7 +4,7 @@
- 
- XEN_ROOT = "../.."
- 
--extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
-+extra_compile_args  = [ "-fno-strict-aliasing" ]
- 
- include_dirs = [ XEN_ROOT + "/tools/libxc",
-                  XEN_ROOT + "/tools/xenstore",
-diff -ur xen-3.4.2.orig//tools/security/Makefile xen-3.4.2//tools/security/Makefile
---- xen-3.4.2.orig//tools/security/Makefile	2009-11-10 23:12:56.000000000 +0800
-+++ xen-3.4.2//tools/security/Makefile	2011-09-25 02:34:11.701793042 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT = ../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS   += -Werror
-+CFLAGS   += 
- CFLAGS   += -fno-strict-aliasing
- CFLAGS   += -I. $(CFLAGS_libxenctrl)
- 
-diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile
---- xen-3.4.2.orig//tools/vnet/libxutil/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/vnet/libxutil/Makefile	2011-09-25 02:34:11.694793042 +0800
-@@ -25,7 +25,7 @@
- PIC_OBJS := $(LIB_SRCS:.c=.opic)
- 
- $(call cc-option-add,CFLAGS,CC,-fgnu89-inline)
--CFLAGS   += -Werror -fno-strict-aliasing
-+CFLAGS   +=  -fno-strict-aliasing
- CFLAGS   += -O3
- #CFLAGS   += -g
- 
-diff -ur xen-3.4.2.orig//tools/vtpm/Rules.mk xen-3.4.2//tools/vtpm/Rules.mk
---- xen-3.4.2.orig//tools/vtpm/Rules.mk	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/vtpm/Rules.mk	2011-09-25 02:34:11.563793044 +0800
-@@ -9,7 +9,7 @@
- TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
- 
- # General compiler flags
--CFLAGS   = -Werror -g3 -I.
-+CFLAGS   =  -g3 -I.
- 
- # Generic project files
- HDRS	= $(wildcard *.h)
-diff -ur xen-3.4.2.orig//tools/vtpm_manager/Rules.mk xen-3.4.2//tools/vtpm_manager/Rules.mk
---- xen-3.4.2.orig//tools/vtpm_manager/Rules.mk	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/vtpm_manager/Rules.mk	2011-09-25 02:34:11.562793042 +0800
-@@ -9,7 +9,7 @@
- TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
- 
- # General compiler flags
--CFLAGS	= -Werror -g3 -I.
-+CFLAGS	=  -g3 -I.
- 
- # Generic project files
- HDRS	= $(wildcard *.h)
-diff -ur xen-3.4.2.orig//tools/xcutils/Makefile xen-3.4.2//tools/xcutils/Makefile
---- xen-3.4.2.orig//tools/xcutils/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xcutils/Makefile	2011-09-25 02:34:11.636793042 +0800
-@@ -11,7 +11,7 @@
- XEN_ROOT	= ../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS += -Werror
-+CFLAGS += 
- CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
- 
- PROGRAMS = xc_restore xc_save readnotes lsevtchn
-diff -ur xen-3.4.2.orig//tools/xenmon/Makefile xen-3.4.2//tools/xenmon/Makefile
---- xen-3.4.2.orig//tools/xenmon/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xenmon/Makefile	2011-09-25 02:34:11.641793042 +0800
-@@ -13,7 +13,7 @@
- XEN_ROOT=../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS  += -Werror
-+CFLAGS  += 
- CFLAGS  += -I $(XEN_XC)
- CFLAGS  += $(CFLAGS_libxenctrl)
- LDFLAGS += $(LDFLAGS_libxenctrl)
-diff -ur xen-3.4.2.orig//tools/xenpmd/Makefile xen-3.4.2//tools/xenpmd/Makefile
---- xen-3.4.2.orig//tools/xenpmd/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xenpmd/Makefile	2011-09-25 02:34:11.656793042 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS  += -Werror
-+CFLAGS  += 
- CFLAGS  += $(CFLAGS_libxenstore)
- LDFLAGS += $(LDFLAGS_libxenstore)
- 
-diff -ur xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile xen-3.4.2//tools/xenstat/libxenstat/Makefile
---- xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xenstat/libxenstat/Makefile	2011-09-25 02:34:11.681793042 +0800
-@@ -34,7 +34,7 @@
- OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o
- SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR)
- 
--WARN_FLAGS=-Wall -Werror
-+WARN_FLAGS=-Wall 
- 
- CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_INCLUDE)
- LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/
-diff -ur xen-3.4.2.orig//tools/xenstat/xentop/Makefile xen-3.4.2//tools/xenstat/xentop/Makefile
---- xen-3.4.2.orig//tools/xenstat/xentop/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xenstat/xentop/Makefile	2011-09-25 02:34:11.684793042 +0800
-@@ -18,7 +18,7 @@
- all install xentop:
- else
- 
--CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
-+CFLAGS += -DGCC_PRINTF -Wall  -I$(XEN_LIBXENSTAT)
- LDFLAGS += -L$(XEN_LIBXENSTAT)
- LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS)
- CFLAGS += -DHOST_$(XEN_OS)
-diff -ur xen-3.4.2.orig//tools/xenstore/Makefile xen-3.4.2//tools/xenstore/Makefile
---- xen-3.4.2.orig//tools/xenstore/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xenstore/Makefile	2011-09-25 02:34:11.640793042 +0800
-@@ -4,7 +4,7 @@
- MAJOR = 3.0
- MINOR = 0
- 
--CFLAGS += -Werror
-+CFLAGS += 
- CFLAGS += -I.
- CFLAGS += $(CFLAGS_libxenctrl)
- 
-diff -ur xen-3.4.2.orig//tools/xenstore/xenstored_core.c xen-3.4.2//tools/xenstore/xenstored_core.c
---- xen-3.4.2.orig//tools/xenstore/xenstored_core.c	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xenstore/xenstored_core.c	2011-09-25 02:34:11.845793042 +0800
-@@ -865,7 +865,7 @@
- {
- 	unsigned int offset, datalen;
- 	struct node *node;
--	char *vec[1] = { NULL }; /* gcc4 + -W + -Werror fucks code. */
-+	char *vec[1] = { NULL }; /* gcc4 + -W +  fucks code. */
- 	char *name;
- 
- 	/* Extra "strings" can be created by binary data. */
-diff -ur xen-3.4.2.orig//tools/xentrace/Makefile xen-3.4.2//tools/xentrace/Makefile
---- xen-3.4.2.orig//tools/xentrace/Makefile	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//tools/xentrace/Makefile	2011-09-25 02:34:11.745793042 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS  += -Werror
-+CFLAGS  += 
- 
- CFLAGS  += $(CFLAGS_libxenctrl)
- LDFLAGS += $(LDFLAGS_libxenctrl)
-Only in xen-3.4.2/: Werror.sh
-diff -ur xen-3.4.2.orig//xen/arch/ia64/Rules.mk xen-3.4.2//xen/arch/ia64/Rules.mk
---- xen-3.4.2.orig//xen/arch/ia64/Rules.mk	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//xen/arch/ia64/Rules.mk	2011-09-25 02:34:11.570793042 +0800
-@@ -68,7 +68,7 @@
- CFLAGS += -DCONFIG_XEN_IA64_TLBFLUSH_CLOCK
- endif
- ifeq ($(no_warns),y)
--CFLAGS	+= -Wa,--fatal-warnings -Werror -Wno-uninitialized
-+CFLAGS	+= -Wa,--fatal-warnings  -Wno-uninitialized
- endif
- ifneq ($(vhpt_disable),y)
- CFLAGS += -DVHPT_ENABLED=1
-diff -ur xen-3.4.2.orig//xen/arch/x86/boot/build32.mk xen-3.4.2//xen/arch/x86/boot/build32.mk
---- xen-3.4.2.orig//xen/arch/x86/boot/build32.mk	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//xen/arch/x86/boot/build32.mk	2011-09-25 02:34:11.914793042 +0800
-@@ -8,7 +8,7 @@
- $(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
- $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
- 
--CFLAGS += -Werror -fno-builtin -msoft-float
-+CFLAGS += -fno-builtin -msoft-float
- 
- # NB. awk invocation is a portable alternative to 'head -n -1'
- %.S: %.bin
-diff -ur xen-3.4.2.orig//xen/arch/x86/Rules.mk xen-3.4.2//xen/arch/x86/Rules.mk
---- xen-3.4.2.orig//xen/arch/x86/Rules.mk	2009-11-10 23:12:57.000000000 +0800
-+++ xen-3.4.2//xen/arch/x86/Rules.mk	2011-09-25 02:34:11.572793042 +0800
-@@ -17,7 +17,7 @@
- endif
- 
- CFLAGS += -fno-builtin -fno-common
--CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
-+CFLAGS += -iwithprefix include  -Wno-pointer-arith -pipe
- CFLAGS += -I$(BASEDIR)/include 
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default

diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch b/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch
deleted file mode 100644
index ba72c49..0000000
--- a/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Index: xen-tools-4.1.1/tools/libxl/libxl_dm.c
-===================================================================
---- xen-4.1.1.orig/tools/libxl/libxl_dm.c	Tue Mar 15 10:14:27 2011 +0000
-+++ xen-4.1.1/tools/libxl/libxl_dm.c	Tue Mar 15 18:19:47 2011 +0000
-@@ -828,8 +828,29 @@
-         goto out;
-     }
- 
--    if (nr_disks > 0 && !libxl__blktap_enabled(&gc))
--        ret = 1;
-+    if (nr_disks > 0) {
-+        int blktap_enabled = -1;
-+        for (i = 0; i < nr_disks; i++) {
-+            switch (disks[i].backend) {
-+            case DISK_BACKEND_TAP:
-+                if (blktap_enabled == -1)
-+                    blktap_enabled = libxl__blktap_enabled(&gc);
-+                if (!blktap_enabled) {
-+                    ret = 1;
-+                    goto out;
-+                }
-+                break;
-+
-+            case DISK_BACKEND_QDISK:
-+                ret = 1;
-+                goto out;
-+
-+            case DISK_BACKEND_PHY:
-+            case DISK_BACKEND_UNKNOWN:
-+                break;
-+            }
-+        }
-+    }
- 
- out:
-     libxl__free_all(&gc);
-

diff --git a/app-emulation/xen-tools/files/xend.initd-r1 b/app-emulation/xen-tools/files/xend.initd-r1
deleted file mode 100644
index d1e49b0..0000000
--- a/app-emulation/xen-tools/files/xend.initd-r1
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r1,v 1.1 2009/09/01 09:56:36 wschlich Exp $
-
-opts="start stop status restart"
-
-depend() {
-	need net
-	before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
-}
-
-await_daemons_up() {
-	for ((i=0; i<5; i++)); do
-		/usr/sbin/xend status && return 0
-		sleep 1
-	done
-	return 1
-}
-
-is_privileged_domain() {
-	grep -qsE '^control_d$' /proc/xen/capabilities
-	return $?
-}
-
-start() {
-	if is_privileged_domain ; then
-		ebegin "Starting Xen control daemon"
-		/usr/sbin/xend start && await_daemons_up
-		eend $?
-	else
-		eerror "Can't start xend - this is not a privileged domain."
-		return 1
-	fi
-}
-
-stop() {
-	if [ "$(xm list 2>/dev/null | wc -l)" -gt 2 ]; then
-		ebegin "Stopping all Xen domains"
-		/usr/sbin/xm shutdown --all --wait >/dev/null
-		eend $?
-	fi
-
-	ebegin "Stopping Xen control daemon"
-	/usr/sbin/xend stop
-	eend $?
-
-	#ebegin "Stopping xenconsoled"
-	#kill $(</var/run/xenconsoled.pid)
-	#eend $?
-
-	#ebegin "Stopping xenstored"
-	#kill $(</var/run/xenstore.pid)
-	#eend $?
-}
-
-restart() {
-	# IMPORTANT: do NOT restart xenstored/xenconsoled when restarting
-	# just xend, as this can be fatal!
-	# When restarting xend, leave alone xenstored/xenconsoled and all
-	# running domains.
-	# See http://article.gmane.org/gmane.comp.emulators.xen.user/40656
-	ebegin "Restarting Xen control daemon"
-	/usr/sbin/xend restart
-	eend $?
-	# we fool /etc/init.d/runscript.sh:svc_restart() here: svc_stop svc_start
-}
-
-status() {
-	is_privileged_domain && /usr/sbin/xend status
-}

diff --git a/app-emulation/xen-tools/files/xendomains.initd-r1 b/app-emulation/xen-tools/files/xendomains.initd-r1
deleted file mode 100755
index c7f6f88..0000000
--- a/app-emulation/xen-tools/files/xendomains.initd-r1
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r1,v 1.2 2011/10/13 19:30:37 alexxy Exp $
-
-opts="start stop status restart"
-
-depend() {
-	need xend
-	after dhcp
-}
-
-get_domname() {
-	local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
-
-	if [[ -z ${name_from_file} ]] ; then
-		basename "${1}"
-	else
-		echo ${name_from_file}	
-	fi
-}
-
-is_running() {
-	/usr/sbin/xm list "${1}" >/dev/null 2>&1
-}
-
-using_screen() {
-	[[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]]	
-}
-
-set_screen_cmd() {
-	screen_cmd="screen -c ${SCREENRC:-/dev/null} -q -r ${SCREEN_NAME:=xen} -X"
-}
-
-start() {
-	set_screen_cmd
-
-	einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}"
-	if using_screen ; then
-		ebegin "Creating screen session to hold domain consoles"
-		(  screen -c ${SCREENRC:-/dev/null} -d -m -S ${SCREEN_NAME} -t dom0 && sleep 3 \
-		&& ${screen_cmd} zombie dr \
-		&& logrotate -f /etc/xen/xen-consoles.logrotate \
-		&& ${screen_cmd} logfile  /var/log/xen-consoles/%t.log \
-		&& ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \
-		&& ${screen_cmd} log on \
-		&& ${screen_cmd} deflog on ) >/dev/null
-		if [[ $? -ne 0 ]] ; then
-			eend 1
-			return 1
-		else
-			eend
-		fi
-	fi
-	# Create all domains with config files in AUTODIR.
-	for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
-		name=$(get_domname ${dom})
-		if ! is_running ${name} ; then
-			ebegin "  Starting domain ${name}"
-			if using_screen ; then
-				${screen_cmd} screen -t ${name} xm create ${dom} -c
-			else
-				xm create --quiet ${dom}
-			fi
-			eend $?
-		else
-			einfo "  Not starting domain ${name} - already running"
-		fi
-	done
-}
-
-stop() {
-	set_screen_cmd
-
-	einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}"
-	# Stop all domains with config files in AUTODIR.
-	DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)"
-
-	if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then
-		for dom in $DOMAINS ; do
-			name=$(get_domname ${dom})
-			if is_running ${name} ; then
-				ebegin "  Asking domain ${name} to shutdown in the background..."
-				xm shutdown --wait ${name} >/dev/null &
-			else
-				einfo "  Not stopping domain ${name} - not running"
-			fi
-		done
-		einfo "  Waiting for shutdown of domains that are still running"
-		wait
-		eend $?
-	else
-		for dom in $DOMAINS ; do
-			name=$(get_domname ${dom})
-			if is_running ${name} ; then
-				ebegin "  Waiting for domain ${name} to shutdown"
-				xm shutdown --wait ${name} >/dev/null
-				eend $?
-			else
-				einfo "  Not stopping domain ${name} - not running"
-			fi
-		done
-	fi
-	if using_screen ; then
-		if ${screen_cmd} sleep 0 >/dev/null 2>&1 ; then
-			ebegin "Closing screen session ${SCREEN_NAME}"
-			${screen_cmd} quit
-			eend $?
-		else
-			eend 0
-		fi
-	fi
-}
-
-status() {
-	/usr/sbin/xm list
-}

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index 501368b..f4c43a5 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -7,11 +7,9 @@
 		<name>Ian Delaney aka idella4 proxy maintainer</name>
 	</maintainer>
 	<use>
-		<flag name='acm'>Enable the ACM/sHype XSM module from IBM for xen-3</flag>
 		<flag name='api'>Build the C libxenapi bindings</flag>
 		<flag name='flask'>Enable the Flask XSM module from NSA</flag>
 		<flag name='hvm'>Enable support for hardware based virtualization (VT-x,AMD-v)</flag>
-		<flag name='ioemu'>Enable IOEMU support</flag>
 		<flag name='qemu'>Enable IOEMU support via the use of qemu-dm</flag>
 		<flag name='pygrub'>Install the pygrub boot loader</flag>
 		<flag name='screen'>Enable support for running domain U console in an <pkg>app-misc/screen</pkg> session</flag>

diff --git a/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild b/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild
deleted file mode 100644
index c31830b..0000000
--- a/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild
+++ /dev/null
@@ -1,250 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild,v 1.4 2011/10/25 18:40:28 alexxy Exp $
-
-EAPI="3"
-
-inherit base flag-o-matic eutils multilib python toolchain-funcs
-
-# TPMEMUFILE=tpm_emulator-0.4.tar.gz
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
-#	vtpm? ( mirror://berlios/tpm-emulator/${TPMEMUFILE} )"
-S="${WORKDIR}/xen-${PV}"
-QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
-	/usr/share/xen/qemu/openbios-sparc64 \
-	/usr/share/xen/qemu/openbios-sparc32"
-QA_WX_LOAD="${QA_PRESTRIPPED}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc debug screen custom-cflags pygrub hvm api acm flask"
-
-CDEPEND="dev-lang/python[ncurses,threads]
-	sys-libs/zlib
-	hvm? ( media-libs/libsdl )
-	acm? ( dev-libs/libxml2 )
-	api? ( dev-libs/libxml2 net-misc/curl )"
-#	vtpm? ( dev-libs/gmp dev-libs/openssl )
-
-DEPEND="${CDEPEND}
-	sys-devel/gettext
-	sys-devel/gcc
-	dev-lang/perl
-	dev-lang/python[ssl]
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/transfig
-		media-gfx/graphviz
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? (
-		x11-proto/xproto
-		sys-devel/dev86
-	)"
-
-RDEPEND="${CDEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	dev-python/pyxml
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	|| ( sys-fs/udev sys-apps/hotplug )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
-	"${FILESDIR}/${PN}-3.3.0-nostrip.patch"
-	"${FILESDIR}/${PN}-3.3.1-sandbox-fix.patch"
-	"${FILESDIR}/${P}-as-needed.patch"
-	"${FILESDIR}/${P}-fix-definitions.patch"
-	"${FILESDIR}/${P}-fix-include.patch"
-	"${FILESDIR}/${P}-werror-idiocy-v2.patch"
-	"${FILESDIR}/${P}-ldflags-respect.patch"
-)
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
-	usr/share/xen/qemu/openbios-sparc64"
-
-pkg_setup() {
-	if [ -x /.config/ ]; then
-		die "the system has a dir /.config; this needs to be removed to allow the package to emerge"
-	fi
-
-	export "CONFIG_LOMOUNT=y"
-
-	if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
-		eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
-		eerror "an amd64 multilib profile is required. Remove the hvm use flag"
-		eerror "to build xen-tools on your current profile."
-		die "USE=hvm is unsupported on this system."
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-#	use vtpm    && export "VTPM_TOOLS=y"
-	use api     && export "LIBXENAPI_BINDINGS=y"
-	use acm     && export "ACM_SECURITY=y"
-	use flask   && export "FLASK_ENABLE=y"
-}
-
-src_prepare() {
-	base_src_prepare
-
-	#	use vtpm && cp "${DISTDIR}"/${TPMEMUFILE}  tools/vtpm
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	# Try and remove all the default custom-cflags
-	if use custom-cflags; then
-		epatch "${FILESDIR}/${P}-remove-default-cflags.patch"
-	fi
-
-	# Disable hvm support on systems that don't support x86_32 binaries.
-	if ! use hvm; then
-		chmod 644 tools/check/check_x11_devel
-		sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
-		sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
-	fi
-
-	if ! use pygrub; then
-		sed -i -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' "${S}"/tools/Makefile
-	fi
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt} || die "compile failed"
-
-	if use doc; then
-		sh ./docs/check_pkgs || die "package check failed"
-		emake docs || die "compiling docs failed"
-		emake dev-docs || die "make dev-docs failed"
-	fi
-
-	emake -C docs man-pages || die "make man-pages failed"
-}
-
-src_install() {
-	make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools  \
-		|| die "install failed"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/etc/sysconfig
-
-	# Remove unneeded static-libs
-	rm "${D}"/usr/lib64/libxenctrl.a "${D}"/usr/lib64/libxenguest.a \
-	"${D}"/usr/lib64/libflask.a "${D}"/usr/lib64/libxenstore.a \
-	"${D}"/usr/lib64/libblktap.a "${D}"/usr/lib64/libxenapi.a
-
-	dodoc README docs/README.xen-bugtool docs/ChangeLog
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \
-			|| die "install docs failed"
-
-		dohtml -r docs/api/
-		docinto pdf
-		dodoc docs/api/tools/python/latex/refman.pdf
-
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-	rm -rf "${D}"/usr/share/doc/xen/
-
-	doman docs/man?/*
-
-	newinitd "${FILESDIR}"/xend.initd-r1 xend \
-		|| die "Couldn't install xen.initd"
-	newconfd "${FILESDIR}"/xendomains.confd xendomains \
-		|| die "Couldn't install xendomains.confd"
-	newinitd "${FILESDIR}"/xendomains.initd-r1 xendomains \
-		|| die "Couldn't install xendomains.initd"
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/
-		keepdir /var/log/xen-consoles
-	fi
-
-	# xend expects these to exist
-	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
-
-	# for xendomains
-	keepdir /etc/xen/auto
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " http://www.gentoo.org/doc/en/xen-guide.xml"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
-		echo
-		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
-		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
-		ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
-	fi
-
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 multilib system is required to build HVM support."
-		echo
-		elog "The ioemu use flag has been removed and replaced with hvm."
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-
-	python_mod_optimize $(use pygrub && echo grub) xen
-}
-
-pkg_postrm() {
-	python_mod_cleanup $(use pygrub && echo grub) xen
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
similarity index 89%
rename from app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
index e27e24d..2a305e5 100644
--- a/app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
@@ -5,7 +5,7 @@
 EAPI="4"
 
 PYTHON_DEPEND="2"
-PYTHON_USE_WITH="xml"
+PYTHON_USE_WITH="xml threads"
 
 if [[ $PV == *9999 ]]; then
 	KEYWORDS=""
@@ -30,6 +30,9 @@ DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
 LICENSE="GPL-2"
 SLOT="0"
 IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend"
+
+REQUIRED_USE="hvm? ( qemu )"
+
 QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
 	/usr/share/xen/qemu/openbios-sparc64 \
 	/usr/share/xen/qemu/openbios-sparc32"
@@ -51,7 +54,7 @@ DEPEND="${CDEPEND}
 	dev-ml/findlib
 	doc? (
 		app-doc/doxygen
-		dev-tex/latex2html
+		dev-tex/latex2html[png,gif]
 		media-gfx/transfig
 		media-gfx/graphviz
 		dev-tex/xcolor
@@ -65,7 +68,9 @@ DEPEND="${CDEPEND}
 	hvm? (
 		x11-proto/xproto
 		sys-devel/dev86
-	)"
+	)
+	pygrub? ( dev-lang/python[ncurses] )
+	"
 
 RDEPEND="${CDEPEND}
 	sys-apps/iproute2
@@ -114,33 +119,8 @@ pkg_setup() {
 		fi
 	fi
 
-	if use doc && ! has_version "dev-tex/latex2html[png,gif]"; then
-		# die early instead of later
-		eerror "USE=doc requires latex2html with image support. Please add"
-		eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
-		die "latex2html missing both png and gif flags"
-	fi
-
-	if use pygrub && ! has_version "dev-lang/python[ncurses]"; then
-		eerror "USE=pygrub requires python to be built with ncurses support. Please add"
-		eerror "'ncurses' to your use flags and re-emerge python"
-		die "python is missing ncurses flags"
-	fi
-
-	if ! has_version "dev-lang/python[threads]"; then
-		eerror "Python is required to be built with threading support. Please add"
-		eerror "'threads' to your use flags and re-emerge python"
-		die "python is missing threads flags"
-	fi
-
 	use api     && export "LIBXENAPI_BINDINGS=y"
 	use flask   && export "FLASK_ENABLE=y"
-
-	if use hvm && ! use qemu; then
-		elog "With qemu disabled, it is not possible to use HVM machines " \
-			"or PVM machines with a framebuffer attached in the kernel config" \
-			"The addition of use flag qemu is required when use flag hvm ise selected"
-	fi
 }
 
 src_prepare() {
@@ -205,7 +185,7 @@ src_prepare() {
 	epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
 
 	# Remove check_curl, new fix to Bug #386487
-	epatch "${FILESDIR}/xen-tools-4.1.1-curl.patch"
+	epatch "${FILESDIR}/${PN}-4.1.1-curl.patch"
 	sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
 		tools/check/check_curl || die
 



^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
@ 2014-02-28  9:35 Lan Yixun
  0 siblings, 0 replies; 6+ messages in thread
From: Lan Yixun @ 2014-02-28  9:35 UTC (permalink / raw
  To: gentoo-commits

commit:     c87a500d3cf68b754f525e32cdc161c2aeb5de10
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 28 09:24:02 2014 +0000
Commit:     Lan Yixun <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Feb 28 09:24:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=c87a500d

app-emulation/xen-tools: bump 4.4.0_rc6

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

---
 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/files/fix-gold-ld.patch    |  14 +
 .../xen-tools/files/xen-4.2-configsxp.patch        |  24 ++
 .../xen-tools/files/xen-4.3-jserver.patch          |  32 ++
 .../xen-tools/files/xen-4.4-nostrip.patch          |  13 +
 .../xen-tools/files/xen-4.4-qemu-bridge.patch      |  79 ++++
 .../files/xen-tools-4-unbundle-ipxe.patch          |  33 ++
 .../xen-tools/files/xen-tools-4.3-ar-cc.patch      |  84 ++++
 .../xen-tools/files/xen-tools-4.4-api-fix.patch    |  48 +++
 app-emulation/xen-tools/files/xencommons.confd     |   4 +
 app-emulation/xen-tools/files/xencommons.initd     |  80 ++++
 app-emulation/xen-tools/files/xenconsoled.initd    |  23 +-
 app-emulation/xen-tools/files/xend.initd-r2        |  10 +-
 .../xen-tools/files/xendomains-screen.confd        |   4 +-
 app-emulation/xen-tools/files/xendomains.initd-r2  |  12 +-
 app-emulation/xen-tools/files/xenqemudev.confd     |   7 +
 app-emulation/xen-tools/files/xenqemudev.initd     |  81 ++++
 app-emulation/xen-tools/files/xenstored.initd      |  28 +-
 app-emulation/xen-tools/metadata.xml               |   6 +-
 app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild | 435 +++++++++++++++++++++
 20 files changed, 991 insertions(+), 27 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c7c17da..18f3b2a 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -3,3 +3,4 @@ DIST seabios-0-20121121.tar.bz2 2199282 SHA256 f7f67181c6c0b4cea3a9db48e2569fdcb
 DIST seabios-dir-remote-20130720.tar.gz 3201017 SHA256 0cf06b54e8ae1cfc25f2942eea1490a9e7e01f478541577025f6eef76e0c76de SHA512 e9ebe3711e3f678d3632f8e8e645f8be4fb65608aff04aeeb0e1152521bf571bc4d879f136d23bb0aa8bd4c4ec20f294b472cf54dc70916e52d330328aadd357 WHIRLPOOL 6138271f72fd96fabe3cffc07a6efcb9c0e195ed96f4ad708d00e85e0a84a03900dc41389cd4f26d533a3aa42142a9e17708d7b87d722f1c9348f61a5db3e59d
 DIST xen-4.2.2.tar.gz 15602746 SHA256 c9bfe91a5e72f8545acebad9889d64368020359bfe18044c0e683133e55ae005 SHA512 4943b18016ed8c2b194a3b55e6655b3b734b39ffb8cb7ee0a0580f2f4460a1d0e92e1de8ac23f5186272914fad1650586af51fd7c3644d0310eb16f2e11c5e80 WHIRLPOOL 519eb87cb2da694696cbc3e72070a0a3bdb07c46fa266d855d8379eec3a92adfa4d434af3ac01c37834ce4a9174081a6c40030b185a70902329b185cb8d0bbea
 DIST xen-4.3.0.tar.gz 16425975 SHA256 e1e9faabe4886e2227aacdbde74410653b233d66642ca1972a860cbec6439961 SHA512 e6b8f64e15e48704ea5cee5585cd6151fe6a5a62bc4670caf0b762c1aa71c9598db236c637ac34c42c92c6e8a5001acdd3d9d4b9305401a26273279358f481d6 WHIRLPOOL a91f14bc6535127ab17d3867b92fb3e008089453d5ba7996fd1d0b5c6d32a881c07df320f018c928e919f28de7b4ab4757c6bdb020e0cdb7d67960d4cab9dda0
+DIST xen-4.4.0-rc6.tar.gz 18116817 SHA256 0949d3d5c79312e3f053e6456216206e0c062d4f6962545521e972bc09a290dc SHA512 84d499ca725fd12fefb0cb345a5fd3ad52245863ca1700d90739a317349ea130418dc1bb83063b1c89378a862f4501847684e76363a338962ed64504ad935d6b WHIRLPOOL 20ff9d1f5317c228cf6d0bd01fab85864be49b3d3e72c928d6245363854693f9808c1bc002e99340592ed187d40f5257397505b5ec7547ef814774f9fe787292

diff --git a/app-emulation/xen-tools/files/fix-gold-ld.patch b/app-emulation/xen-tools/files/fix-gold-ld.patch
new file mode 100644
index 0000000..654eb25
--- /dev/null
+++ b/app-emulation/xen-tools/files/fix-gold-ld.patch
@@ -0,0 +1,14 @@
+diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
+index cbd60b4..d2b83dd 100644
+--- a/tools/libfsimage/common/Makefile
++++ b/tools/libfsimage/common/Makefile
+@@ -5,7 +5,7 @@ MAJOR = 1.0
+ MINOR = 0
+ 
+ LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
+-LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
++LDFLAGS-$(CONFIG_Linux) =
+ LDFLAGS = $(LDFLAGS-y)
+ 
+ CFLAGS += $(PTHREAD_CFLAGS)
+

diff --git a/app-emulation/xen-tools/files/xen-4.2-configsxp.patch b/app-emulation/xen-tools/files/xen-4.2-configsxp.patch
new file mode 100644
index 0000000..4c159c1
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.2-configsxp.patch
@@ -0,0 +1,24 @@
+diff -ur xen-4.2.1.orig/tools/examples/xend-config.sxp xen-4.2.1/tools/examples/xend-config.sxp
+--- tools/examples/xend-config.sxp	2012-12-17 23:00:23.000000000 +0800
++++ tools/examples/xend-config.sxp	2013-06-27 21:32:50.198221774 +0800
+@@ -200,7 +200,7 @@
+ #(network-script network-nat)
+ #(vif-script     vif-nat)
+ 
+-# dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
++# dom0-min-mem is the lowest permissible memory level (in kb) for dom0.
+ # This is a minimum both for auto-ballooning (as enabled by
+ # enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
+ (dom0-min-mem 196)
+diff -ur xen-4.2.1.orig/tools/python/xen/xend/tests/xend-config.sxp xen-4.2.1/tools/python/xen/xend/tests/xend-config.sxp
+--- tools/python/xen/xend/tests/xend-config.sxp	2012-12-17 23:01:27.000000000 +0800
++++ tools/python/xen/xend/tests/xend-config.sxp	2013-06-27 21:32:02.726225130 +0800
+@@ -116,7 +116,7 @@
+ 
+ 
+ # Dom0 will balloon out when needed to free memory for domU.
+-# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
++# dom0-min-mem is the lowest memory level (in kb) dom0 will get down to.
+ # If dom0-min-mem=0, dom0 will never balloon out.
+ (dom0-min-mem 196)
+ 

diff --git a/app-emulation/xen-tools/files/xen-4.3-jserver.patch b/app-emulation/xen-tools/files/xen-4.3-jserver.patch
new file mode 100644
index 0000000..514fd05
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.3-jserver.patch
@@ -0,0 +1,32 @@
+diff -ur xen-4.2.0.orig/tools/tests/x86_emulator/Makefile xen-4.2.0/tools/tests/x86_emulator/Makefile
+--- tools/tests/x86_emulator/Makefile	2012-09-17 18:21:19.000000000 +0800
++++ tools/tests/x86_emulator/Makefile	2012-11-24 05:06:24.355778737 +0800
+@@ -14,13 +14,13 @@
+ .PHONY: blowfish.h
+ blowfish.h:
+ 	rm -f blowfish.bin
+-	XEN_TARGET_ARCH=x86_32 make -f blowfish.mk all
++	XEN_TARGET_ARCH=x86_32 $(MAKE) -f blowfish.mk all
+ 	(echo "static unsigned int blowfish32_code[] = {"; \
+ 	od -v -t x blowfish.bin | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$$/,/';\
+ 	echo "};") >$@
+ 	rm -f blowfish.bin
+ ifeq ($(XEN_COMPILE_ARCH),x86_64)
+-	XEN_TARGET_ARCH=x86_64 make -f blowfish.mk all
++	XEN_TARGET_ARCH=x86_64 $(MAKE) -f blowfish.mk all
+ 	(echo "static unsigned int blowfish64_code[] = {"; \
+ 	od -v -t x blowfish.bin | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$$/,/';\
+ 	echo "};") >>$@
+
+diff -ur xen-4.2.0.orig/tools/firmware/vgabios/Makefile xen-4.2.0/tools/firmware/vgabios/Makefile
+--- tools/firmware/vgabios/Makefile	2013-02-04 13:56:50.973533544 +0800
++++ tools/firmware/vgabios/Makefile	2013-02-04 13:57:21.380535958 +0800
+@@ -27,7 +27,7 @@
+ 
+ .PHONY: release
+ release: 
+-	VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" make bios cirrus-bios
++	VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" $(MAKE) bios cirrus-bios
+ 	/bin/rm -f  *.o *.s *.ld86 \
+           temp.awk.* vgabios.*.orig _vgabios_.*.c core *.bak .#*
+ 	cp VGABIOS-lgpl-latest.bin ../$(RELEASE).bin

diff --git a/app-emulation/xen-tools/files/xen-4.4-nostrip.patch b/app-emulation/xen-tools/files/xen-4.4-nostrip.patch
new file mode 100644
index 0000000..7ddd354
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.4-nostrip.patch
@@ -0,0 +1,13 @@
+diff -ur xen-4.2.0.orig/tools/qemu-xen/Makefile.target xen-4.2.0/tools/qemu-xen/Makefile.target
+--- tools/qemu-xen/Makefile.target	2012-09-11 02:10:52.000000000 +0800
++++ tools/qemu-xen/Makefile.target	2012-11-22 07:13:38.894263291 +0800
+@@ -437,9 +437,6 @@
+ install: all
+ ifneq ($(PROGS),)
+ 	$(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+-ifneq ($(STRIP),)
+-	$(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS))
+-endif
+ endif
+ ifdef CONFIG_TRACE_SYSTEMTAP
+ ifdef CONFIG_TRACE_SYSTEMTAP

diff --git a/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch b/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch
new file mode 100644
index 0000000..8544561
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.4-qemu-bridge.patch
@@ -0,0 +1,79 @@
+diff --git a/tools/qemu-xen/Makefile b/tools/qemu-xen/Makefile
+index 4d257f1..db2c2ad 100644
+--- a/tools/qemu-xen/Makefile
++++ b/tools/qemu-xen/Makefile
+@@ -62,7 +62,7 @@ $(call set-vpath, $(SRC_PATH))
+ 
+ LIBS+=-lz $(LIBS_TOOLS)
+ 
+-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
++HELPERS-$(CONFIG_LINUX) = xen-bridge-helper$(EXESUF)
+ 
+ ifdef BUILD_DOCS
+ DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
+@@ -186,7 +186,7 @@ qemu-img$(EXESUF): qemu-img.o $(block-obj-y) libqemuutil.a libqemustub.a
+ qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) libqemuutil.a libqemustub.a
+ qemu-io$(EXESUF): qemu-io.o $(block-obj-y) libqemuutil.a libqemustub.a
+ 
+-qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
++xen-bridge-helper$(EXESUF): xen-bridge-helper.o
+ 
+ fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o libqemuutil.a libqemustub.a
+ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
+diff --git a/tools/qemu-xen/include/net/net.h b/tools/qemu-xen/include/net/net.h
+index 30e4b04..6691ff0 100644
+--- a/tools/qemu-xen/include/net/net.h
++++ b/tools/qemu-xen/include/net/net.h
+@@ -178,7 +178,7 @@ NetClientState *net_hub_port_find(int hub_id);
+ 
+ #define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
+ #define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
+-#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
++#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/xen-bridge-helper"
+ #define DEFAULT_BRIDGE_INTERFACE "br0"
+ 
+ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd);
+diff --git a/tools/qemu-xen/qemu-bridge-helper.c b/tools/qemu-xen/qemu-bridge-helper.c
+index 6a0974e..74b4635 100644
+--- a/tools/qemu-xen/qemu-bridge-helper.c
++++ b/tools/qemu-xen/qemu-bridge-helper.c
+@@ -67,7 +67,7 @@ typedef QSIMPLEQ_HEAD(ACLList, ACLRule) ACLList;
+ static void usage(void)
+ {
+     fprintf(stderr,
+-            "Usage: qemu-bridge-helper [--use-vnet] --br=bridge --fd=unixfd\n");
++            "Usage: xen-bridge-helper [--use-vnet] --br=bridge --fd=unixfd\n");
+ }
+ 
+ static int parse_acl_file(const char *filename, ACLList *acl_list)
+diff --git a/tools/qemu-xen/qemu-options.hx b/tools/qemu-xen/qemu-options.hx
+index d15338e..f7104f1 100644
+--- a/tools/qemu-xen/qemu-options.hx
++++ b/tools/qemu-xen/qemu-options.hx
+@@ -1601,7 +1601,7 @@ to disable script execution.
+ 
+ If running QEMU as an unprivileged user, use the network helper
+ @var{helper} to configure the TAP interface. The default network
+-helper executable is @file{/usr/local/libexec/qemu-bridge-helper}.
++helper executable is @file{/usr/local/libexec/xen-bridge-helper}.
+ 
+ @option{fd}=@var{h} can be used to specify the handle of an already
+ opened host TAP interface.
+@@ -1625,7 +1625,7 @@ qemu-system-i386 linux.img \
+ #launch a QEMU instance with the default network helper to
+ #connect a TAP device to bridge br0
+ qemu-system-i386 linux.img \
+-                 -net nic -net tap,"helper=/usr/local/libexec/qemu-bridge-helper"
++                 -net nic -net tap,"helper=/usr/local/libexec/xen-bridge-helper"
+ @end example
+ 
+ @item -netdev bridge,id=@var{id}[,br=@var{bridge}][,helper=@var{helper}]
+@@ -1634,7 +1634,7 @@ Connect a host TAP network interface to a host bridge device.
+ 
+ Use the network helper @var{helper} to configure the TAP interface and
+ attach it to the bridge. The default network helper executable is
+-@file{/usr/local/libexec/qemu-bridge-helper} and the default bridge
++@file{/usr/local/libexec/xen-bridge-helper} and the default bridge
+ device is @file{br0}.
+ 
+ Examples:

diff --git a/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch b/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch
new file mode 100644
index 0000000..902c9ac
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4-unbundle-ipxe.patch
@@ -0,0 +1,33 @@
+--- xen-4.2.0/tools/firmware/hvmloader/Makefile.orig	2012-05-27 21:57:04.481812859 +0100
++++ xen-4.2.0/tools/firmware/hvmloader/Makefile	2012-06-02 18:52:44.935034128 +0100
+@@ -48,7 +48,7 @@
+ else
+ CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin
+ endif
+-ETHERBOOT_ROMS := $(addprefix ../etherboot/ipxe/src/bin/, $(addsuffix .rom, $(ETHERBOOT_NICS)))
++ETHERBOOT_ROMS := $(addprefix /usr/share/ipxe/, $(addsuffix .rom, $(ETHERBOOT_NICS)))
+ endif
+ 
+ ROMS := 
+--- xen-4.2.0/Config.mk.orig	2012-05-27 21:57:04.479812884 +0100
++++ xen-4.2.0/Config.mk	2012-06-02 18:55:14.087169469 +0100
+@@ -206,7 +206,7 @@
+ # Wed Jun 26 16:30:45 2013 +0100
+ # xen: Don't perform SMP setup.
+ 
+-ETHERBOOT_NICS ?= rtl8139 8086100e
++ETHERBOOT_NICS ?= 10ec8139 8086100e
+ 
+ # Specify which qemu-dm to use. This may be `ioemu' to use the old
+ # Mercurial in-tree version, or a local directory, or a git URL.
+--- xen-4.2.0/tools/firmware/Makefile.orig	2012-05-27 21:57:04.480812871 +0100
++++ xen-4.2.0/tools/firmware/Makefile	2012-06-02 19:03:52.254691484 +0100
+@@ -10,7 +10,7 @@
+ #SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
+ SUBDIRS-$(CONFIG_ROMBIOS) += rombios
+ SUBDIRS-$(CONFIG_ROMBIOS) += vgabios
+-SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
++#SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
+ SUBDIRS-y += hvmloader
+ 
+ ovmf:

diff --git a/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch b/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch
new file mode 100644
index 0000000..174b404
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.3-ar-cc.patch
@@ -0,0 +1,84 @@
+diff -ur xen-4.3.0.orig/tools/debugger/gdbsx/gx/Makefile xen-4.3.0/tools/debugger/gdbsx/gx/Makefile
+--- tools/debugger/gdbsx/gx/Makefile	2013-07-09 18:46:56.000000000 +0800
++++ tools/debugger/gdbsx/gx/Makefile	2013-07-23 16:14:53.930752663 +0800
+@@ -3,6 +3,7 @@
+ 
+ GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o
+ GX_HDRS := $(wildcard *.h)
++AR="ar"
+ 
+ .PHONY: all
+ all: gx_all.a
+@@ -16,5 +17,5 @@
+ #	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+ gx_all.a: $(GX_OBJS) Makefile $(GX_HDRS)
+-	ar cr $@ $(GX_OBJS)        # problem with ld using -m32 
++	$(AR) cr $@ $(GX_OBJS)        # problem with ld using -m32 
+ 
+diff -ur xen-4.3.0.orig/tools/firmware/rombios/Makefile xen-4.3.0/tools/firmware/rombios/Makefile
+--- tools/firmware/rombios/Makefile	2013-07-09 18:46:56.000000000 +0800
++++ tools/firmware/rombios/Makefile	2013-07-23 21:57:21.258085143 +0800
+@@ -1,5 +1,6 @@
+ XEN_ROOT = $(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
++CC="gcc"
+ 
+ SUBDIRS := 32bit
+ 
+@@ -16,7 +17,7 @@
+ 	rm -f  $(DEPS)
+ 
+ BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c
+-	gcc -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c
++	$(CC) -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c
+ 	bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c
+ 	sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s
+ 	as86 _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt
+@@ -26,6 +27,6 @@
+ 	rm -f _rombios_.s
+ 
+ biossums: biossums.c
+-	gcc -o biossums biossums.c
++	$(CC) -o biossums biossums.c
+ 
+ -include $(DEPS)
+diff -ur xen-4.3.0.orig/tools/firmware/vgabios/Makefile xen-4.3.0/tools/firmware/vgabios/Makefile
+--- tools/firmware/vgabios/Makefile	2013-07-09 18:46:56.000000000 +0800
++++ tools/firmware/vgabios/Makefile	2013-07-23 22:42:39.041261388 +0800
+@@ -37,7 +37,7 @@
+ 	tar czvf ../$(RELEASE).tgz --exclude CVS -C .. $(RELEASE)/
+ 
+ vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h
+-	$(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c
++	$(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE $(VGABIOS_DATE) > _vgabios_.c
+ 	$(BCC) -o vgabios.s -C-c -D__i86__ -S -0 _vgabios_.c
+ 	sed -e 's/^\.text//' -e 's/^\.data//' vgabios.s > _vgabios_.s
+ 	$(AS86) _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt
+@@ -47,7 +47,7 @@
+ 	ls -l VGABIOS-lgpl-latest.bin
+ 
+ vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h
+-	$(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c
++	$(CC) -E -P vgabios.c $(VGABIOS_VERS) -DVBE -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c
+ 	$(BCC) -o vgabios-debug.s -C-c -D__i86__ -S -0 _vgabios-debug_.c
+ 	sed -e 's/^\.text//' -e 's/^\.data//' vgabios-debug.s > _vgabios-debug_.s
+ 	$(AS86) _vgabios-debug_.s -b vgabios.debug.bin -u -w- -g -0 -j -O -l vgabios.debug.txt
+@@ -57,7 +57,7 @@
+ 	ls -l VGABIOS-lgpl-latest.debug.bin
+ 
+ vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c
+-	$(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c
++	$(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus_.c
+ 	$(BCC) -o vgabios-cirrus.s -C-c -D__i86__ -S -0 _vgabios-cirrus_.c
+ 	sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus.s > _vgabios-cirrus_.s
+ 	$(AS86) _vgabios-cirrus_.s -b vgabios-cirrus.bin -u -w- -g -0 -j -O -l vgabios-cirrus.txt
+@@ -67,7 +67,7 @@
+ 	ls -l VGABIOS-lgpl-latest.cirrus.bin
+ 
+ vgabios-cirrus.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c
+-	$(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c
++	$(CC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG -DPCIBIOS $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c
+ 	$(BCC) -o vgabios-cirrus-debug.s -C-c -D__i86__ -S -0 _vgabios-cirrus-debug_.c
+ 	sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus-debug.s > _vgabios-cirrus-debug_.s
+ 	$(AS86) _vgabios-cirrus-debug_.s -b vgabios-cirrus.debug.bin -u -w- -g -0 -j -O -l vgabios-cirrus.debug.txt

diff --git a/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch b/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch
new file mode 100644
index 0000000..fc0124c
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.4-api-fix.patch
@@ -0,0 +1,48 @@
+diff --git a/tools/configure b/tools/configure
+index afc3000..6187468 100755
+--- a/tools/configure
++++ b/tools/configure
+@@ -4615,7 +4615,7 @@ if test x"${PERL}" = x"no"
+ then
+     as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5
+ fi
+-if test "x$xapi" = "xy"; then :
++if test "x$xenapi" = "xy"; then :
+ 
+     # Extract the first word of "curl-config", so it can be a program name with args.
+ set dummy curl-config; ac_word=$2
+diff --git a/tools/configure.ac b/tools/configure.ac
+index 0754f0e..cc884f7 100644
+--- a/tools/configure.ac
++++ b/tools/configure.ac
+@@ -150,7 +150,7 @@ AC_PROG_INSTALL
+ AC_PATH_PROG([BISON], [bison])
+ AC_PATH_PROG([FLEX], [flex])
+ AX_PATH_PROG_OR_FAIL([PERL], [perl])
+-AS_IF([test "x$xapi" = "xy"], [
++AS_IF([test "x$xenapi" = "xy"], [
+     AX_PATH_PROG_OR_FAIL([CURL], [curl-config])
+     AX_PATH_PROG_OR_FAIL([XML], [xml2-config])
+ ])
+diff --git a/tools/libxen/Makefile b/tools/libxen/Makefile
+index b66f0bc..94b854b 100644
+--- a/tools/libxen/Makefile
++++ b/tools/libxen/Makefile
+@@ -22,12 +22,15 @@ MAJOR = 1.0
+ MINOR = 0
+ 
+ CFLAGS += -Iinclude                     \
+-          $(shell $(XML2_CONFIG) --cflags) \
+-          $(shell $(CURL_CONFIG) --cflags) \
+           -fPIC
+ 
++ifeq ($(LIBXENAPI_BINDINGS),y)
++CFLAGS += $(shell $(XML2_CONFIG) --cflags) \
++          $(shell $(CURL_CONFIG) --cflags)
++
+ LDFLAGS += $(shell $(XML2_CONFIG) --libs) \
+            $(shell $(CURL_CONFIG) --libs)
++endif
+ 
+ LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h
+ LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))

diff --git a/app-emulation/xen-tools/files/xencommons.confd b/app-emulation/xen-tools/files/xencommons.confd
new file mode 100644
index 0000000..b9e2248
--- /dev/null
+++ b/app-emulation/xen-tools/files/xencommons.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/xencommons
+
+# Load xen's kernel modules, and this will override defaults
+XEN_KERNEL_MODULES=""

diff --git a/app-emulation/xen-tools/files/xencommons.initd b/app-emulation/xen-tools/files/xencommons.initd
new file mode 100644
index 0000000..5ece118
--- /dev/null
+++ b/app-emulation/xen-tools/files/xencommons.initd
@@ -0,0 +1,80 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xencommons.initd,v 1.1 2013/12/06 23:34:11 idella4 Exp $
+
+depend() {
+	before xenstored
+}
+
+is_privileged_domain() {
+	grep -qsE '^control_d$' /proc/xen/capabilities
+	return $?
+}
+
+handle_kernel_modules() {
+	local XEN_DEFAULT_KERNEL_MODULES="
+		xen-evtchn
+		xen-gntdev
+		xen-gntalloc
+		xen-blkback
+		xen-netback
+		xen-pciback
+		gntdev
+		netbk
+		blkbk
+		xen-scsibk
+		usbbk
+		pciback
+		xen-acpi-processor
+		blktap2
+		blktap
+	"
+
+	[ "$1" = "remove" ] && OPTS="-r"
+
+	XEN_KERNEL_MODULES="${XEN_KERNEL_MODULES:-${XEN_DEFAULT_KERNEL_MODULES}}"
+	for i in ${XEN_KERNEL_MODULES}; do
+		modprobe ${OPTS} $i 2>/dev/null
+	done
+	return 0
+}
+
+start() {
+	ebegin "Starting xencommons daemon"
+
+	# not running in Xen dom0 or domU
+	if [ ! -d /proc/xen ]; then
+		eend 1 "Not running in Xen mode"
+		return 1
+	fi
+
+	# mount xenfs in dom0 or domU with a pv_ops kernel
+	if ! test -f /proc/xen/capabilities && \
+	   ! grep '^xenfs ' /proc/mounts >/dev/null;
+	then
+		mount -t xenfs xenfs /proc/xen
+	fi
+
+	if ! is_privileged_domain; then
+		eend 1 "Not running on a privileged domain. xencommons not started"
+		return 1
+	fi
+
+	handle_kernel_modules
+
+	eend $? "Failed to start xencommons"
+}
+
+stop () {
+	ebegin "Stopping xencommons"
+	if ! is_privileged_domain; then
+		eend 1 "Not running on a privileged domain. xencommons not started"
+		return 1
+	fi
+
+	handle_kernel_modules remove
+
+	eend $? "Failed to stop xencommons"
+}
+

diff --git a/app-emulation/xen-tools/files/xenconsoled.initd b/app-emulation/xen-tools/files/xenconsoled.initd
index 12e4381..e2d245f 100644
--- a/app-emulation/xen-tools/files/xenconsoled.initd
+++ b/app-emulation/xen-tools/files/xenconsoled.initd
@@ -1,25 +1,34 @@
 #!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenconsoled.initd,v 1.1 2011/04/05 19:23:05 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenconsoled.initd,v 1.6 2014/02/13 07:59:09 dlan Exp $
 
 depend() {
 	need xenstored
+	after lvm
+}
+
+# bug #498720
+shutdown_all_domU() {
+	# Note: shutdown all domU, including manually started ones
+	local V=$(xl info| awk "/xen_minor/ { print \$3 }")
+	# 4.2.2 do not support "-a" option
+	[ $V -gt 2 ] && xl shutdown -a -w >/dev/null
 }
 
 start() {
 	ebegin "Starting xenconsoled daemon"
 	start-stop-daemon --start --exec /usr/sbin/xenconsoled \
-		--pidfile /var/run/xenconsoled.pid \
-		-- --pid-file=/var/run/xenconsoled.pid \
+		--pidfile /run/xenconsoled.pid \
+		-- --pid-file=/run/xenconsoled.pid \
 		${XENCONSOLED_OPTS}
 	eend $*
 }
 
 stop() {
-	ebegin "Stoping xenconsoled daemon"
+	ebegin "Stopping xenconsoled daemon"
+	shutdown_all_domU
 	start-stop-daemon --stop --exec /usr/sbin/xenconsoled \
-		--pidfile /var/run/xenconsoled.pid
+		--pidfile /run/xenconsoled.pid
 	eend $*
 }
-

diff --git a/app-emulation/xen-tools/files/xend.initd-r2 b/app-emulation/xen-tools/files/xend.initd-r2
index e7b6ec0..837decc 100644
--- a/app-emulation/xen-tools/files/xend.initd-r2
+++ b/app-emulation/xen-tools/files/xend.initd-r2
@@ -1,7 +1,9 @@
 #!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r2,v 1.2 2011/09/10 17:22:46 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r2,v 1.5 2014/01/02 04:58:53 idella4 Exp $
+
+extra_commands="status"
 
 depend() {
 	need net xenconsoled xenstored
@@ -44,3 +46,7 @@ stop() {
 	/usr/sbin/xend stop
 	eend $?
 }
+
+status() {
+	is_privileged_domain && /usr/sbin/xend status
+}

diff --git a/app-emulation/xen-tools/files/xendomains-screen.confd b/app-emulation/xen-tools/files/xendomains-screen.confd
index a180c13..e75e19d 100644
--- a/app-emulation/xen-tools/files/xendomains-screen.confd
+++ b/app-emulation/xen-tools/files/xendomains-screen.confd
@@ -2,11 +2,11 @@
 
 # Directory of domains to boot. AUTODIR should contain one or more symlinks
 # to domain config files in /etc/xen
-AUTODIR=/etc/xen/auto
+# AUTODIR=/etc/xen/auto
 
 # Send shutdown commands to all domains in parallel instead of waiting for
 # each to shutdown individually
-PARALLEL_SHUTDOWN=yes
+# PARALLEL_SHUTDOWN=yes
 
 # When SCREEN="yes", domains in AUTODIR have their consoles connected to a
 # screen session named SCREEN_NAME, with output logged to individual files 

diff --git a/app-emulation/xen-tools/files/xendomains.initd-r2 b/app-emulation/xen-tools/files/xendomains.initd-r2
index b7c72e1..103384c 100644
--- a/app-emulation/xen-tools/files/xendomains.initd-r2
+++ b/app-emulation/xen-tools/files/xendomains.initd-r2
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r2,v 1.6 2013/02/24 10:39:11 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r2,v 1.8 2013/07/27 06:11:03 idella4 Exp $
 
 extra_commands="status"
 
@@ -13,10 +13,10 @@ depend() {
 get_domname() {
 	local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
 
-	if [[ -z ${name_from_file} ]] ; then
+	if [ -z ${name_from_file} ] ; then
 		basename "${1}"
 	else
-		echo ${name_from_file}
+		echo ${name_from_file}	
 	fi
 }
 
@@ -25,7 +25,7 @@ is_running() {
 }
 
 using_screen() {
-	[[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]]
+	[ "${SCREEN}" = "yes" -o "${SCREEN}" = "YES" ]
 }
 
 set_screen_cmd() {
@@ -46,7 +46,7 @@ start() {
 		&& ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \
 		&& ${screen_cmd} log on \
 		&& ${screen_cmd} deflog on ) >/dev/null
-		if [[ $? -ne 0 ]] ; then
+		if [ $? -ne 0 ] ; then
 			eend 1
 			return 1
 		else
@@ -77,7 +77,7 @@ stop() {
 	# Stop all domains with config files in AUTODIR.
 	DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)"
 
-	if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then
+	if [[ "$PARALLEL_SHUTDOWN" == "yes" ]] ; then
 		for dom in $DOMAINS ; do
 			name=$(get_domname ${dom})
 			if is_running ${name} ; then

diff --git a/app-emulation/xen-tools/files/xenqemudev.confd b/app-emulation/xen-tools/files/xenqemudev.confd
new file mode 100644
index 0000000..5b49520
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenqemudev.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/xenqemudev
+
+# To enable QEMU file backend, set to 'yes'
+XENQEMUDEV_FILE_BACKEND_ENABLE=""
+
+# Common options for xenqemudev
+XENQEMUDEV_OPTS=""

diff --git a/app-emulation/xen-tools/files/xenqemudev.initd b/app-emulation/xen-tools/files/xenqemudev.initd
new file mode 100644
index 0000000..6f7066e
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenqemudev.initd
@@ -0,0 +1,81 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenqemudev.initd,v 1.2 2013/12/07 06:49:41 idella4 Exp $
+
+depend() {
+	need xencommons xenstored xenconsoled
+}
+
+is_privileged_domain() {
+	grep -qsE '^control_d$' /proc/xen/capabilities
+	return $?
+}
+
+xen_setvars() {
+	. /etc/xen/scripts/hotplugpath.sh
+
+	XENQEMUDEV_PIDFILE=/run/xenqemudev.pid
+	XEN_QEMU="${LIBEXEC}/qemu-system-i386"
+}
+
+xen_qemu_start() {
+	if [ -z "${XENQEMUDEV_FILE_BACKEND_ENABLE}" ]; then
+		ewarn " QEMU disk backend not enabled"
+		ewarn " enable XENQEMUDEV_FILE_BACKEND_ENABLE in /etc/conf.d/xenqemudev"
+		return 1
+	fi
+
+	xen_setvars
+
+	if [ ! -c /dev/xen/gntdev ]; then
+		einfo " Xen gntdev driver not loaded"
+		return 1
+	fi
+
+	if [ -e "${XEN_QEMU}" ]; then
+		einfo " Starting QEMU as disk backend for dom0"
+
+		XENQEMUDEV_DEFAULT_OPTS="-xen-domid 0 -xen-attach -name dom0 \
+			-nographic -M xenpv -daemonize \
+			-monitor /dev/null -serial /dev/null -parallel /dev/null"
+
+		XENQEMUDEV_OPTS=${XENQEMUDEV_OPTS:-${XENQEMUDEV_DEFAULT_OPTS}}
+
+		start-stop-daemon --start --exec ${XEN_QEMU} \
+			--pidfile ${XENQEMUDEV_PIDFILE} \
+			-- -pidfile ${XENQEMUDEV_PIDFILE} \
+			${XENQEMUDEV_OPTS}
+		return $?
+	fi
+}
+
+start() {
+	ebegin "Starting xenqemudev daemon"
+
+	# not running in Xen dom0 or domU
+	if [ ! -d /proc/xen ]; then
+		eend 1 "Not running in Xen mode"
+		return 1
+	fi
+
+	if ! is_privileged_domain; then
+		eend 1 "Not running on a privileged domain. xenqemudev not started"
+		return 1
+	fi
+
+	xen_qemu_start
+
+	eend $? "Failed to start xenqemudev"
+}
+
+stop () {
+	ebegin "Stopping xenqemudev"
+
+	xen_setvars
+
+	start-stop-daemon --stop --exec ${XEN_QEMU} \
+		--pidfile ${XENQEMUDEV_PIDFILE}
+
+	eend $? "Stopping xenqemudev, as it cannot be restarted."
+}

diff --git a/app-emulation/xen-tools/files/xenstored.initd b/app-emulation/xen-tools/files/xenstored.initd
index 108da29..09009ea 100755
--- a/app-emulation/xen-tools/files/xenstored.initd
+++ b/app-emulation/xen-tools/files/xenstored.initd
@@ -1,28 +1,44 @@
 #!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenstored.initd,v 1.3 2013/03/16 16:46:57 idella4 Exp $
 
 depend() {
 	before xendomains xend sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
+	need xencommons
+}
+
+xenstored_dir_check() {
+	# create dir dynamically
+	local i
+	for i in /var/lock/subsys /run/xen /run/xend/boot /run/xenstored; do
+		[ -x $i ] || mkdir -p $i
+	done
 }
 
 start() {
 	ebegin "Starting xenstored daemon"
+	xenstored_dir_check
 	start-stop-daemon --start --exec /usr/sbin/xenstored \
-		--pidfile /var/run/xenstored.pid \
-		-- --pid-file=/var/run/xenstored.pid \
+		--pidfile /run/xenstored.pid \
+		-- --pid-file=/run/xenstored.pid \
 		$XENSTORED_OPTS
-	sleep 15
+	until xenstore-exists \ || ((15 < ++i))
+	do
+		echo -n .
+		sleep 1
+	done
 	einfo "Setting domain0 name record"
 	/usr/bin/xenstore-write "/local/domain/0/name" "Domain-0"
+	local V=$(xl info| awk "/xen_minor/ { print \$3 }")
+	[ $V -ge 4 ] && /usr/bin/xenstore-write "/local/domain/0/domid" 0
+
 	eend $*
 }
 
 stop() {
 	ebegin "Stopping xenstored daemon"
 	start-stop-daemon --stop --exec /usr/sbin/xenstored \
-		--pidfile /var/run/xenstored.pid
+		--pidfile /run/xenstored.pid
 	eend $?
 }
 

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index 6101069..bd4d8c1 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -2,10 +2,6 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
 	<herd>xen</herd>
-	<maintainer>
-		<email>idella4@gentoo.org</email>
-		<name>Ian Delaney</name>
-	</maintainer>
 	<use>
 		<flag name='api'>Build the C libxenapi bindings</flag>
 		<flag name='flask'>Enable the Flask XSM module from NSA</flag>
@@ -14,5 +10,7 @@
 		<flag name='pygrub'>Install the pygrub boot loader</flag>
 		<flag name='screen'>Enable support for running domain U console in an <pkg>app-misc/screen</pkg> session</flag>
 		<flag name='xend'>Enable support the xend and xm to manage xen</flag>
+		<flag name='ocaml'>Enable support for the ocaml language</flag>
+		<flag name='pam'>Enable pam support</flag>
 	</use>
 </pkgmetadata>

diff --git a/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild b/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild
new file mode 100644
index 0000000..29af48a
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.4.0_rc6.ebuild
@@ -0,0 +1,435 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.3.1-r3.ebuild,v 1.4 2013/12/22 12:01:08 idella4 Exp $
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~x86"
+	UPSTREAM_VER=
+	GENTOO_VER=
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTRAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	${UPSTRAM_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make 
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc xsm flask hvm qemu ocaml +pam python pygrub screen static-libs xend"
+
+REQUIRED_USE="hvm? ( qemu )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )"
+
+DEPEND="dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libgcrypt
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	sys-libs/zlib
+	sys-power/iasl
+	sys-firmware/seabios
+	sys-firmware/ipxe
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	sys-devel/bin86
+	sys-devel/dev86
+	dev-lang/perl
+	app-misc/pax-utils
+	dev-python/markdown
+	doc? (
+		app-doc/doxygen
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+RDEPEND="sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	if has_version dev-libs/libgcrypt; then
+		export "CONFIG_GCRYPT=y"
+	fi
+	if use xsm; then
+		export "XSM_ENABLE=y"
+		if use flask; then
+			export "FLASK_ENABLE=y"
+		fi
+	else
+		export "XSM_ENABLE=n"
+	fi
+
+	if use qemu; then
+		export "CONFIG_IOEMU=y"
+	else
+		export "CONFIG_IOEMU=n"
+	fi
+
+	if use xend; then
+		export "CONFIG_XEND=y"
+	else
+		export "CONFIG_XEND=n"
+	fi
+
+	if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
+		eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
+		eerror "an amd64 multilib profile is required. Remove the hvm use flag"
+		eerror "to build xen-tools on your current profile."
+		die "USE=hvm is unsupported on this system."
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+	#bug 472438
+	export BASH_COMPLETION_DIR=/usr/share/bash-completion
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} ]]; then
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+			epatch "${WORKDIR}"/patches-gentoo
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	epatch "${FILESDIR}"/${PN}-4-docfix.patch
+
+	# Fix network broadcast on bridged networks
+	epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
+
+	# Bug 496708
+	epatch "${FILESDIR}"/${PN}-4-unbundle-ipxe.patch
+
+	# Fix bridge by idella4, bug #362575
+	epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
+
+	# Prevent double stripping of files at install
+	epatch "${FILESDIR}"/${PN/-tools/}-4.4-nostrip.patch
+
+	# fix jobserver in Makefile
+	epatch "${FILESDIR}"/${PN/-tools/}-4.3-jserver.patch
+
+	# Set dom0-min-mem to kb; Bug #472982
+	epatch "${FILESDIR}"/${PN/-tools/}-4.2-configsxp.patch
+
+	# Bug 477676
+	epatch "${FILESDIR}"/${PN}-4.3-ar-cc.patch
+
+	# Bug 379537
+	epatch "${FILESDIR}"/fix-gold-ld.patch
+
+	# Prevent file collision with qemu package Bug 478064
+	epatch "${FILESDIR}"/xen-4.4-qemu-bridge.patch
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	epatch "${FILESDIR}"/${PN}-4.4-api-fix.patch
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	# Disable hvm support on systems that don't support x86_32 binaries.
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Bug 472438
+	sed -e 's:^BASH_COMPLETION_DIR ?= $(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(SHARE_DIR)/bash-completion:' \
+		-i Config.mk || die
+
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	# fix QA warning, create /var/run/, /var/lock dynamically
+	sed -i -e "/\$(INSTALL_DIR) \$(DESTDIR)\$(XEN_RUN_DIR)/d" \
+		tools/libxl/Makefile || die
+
+	sed -i -e "/\/var\/run\//d" \
+		tools/xenstore/Makefile \
+		tools/pygrub/Makefile || die
+
+	sed -i -e "/\/var\/lock\/subsys/d" \
+		tools/Makefile || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=/usr \
+		--libdir=/usr/$(get_libdir) \
+		--disable-werror \
+		--with-system-seabios=/usr/share/seabios/bios.bin \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ocaml ocamltools) \
+		"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=1:autoballoon=1:' \
+		-e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
+		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
+		-i tools/examples/xl.conf  || die
+
+	# Reset bash completion dir; Bug 472438
+	mv "${D}"bash-completion "${D}"usr/share/ || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	if use xend; then
+		newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd"
+	fi
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# Move files built with use qemu, Bug #477884
+	if [[ "${ARCH}" == 'amd64' ]] && use qemu; then
+		mkdir -p "${D}"usr/$(get_libdir)/xen/bin || die
+		mv "${D}"usr/lib/xen/bin/* "${D}"usr/$(get_libdir)/xen/bin/ || die
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# xend expects these to exist
+	keepdir /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(udev_get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(udev_get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if [[ "$(scanelf -s __guard -q "${PYTHON}")" ]] ; then
+		echo
+		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
+		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
+		ewarn "This problem may be resolved as of Xen 3.0.4, if not post in the bug."
+	fi
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 multilib system is required to build HVM support."
+	fi
+
+	if use xend; then
+		elog"";elog "xend capability has been enabled and installed"
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
@ 2013-02-12 13:22 Ian Delaney
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Delaney @ 2013-02-12 13:22 UTC (permalink / raw
  To: gentoo-commits

commit:     93613e861446f3a9191b8e0f6fff81c5b618830b
Author:     Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
AuthorDate: Tue Feb 12 13:22:07 2013 +0000
Commit:     Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
CommitDate: Tue Feb 12 13:22:07 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=93613e86

Drop xen-tools-4.1.2-r[2,3], add xen-tools-4.2.1-r2 adapted to work towards a fix for Bug #351648

Package-Manager: portage-2.1.11.40

---
 app-emulation/xen-tools/Manifest                   |    3 +-
 app-emulation/xen-tools/files/ipxe-nopie.patch     |    8 +-
 app-emulation/xen-tools/files/stubs-32.h           |   20 ++
 .../files/xen-4-CVE-2012-6075-XSA-41.patch         |   39 +++
 .../xen-tools/files/xen-4-fix_dotconfig-gcc.patch  |  245 +++++++++++++++
 .../xen-tools/files/xen-tools-4-docfix.patch       |   12 +
 app-emulation/xen-tools/metadata.xml               |    4 +-
 app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild  |  324 --------------------
 ...s-4.1.2-r3.ebuild => xen-tools-4.2.1-r2.ebuild} |  213 +++++++------
 9 files changed, 438 insertions(+), 430 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 6d7274e..3e187d1 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,6 +1,5 @@
 DIST ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz 2888480 SHA256 ea2a52a999afab7fefa6300e0f1b38409c170a7503a51d8b572d790e71f2d0f0 SHA512 02314727af850bdf51c1963e8da258a65868f3ef116e9833918c770b8737cd1501891d4dc90d787702a1f34e35198e57373d730b7e2e6671e5fa93ece7c2f073 WHIRLPOOL 9a232852c3dee266dcbd27fae6814497814a0f65123484c37196a99c6cc746a348cf38c77ba084e62e052c64e950b34aa2f152a154e99c0366746f97941b23d7
-DIST ipxe-git-v1.0.0.tar.gz 1996881 SHA256 d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723 SHA512 6921fb857ca615899a5912d5590ca36b6f46daf828b85edc75461c08a189d9fed71ee74a82e42724da7a1355e45070d28a0a61694b3a4872c3554390e4bb4147 WHIRLPOOL 160e24eea479c9d67a8a5c7c5182864904ee594167f061adc40a3e74974197b6befe2ecdb76af1c101ff1a5697b060dae71dd3f9f969c8e18054526584d57031
 DIST ipxe.tar.gz 2867999 SHA256 632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c SHA512 c5cb1cdff40d2d71fd3e692a9d0efadf2aa17290daf5195391a1c81ddd9dfc913a8e44d5be2b12be85b2a5565ea31631c99c7053564f2fb2225c80ea0bb0e4a4 WHIRLPOOL 58b7459aaf7323968e2f4d1cdcb563a04a0ee40d7d0e8fc600495baf6914127fbbbcddfb66199cd9f462eb59565b3d1ae90a05b3c771b8f13c2d2dcb6070eebc
 DIST seabios-0-20121121.tar.bz2 2199282 SHA256 f7f67181c6c0b4cea3a9db48e2569fdcbbc81b732a2f672079c42fb44153ee62 SHA512 4f886088ebaa911590b8cb19db5c5dbc8f1384d2d5a7c4bf04df083e177513b3123b1839dad744171670eded8b69ce092a774288aec1804d00aa32b1b6778599 WHIRLPOOL f2e62682d7213ee5eaecbc2590637ef36d9c86f746840c0ee758c0c153139f485032ea2cd098c87bb8a2b5f17f91375b8fb65599e3b71b45b1645df85a88887f
-DIST xen-4.1.2.tar.gz 10365786 SHA256 7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d SHA512 8f50f238b0b474ec5556279cbd51d704b4365033f2541a5d0376f287b26b7e8f0193172041109d97bb76d35ace3adf71e12f89f5766ff79a8ea861e7282f00d7 WHIRLPOOL 93a4bdd05125ef722464ef682798191c8b3db7228cbc0a27bcbe7932a7776491f90e727e1fcc4a9e7ec3eada7f56c567c07ad61cdda2f514109f702800fe5566
 DIST xen-4.2.0.tar.gz 15587687 SHA256 43f4a086e4e0330145a27b7ace8365c42b5afbc95cefadafe067be91bd3e5cfb SHA512 4fb56c79d722fb307bc657f16d02079c6636427e7650c4354193632d38d2d1db8e588f844ff0ca6e757c108ed639a528565ec9fc7c00bb4d5b6fbc9d122d8a70 WHIRLPOOL 369a109375864cb61920b56cf501522051d28513e738f0fd0e7b76244c3e08a8a0a6ff6cf245872d9bbd9c0f22c7da76c9cbc0f852bad6108ca25fd42dc677c0
+DIST xen-4.2.1.tar.gz 15593695 SHA256 fb8df5827ce3e2d2d3b078d9e5afde502beb5e7ab9442e51a94087061bd450c6 SHA512 fe27a965e2b34035bd025482eda9fc4d4e82523c929323fd30813367d5ffbe2fa1ed3d7d4479f2632e8b5625972448b7bd6a7768e8dc1dcd1b6747d281cc1a9e WHIRLPOOL 226bbed059541e804f1a44e721023ffbc04bae43000653b1d7d6a9bfec0d9efbf7a48b1b0a7ad3fcb8e34f8b91e1c620c2a8eddf97baad487e9db37d49a58f37

diff --git a/app-emulation/xen-tools/files/ipxe-nopie.patch b/app-emulation/xen-tools/files/ipxe-nopie.patch
index 0663eaa..c5be735 100644
--- a/app-emulation/xen-tools/files/ipxe-nopie.patch
+++ b/app-emulation/xen-tools/files/ipxe-nopie.patch
@@ -20,8 +20,10 @@
 + MAKEDEPS	:= Makefile
 --- a/tools/firmware/etherboot/patches/series	2011-03-25 11:42:50.000000000 +0100
 +++ b/tools/firmware/etherboot/patches/series	2011-03-27 17:45:45.140446216 +0200
-@@ -1,3 +1,4 @@
+@@ -1,4 +1,5 @@
  boot_prompt_option.patch
- gpxe-git-0edf2405b457
- gpxe-git-a803ef3dfeac
+ build_fix_1.patch
+ build_fix_2.patch
+ build_fix_3.patch
 +ipxe-nopie.patch
+

diff --git a/app-emulation/xen-tools/files/stubs-32.h b/app-emulation/xen-tools/files/stubs-32.h
new file mode 100644
index 0000000..a421528
--- /dev/null
+++ b/app-emulation/xen-tools/files/stubs-32.h
@@ -0,0 +1,20 @@
+/* This file is automatically generated.
+   It defines a symbol `__stub_FUNCTION' for each function
+   in the C library which is a stub, meaning it will fail
+   every time called, usually setting errno to ENOSYS.  */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub_chflags
+#define __stub_fattach
+#define __stub_fchflags
+#define __stub_fdetach
+#define __stub_gtty
+#define __stub_lchmod
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_sstk
+#define __stub_stty

diff --git a/app-emulation/xen-tools/files/xen-4-CVE-2012-6075-XSA-41.patch b/app-emulation/xen-tools/files/xen-4-CVE-2012-6075-XSA-41.patch
new file mode 100644
index 0000000..7513ac3
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4-CVE-2012-6075-XSA-41.patch
@@ -0,0 +1,39 @@
+authorMichael Contreras <michael@inetric.com>
+ Mon, 3 Dec 2012 04:11:22 +0000 (20:11 -0800)
+committerAnthony Liguori <aliguori@us.ibm.com>
+ Mon, 3 Dec 2012 14:14:10 +0000 (08:14 -0600)
+
+The e1000_receive function for the e1000 needs to discard packets longer than
+1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
+this behavior and allocates memory based on this assumption.
+
+Signed-off-by: Michael Contreras <michael@inetric.com>
+Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
+hw/e1000.c
+
+--- tools/qemu-xen/hw/e1000.c
++++ tools/qemu-xen/hw/e1000.c
+@@ -59,6 +59,9 @@ static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
+ #define PNPMMIO_SIZE      0x20000
+ #define MIN_BUF_SIZE      60 /* Min. octets in an ethernet frame sans FCS */
+ 
++/* this is the size past which hardware will drop packets when setting LPE=0 */
++#define MAXIMUM_ETHERNET_VLAN_SIZE 1522
++
+ /*
+  * HW models:
+  *  E1000_DEV_ID_82540EM works with Windows and Linux
+@@ -805,6 +808,13 @@ e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size)
+         size = sizeof(min_buf);
+     }
+ 
++    /* Discard oversized packets if !LPE and !SBP. */
++    if (size > MAXIMUM_ETHERNET_VLAN_SIZE
++        && !(s->mac_reg[RCTL] & E1000_RCTL_LPE)
++        && !(s->mac_reg[RCTL] & E1000_RCTL_SBP)) {
++        return size;
++    }
++
+     if (!receive_filter(s, buf, size))
+         return size;
+ 

diff --git a/app-emulation/xen-tools/files/xen-4-fix_dotconfig-gcc.patch b/app-emulation/xen-tools/files/xen-4-fix_dotconfig-gcc.patch
new file mode 100644
index 0000000..4e08a30
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4-fix_dotconfig-gcc.patch
@@ -0,0 +1,245 @@
+# Fix gcc-4.6
+diff -ur xen-4.2.0.orig/extras/mini-os/minios.mk xen-4.2.0/extras/mini-os/minios.mk
+--- extras/mini-os/minios.mk	2012-09-17 18:21:17.000000000 +0800
++++ extras/mini-os/minios.mk	2012-12-05 14:01:10.653260260 +0800
+@@ -6,7 +6,7 @@
+ 
+ # Define some default flags.
+ # NB. '-Wcast-qual' is nasty, so I omitted it.
+-DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls
++DEF_CFLAGS += -fno-builtin -Wall -Wredundant-decls -Wno-format -Wno-redundant-decls
+ DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
+ DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
+ DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
+diff -ur xen-4.2.0.orig/tools/libxc/Makefile xen-4.2.0/tools/libxc/Makefile
+--- tools/libxc/Makefile       2012-09-17 18:21:18.000000000 +0800
++++ tools/libxc/Makefile       2012-12-05 14:01:10.653260260 +0800
+@@ -73,7 +73,7 @@
+
+ -include $(XEN_TARGET_ARCH)/Makefile
+
+-CFLAGS   += -Werror -Wmissing-prototypes
++CFLAGS   += -Wmissing-prototypes
+ CFLAGS   += -I. $(CFLAGS_xeninclude)
+
+ # Needed for posix_fadvise64() in xc_linux.c
+# Drop .config
+diff -ur xen-4.2.0.orig/Config.mk xen-4.2.0/Config.mk
+--- Config.mk	2012-09-17 18:23:12.000000000 +0800
++++ Config.mk	2012-12-05 14:01:10.641260261 +0800
+@@ -7,7 +7,6 @@ Drop .config
+ # fallback for older make
+ realpath = $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) && echo "$$PWD/$(notdir $(file))")))
+ 
+--include $(XEN_ROOT)/.config
+ 
+ # A debug build of Xen and tools?
+ debug ?= n
+@@ -24,7 +24,7 @@
+ 
+ # Tools to run on system hosting the build
+ HOSTCC      = gcc
+-HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
++HOSTCFLAGS  = -Wstrict-prototypes -O2 -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
+ 
+ DISTDIR     ?= $(XEN_ROOT)/dist
+@@ -156,7 +156,7 @@
+ 
+ CFLAGS += -std=gnu99
+ 
+-CFLAGS += -Wall -Wstrict-prototypes
++CFLAGS += -Wstrict-prototypes
+ 
+ # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
+ # and is over-zealous with the printf format lint
+diff -ur xen-4.2.1.orig/tools/blktap2/drivers/Makefile xen-4.2.1/tools/blktap2/drivers/Makefile
+--- tools/blktap2/drivers/Makefile	2012-12-17 23:00:11.000000000 +0800
++++ tools/blktap2/drivers/Makefile	2013-01-30 12:31:43.539941099 +0800
+@@ -9,7 +9,7 @@
+ LOCK_UTIL  = lock-util
+ INST_DIR   = $(SBINDIR)
+ 
+-CFLAGS    += -Werror -g
++CFLAGS    += -g
+ CFLAGS    += -Wno-unused
+ CFLAGS    += -fno-strict-aliasing
+ CFLAGS    += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers
+diff -ur xen-4.2.1.orig/tools/debugger/gdbsx/Rules.mk xen-4.2.1/tools/debugger/gdbsx/Rules.mk
+--- tools/debugger/gdbsx/Rules.mk	2012-12-17 23:00:22.000000000 +0800
++++ tools/debugger/gdbsx/Rules.mk	2013-01-30 12:31:43.516941098 +0800
+@@ -1,4 +1,4 @@
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS   += -Werror -Wmissing-prototypes 
++CFLAGS   += -Wmissing-prototypes 
+ # (gcc 4.3x and later)   -Wconversion -Wno-sign-conversion
+diff -ur xen-4.2.1.orig/tools/debugger/xenitp/Makefile xen-4.2.1/tools/debugger/xenitp/Makefile
+--- tools/debugger/xenitp/Makefile	2012-12-17 23:00:22.000000000 +0800
++++ tools/debugger/xenitp/Makefile	2013-01-30 12:31:43.516941098 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-#CFLAGS  += -Werror -g -O0
++#CFLAGS  += -g -O0
+ 
+ CFLAGS  += $(CFLAGS_libxenctrl)
+ 
+diff -ur xen-4.2.1.orig/tools/libaio/harness/Makefile xen-4.2.1/tools/libaio/harness/Makefile
+--- tools/libaio/harness/Makefile	2012-12-17 23:00:35.000000000 +0800
++++ tools/libaio/harness/Makefile	2013-01-30 12:31:43.541941099 +0800
+@@ -4,7 +4,7 @@
+ HARNESS_SRCS:=main.c
+ # io_queue.c
+ 
+-CFLAGS=-Wall -Werror -g -O -laio
++CFLAGS=-Wall -g -O -laio
+ #-lpthread -lrt
+ 
+ all: $(PROGS)
+diff -ur xen-4.2.1.orig/tools/libfsimage/Rules.mk xen-4.2.1/tools/libfsimage/Rules.mk
+--- tools/libfsimage/Rules.mk	2012-12-17 23:00:36.000000000 +0800
++++ tools/libfsimage/Rules.mk	2013-01-30 12:31:43.515941097 +0800
+@@ -1,7 +1,7 @@
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+ CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\"
+-CFLAGS += -Werror -D_GNU_SOURCE
++CFLAGS += -D_GNU_SOURCE
+ LDFLAGS += -L../common/
+ 
+ PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
+diff -ur xen-4.2.1.orig/tools/libxl/Makefile xen-4.2.1/tools/libxl/Makefile
+--- tools/libxl/Makefile	2012-12-17 23:01:08.000000000 +0800
++++ tools/libxl/Makefile	2013-01-30 12:31:43.541941099 +0800
+@@ -11,7 +11,7 @@
+ XLUMAJOR = 1.0
+ XLUMINOR = 1
+ 
+-CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
++CFLAGS += -Wno-format-zero-length -Wmissing-declarations \
+ 	-Wno-declaration-after-statement -Wformat-nonliteral
+ CFLAGS += -I. -fPIC
+ 
+diff -ur xen-4.2.1.orig/tools/qemu-xen/pc-bios/optionrom/Makefile xen-4.2.1/tools/qemu-xen/pc-bios/optionrom/Makefile
+--- tools/qemu-xen/pc-bios/optionrom/Makefile	2012-09-11 02:10:52.000000000 +0800
++++ tools/qemu-xen/pc-bios/optionrom/Makefile	2013-01-30 12:31:43.528941098 +0800
+@@ -9,7 +9,7 @@
+ 
+ .PHONY : all clean build-all
+ 
+-CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
++CFLAGS := -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-builtin
+ CFLAGS += -I$(SRC_PATH)
+ CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector)
+ QEMU_CFLAGS = $(CFLAGS)
+diff -ur xen-4.2.1.orig/tools/vtpm/Rules.mk xen-4.2.1/tools/vtpm/Rules.mk
+--- tools/vtpm/Rules.mk	2012-12-17 23:01:35.000000000 +0800
++++ tools/vtpm/Rules.mk	2013-01-30 12:31:43.515941097 +0800
+@@ -6,7 +6,7 @@
+ #
+ 
+ # General compiler flags
+-CFLAGS   = -Werror -g3
++CFLAGS   = -g3
+ 
+ # Generic project files
+ HDRS	= $(wildcard *.h)
+diff -ur xen-4.2.1.orig/tools/vtpm_manager/Rules.mk xen-4.2.1/tools/vtpm_manager/Rules.mk
+--- tools/vtpm_manager/Rules.mk	2012-12-17 23:01:35.000000000 +0800
++++ tools/vtpm_manager/Rules.mk	2013-01-30 12:31:43.511941097 +0800
+@@ -6,7 +6,7 @@
+ #
+ 
+ # General compiler flags
+-CFLAGS	= -Werror -g3
++CFLAGS	= -g3
+ 
+ # Generic project files
+ HDRS	= $(wildcard *.h)
+diff -ur xen-4.2.1.orig/tools/xenstat/xentop/Makefile xen-4.2.1/tools/xenstat/xentop/Makefile
+--- tools/xenstat/xentop/Makefile	2012-12-17 23:01:35.000000000 +0800
++++ tools/xenstat/xentop/Makefile	2013-01-30 12:31:43.535941098 +0800
+@@ -18,7 +18,7 @@
+ all install xentop:
+ else
+ 
+-CFLAGS += -DGCC_PRINTF -Wall -Werror $(CFLAGS_libxenstat)
++CFLAGS += -DGCC_PRINTF -Wall $(CFLAGS_libxenstat)
+ LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(SOCKET_LIBS)
+ CFLAGS += -DHOST_$(XEN_OS)
+ 
+diff -ur xen-4.2.1.orig/xen/arch/arm/Rules.mk xen-4.2.1/xen/arch/arm/Rules.mk
+--- xen/arch/arm/Rules.mk	2012-12-17 23:01:37.000000000 +0800
++++ xen/arch/arm/Rules.mk	2013-01-30 12:31:43.498941097 +0800
+@@ -9,7 +9,7 @@
+ HAS_DEVICE_TREE := y
+ 
+ CFLAGS += -fno-builtin -fno-common -Wredundant-decls
+-CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
++CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe
+ CFLAGS += -I$(BASEDIR)/include
+ 
+ # Prevent floating-point variables from creeping into Xen.
+diff -ur xen-4.2.1.orig/xen/arch/x86/Rules.mk xen-4.2.1/xen/arch/x86/Rules.mk
+--- xen/arch/x86/Rules.mk	2012-12-17 23:01:37.000000000 +0800
++++ xen/arch/x86/Rules.mk	2013-01-30 12:31:43.490941096 +0800
+@@ -24,7 +24,7 @@
+ endif
+ 
+ CFLAGS += -fno-builtin -fno-common -Wredundant-decls
+-CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
++CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe
+ CFLAGS += -I$(BASEDIR)/include 
+ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
+ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
+diff -ur xen-4.2.1.orig/xen/include/Makefile xen-4.2.1/xen/include/Makefile
+--- xen/include/Makefile	2012-12-17 23:01:55.000000000 +0800
++++ xen/include/Makefile	2013-01-30 12:31:43.502941097 +0800
+@@ -78,7 +78,7 @@
+ all: headers.chk
+ 
+ headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) Makefile
+-	for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
++	for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
+ 	mv $@.new $@
+ 
+ endif
+diff -ur xen-4.2.1.orig/tools/tests/mce-test/tools/Makefile xen-4.2.1/tools/tests/mce-test/tools/Makefile
+--- tools/tests/mce-test/tools/Makefile  2012-12-17 23:01:35.000000000 +0800
++++ tools/tests/mce-test/tools/Makefile       2013-01-30 13:01:44.890020152 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS += -Werror
++CFLAGS +=
+ CFLAGS += $(CFLAGS_libxenctrl)
+ CFLAGS += $(CFLAGS_libxenguest)
+ CFLAGS += $(CFLAGS_libxenstore)
+diff -ur xen-4.2.1.orig/tools/tests/mem-sharing/Makefile xen-4.2.1/tools/tests/mem-sharing/Makefile
+--- tools/tests/mem-sharing/Makefile     2012-12-17 23:01:35.000000000 +0800
++++ tools/tests/mem-sharing/Makefile  2013-01-30 13:01:44.890020152 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS += -Werror
++CFLAGS +=
+ 
+ CFLAGS += $(CFLAGS_libxenctrl)
+ CFLAGS += $(CFLAGS_xeninclude)
+diff -ur xen-4.2.1.orig/tools/tests/xen-access/Makefile xen-4.2.1/tools/tests/xen-access/Makefile
+--- tools/tests/xen-access/Makefile      2012-12-17 23:01:35.000000000 +0800
++++ tools/tests/xen-access/Makefile   2013-01-30 13:01:44.891020152 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=$(CURDIR)/../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS += -Werror
++CFLAGS +=
+ 
+ CFLAGS += $(CFLAGS_libxenctrl)
+ CFLAGS += $(CFLAGS_libxenguest)
+

diff --git a/app-emulation/xen-tools/files/xen-tools-4-docfix.patch b/app-emulation/xen-tools/files/xen-tools-4-docfix.patch
new file mode 100644
index 0000000..c9205a4
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4-docfix.patch
@@ -0,0 +1,12 @@
+diff -ur xen-4.2.0.orig/tools/qemu-xen-traditional/Makefile xen-4.2.0/tools/qemu-xen-traditional/Makefile
+--- xen-4.2.0.orig/tools/qemu-xen-traditional/Makefile	2012-09-07 00:05:30.000000000 +0800
++++ xen-4.2.0/tools/qemu-xen-traditional/Makefile	2013-01-29 11:12:20.502989453 +0800
+@@ -275,7 +275,7 @@
+ 
+ # documentation
+ %.html: %.texi
+-	texi2html -monolithic -number $<
++	texi2html -monolithic $<
+ 
+ %.info: %.texi
+ 	makeinfo $< -o $@

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index f4c43a5..6101069 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -3,8 +3,8 @@
 <pkgmetadata>
 	<herd>xen</herd>
 	<maintainer>
-		<email>johneed@hotmail.com</email>
-		<name>Ian Delaney aka idella4 proxy maintainer</name>
+		<email>idella4@gentoo.org</email>
+		<name>Ian Delaney</name>
 	</maintainer>
 	<use>
 		<flag name='api'>Build the C libxenapi bindings</flag>

diff --git a/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
deleted file mode 100644
index 3ce8a54..0000000
--- a/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
+++ /dev/null
@@ -1,324 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild,v 1.3 2012/01/12 13:40:01 alexxy Exp $
-
-EAPI="4"
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH="xml threads"
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="~amd64 ~x86"
-	XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
-	$XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
-	S="${WORKDIR}/xen-${PV}"
-fi
-
-inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend"
-
-REQUIRED_USE="hvm? ( qemu )"
-
-QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
-	/usr/share/xen/qemu/openbios-sparc64 \
-	/usr/share/xen/qemu/openbios-sparc32"
-QA_WX_LOAD=${QA_PRESTRIPPED}
-
-CDEPEND="<dev-libs/yajl-2
-	dev-python/lxml
-	dev-python/pypam
-	dev-python/pyxml
-	sys-libs/zlib
-	hvm? ( media-libs/libsdl
-		sys-power/iasl )
-	api? ( dev-libs/libxml2 net-misc/curl )"
-
-DEPEND="${CDEPEND}
-	sys-devel/gcc
-	dev-lang/perl
-	app-misc/pax-utils
-	dev-ml/findlib
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/transfig
-		media-gfx/graphviz
-		dev-tex/xcolor
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? (
-		x11-proto/xproto
-		sys-devel/dev86
-	)	pygrub? ( dev-lang/python[ncurses] )
-	"
-
-RDEPEND="${CDEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	>=dev-lang/ocaml-3.12.0
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	|| ( sys-fs/udev sys-apps/hotplug )"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
-	usr/share/xen/qemu/openbios-sparc64"
-RESTRICT="test"
-
-pkg_setup() {
-	python_set_active_version 2
-	python_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	if use qemu; then
-		export "CONFIG_IOEMU=y"
-	else
-		export "CONFIG_IOEMU=n"
-	fi
-
-	if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
-		eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
-		eerror "an amd64 multilib profile is required. Remove the hvm use flag"
-		eerror "to build xen-tools on your current profile."
-		die "USE=hvm is unsupported on this system."
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	use api     && export "LIBXENAPI_BINDINGS=y"
-	use flask   && export "FLASK_ENABLE=y"
-}
-
-src_prepare() {
-	cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
-	sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
-	# Xend
-	if ! use xend; then
-		sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
-			-i tools/misc/Makefile || die "Disabling xend failed" || die
-		sed -e 's:^XEND_INITD:#XEND_INITD:' \
-			-i tools/examples/Makefile || "Disabling xend failed" || die
-	fi
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-	# try and remove all the default custom-cflags
-	find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-		-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-		-i {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
-	fi
-
-	# Disable hvm support on systems that don't support x86_32 binaries.
-	if ! use hvm; then
-		chmod 644 tools/check/check_x11_devel
-		sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
-		sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Fix build for gcc-4.6
-	sed -e "s:-Werror::g" -i  tools/xenstat/xentop/Makefile || die
-
-	# Fix network broadcast on bridged networks
-	epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
-
-	# Do not strip binaries
-	epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
-
-	# Prevent the downloading of ipxe
-	sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
-		-e 's:^\tfi:#\tfi:' -i \
-		-e 's:^\tmv _$T $T:#\tmv _$T $T:' \
-		-i tools/firmware/etherboot/Makefile || die
-
-	# Fix bridge by idella4, bug #362575
-	epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
-
-	# Remove check_curl, new fix to Bug #386487
-	epatch "${FILESDIR}/${PN}-4.1.1-curl.patch"
-	sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
-		tools/check/check_curl || die
-
-	# Don't build ipxe with pie on hardened, Bug #360805
-	if gcc-specs-pie; then
-		epatch "${FILESDIR}/ipxe-nopie.patch"
-	fi
-
-	# Fix create.py for pyxml Bug 367735
-	epatch "${FILESDIR}/xen-tools-4.1.2-pyxml.patch"
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
-
-	if use doc; then
-		sh ./docs/check_pkgs || die "package check failed"
-		emake docs
-		emake dev-docs
-	fi
-
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/etc/init.d
-	export CONFIG_LEAF_DIR=default
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
-	python_convert_shebangs -r 2 "${ED}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=1:autoballoon=1:' \
-		-e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
-		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
-		-i tools/examples/xl.conf  || die
-
-#	dodoc README docs/README.xen-bugtool docs/ChangeLog
-	if use doc; then
-		emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/api/
-		docinto pdf
-		dodoc ${DOCS[@]}
-	#docs/api/tools/python/latex/refman.pdf
-		[ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
-	fi
-	rm -rf "${ED}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	if use xend; then
-		newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd"
-	fi
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	python_convert_shebangs -r 2 "${ED}"
-	# xend expects these to exist
-	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
-
-	# for xendomains
-	keepdir /etc/xen/auto
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " http://www.gentoo.org/doc/en/xen-guide.xml"
-	elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
-
-	if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
-		echo
-		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
-		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
-		ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
-	fi
-
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 multilib system is required to build HVM support."
-		echo
-		elog "The qemu use flag has been removed and replaced with hvm."
-	fi
-
-	if use xend; then
-		echo
-		elog "xend capability has been enabled and installed"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-	python_mod_optimize $(use pygrub && echo grub) xen
-}
-
-pkg_postrm() {
-	python_mod_cleanup $(use pygrub && echo grub) xen
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.1.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild
similarity index 58%
rename from app-emulation/xen-tools/xen-tools-4.1.2-r3.ebuild
rename to app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild
index 4d22347..c238f7c 100644
--- a/app-emulation/xen-tools/xen-tools-4.1.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild
@@ -1,10 +1,14 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild,v 1.3 2012/01/12 13:40:01 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.2.1-r2.ebuild,v 1.5 2013/02/12 06:34:04 idella4 Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH="xml threads"
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_REQ_USE='xml,threads'
+
+IPXE_TARBALL_URL="http://dev.gentoo.org/~idella4/tarballs/ipxe.tar.gz"
+XEN_SEABIOS_URL="http://dev.gentoo.org/~idella4/tarballs/seabios-0-20121121.tar.bz2"
 
 if [[ $PV == *9999 ]]; then
 	KEYWORDS=""
@@ -14,43 +18,41 @@ if [[ $PV == *9999 ]]; then
 	live_eclass="mercurial"
 else
 	KEYWORDS="~amd64 ~x86"
-	XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
-	$XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
+	$IPXE_TARBALL_URL
+	$XEN_SEABIOS_URL"
 	S="${WORKDIR}/xen-${PV}"
 fi
 
-inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
+inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs udev ${live_eclass}
 
 DESCRIPTION="Xend daemon and tools"
 HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
+DOCS=( README docs/README.xen-bugtool )
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen static-libs xend"
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml pygrub screen static-libs xend"
 
 REQUIRED_USE="hvm? ( qemu )"
 
-QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
-	/usr/share/xen/qemu/openbios-sparc64 \
-	/usr/share/xen/qemu/openbios-sparc32"
-QA_WX_LOAD=${QA_PRESTRIPPED}
-
 CDEPEND="<dev-libs/yajl-2
-	dev-python/lxml
-	dev-python/pypam
-	dev-python/pyxml
+	dev-python/lxml[${PYTHON_USEDEP}]
+	dev-python/pypam[${PYTHON_USEDEP}]
 	sys-libs/zlib
-	hvm? ( media-libs/libsdl
-		sys-power/iasl )
-	api? ( dev-libs/libxml2 net-misc/curl )"
-
+	sys-power/iasl
+	ocaml? ( dev-ml/findlib )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	${PYTHON_DEPS}
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )"
 DEPEND="${CDEPEND}
-	sys-devel/gcc
+	sys-devel/bin86
+	sys-devel/dev86
 	dev-lang/perl
 	app-misc/pax-utils
-	dev-ml/findlib
 	doc? (
 		app-doc/doxygen
 		dev-tex/latex2html[png,gif]
@@ -64,34 +66,32 @@ DEPEND="${CDEPEND}
 		dev-texlive/texlive-pictures
 		dev-texlive/texlive-latexrecommended
 	)
-	hvm? (
-		x11-proto/xproto
-		sys-devel/dev86
-	)	pygrub? ( dev-lang/python[ncurses] )
-	"
-
+	hvm? (  x11-proto/xproto
+	)"
 RDEPEND="${CDEPEND}
 	sys-apps/iproute2
 	net-misc/bridge-utils
-	>=dev-lang/ocaml-3.12.0
+	ocaml? ( >=dev-lang/ocaml-3.12.0 )
 	screen? (
 		app-misc/screen
 		app-admin/logrotate
 	)
-	|| ( sys-fs/udev sys-apps/hotplug )"
+	virtual/udev"
 
 # hvmloader is used to bootstrap a fully virtualized kernel
 # Approved by QA team in bug #144032
 QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
-	usr/share/xen/qemu/openbios-sparc64"
+
 RESTRICT="test"
 
 pkg_setup() {
-	python_set_active_version 2
-	python_pkg_setup
+	python-single-r1_pkg_setup
 	export "CONFIG_LOMOUNT=y"
 
+	if has_version dev-libs/libgcrypt; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
 	if use qemu; then
 		export "CONFIG_IOEMU=y"
 	else
@@ -122,30 +122,30 @@ pkg_setup() {
 }
 
 src_prepare() {
-	cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
-	sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
+	# Drop .config, fixes to gcc-4.6
+	epatch "${FILESDIR}"/${PN/-tools/}-4-fix_dotconfig-gcc.patch
 
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
 	# Xend
 	if ! use xend; then
 		sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
-			-i tools/misc/Makefile || die "Disabling xend failed" || die
+			-i tools/misc/Makefile || die "Disabling xend failed"
 		sed -e 's:^XEND_INITD:#XEND_INITD:' \
-			-i tools/examples/Makefile || "Disabling xend failed" || die
+			-i tools/examples/Makefile || die "Disabling xend failed"
 	fi
+
 	# if the user *really* wants to use their own custom-cflags, let them
 	if use custom-cflags; then
 		einfo "User wants their own CFLAGS - removing defaults"
 
-	# try and remove all the default custom-cflags
-	find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-		-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-		-i {} \; || die "failed to re-set custom-cflags"
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
 	fi
 
 	if ! use pygrub; then
@@ -154,7 +154,6 @@ src_prepare() {
 
 	# Disable hvm support on systems that don't support x86_32 binaries.
 	if ! use hvm; then
-		chmod 644 tools/check/check_x11_devel
 		sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
 		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
 	fi
@@ -165,36 +164,41 @@ src_prepare() {
 		sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
 	fi
 
-	# Fix build for gcc-4.6
-	sed -e "s:-Werror::g" -i  tools/xenstat/xentop/Makefile || die
+	# Fix texi2html build error with new texi2html
+	epatch "${FILESDIR}"/${PN}-4-docfix.patch
 
 	# Fix network broadcast on bridged networks
 	epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
 
-	# Do not strip binaries
-	epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
-
-	# Prevent the downloading of ipxe
-	sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
-		-e 's:^\tfi:#\tfi:' -i \
-		-e 's:^\tmv _$T $T:#\tmv _$T $T:' \
-		-i tools/firmware/etherboot/Makefile || die
+	# Prevent the downloading of ipxe, seabios
+	epatch "${FILESDIR}"/${PN/-tools/}-4.2.0-anti-download.patch
+	cp "${DISTDIR}"/ipxe.tar.gz tools/firmware/etherboot/ || die
+	mv ../seabios-dir-remote tools/firmware/ || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
 
 	# Fix bridge by idella4, bug #362575
 	epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
 
-	# Remove check_curl, new fix to Bug #386487
-	epatch "${FILESDIR}/${PN}-4.1.1-curl.patch"
-	sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
-		tools/check/check_curl || die
-
 	# Don't build ipxe with pie on hardened, Bug #360805
 	if gcc-specs-pie; then
-		epatch "${FILESDIR}/ipxe-nopie.patch"
+		epatch "${FILESDIR}"/ipxe-nopie.patch
 	fi
 
-	# Fix create.py for pyxml Bug 367735
-	epatch "${FILESDIR}/xen-tools-4.1.2-pyxml.patch"
+	# Prevent double stripping of files at install
+	epatch "${FILESDIR}"/${PN/-tools/}-4.2.0-nostrip.patch
+
+	# fix jobserver in Makefile
+	epatch "${FILESDIR}"/${PN/-tools/}-4.2.0-jserver.patch
+
+	#Sec patch, currently valid
+	epatch "${FILESDIR}"/xen-4-CVE-2012-6075-XSA-41.patch
+
+	if use hvm; then
+		cp -r "${FILESDIR}"/stubs-32.h xen/tools/include || die "copy of header file failed"
+		einfo "stubs-32.h added"
+	fi
 }
 
 src_compile() {
@@ -208,27 +212,30 @@ src_compile() {
 	fi
 
 	unset LDFLAGS
-	emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
-
-	if use doc; then
-		sh ./docs/check_pkgs || die "package check failed"
-		emake docs
-		emake dev-docs
-	fi
+	unset CFLAGS
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" -C tools ${myopt}
 
+	use doc && emake -C docs txt html
 	emake -C docs man-pages
 }
 
 src_install() {
 	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/etc/init.d
-	export CONFIG_LEAF_DIR=default
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
 
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
-	python_convert_shebangs -r 2 "${ED}"
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-tools
+#		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
 
 	# Remove RedHat-specific stuff
-	rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
+	rm -rf "${D}"tmp || die
 
 	# uncomment lines in xl.conf
 	sed -e 's:^#autoballoon=1:autoballoon=1:' \
@@ -236,17 +243,16 @@ src_install() {
 		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
 		-i tools/examples/xl.conf  || die
 
-#	dodoc README docs/README.xen-bugtool docs/ChangeLog
 	if use doc; then
-		emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
 
-		dohtml -r docs/api/
+		dohtml -r docs/
 		docinto pdf
 		dodoc ${DOCS[@]}
-	#docs/api/tools/python/latex/refman.pdf
-		[ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
 	fi
-	rm -rf "${ED}"/usr/share/doc/xen/
+
+	rm -rf "${D}"/usr/share/doc/xen/
 	doman docs/man?/*
 
 	if use xend; then
@@ -260,22 +266,35 @@ src_install() {
 	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
 
 	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
 		keepdir /var/log/xen-consoles
 	fi
 
+	if use qemu; then
+		mkdir -p "${D}"usr/lib64/xen/bin || die
+		mv "${D}"usr/lib/xen/bin/qemu* "${D}"usr/lib64/xen/bin/ || die
+	fi
+
 	# For -static-libs wrt Bug 384355
 	if ! use static-libs; then
-		rm -f ${ED}usr/$(get_libdir)/*.a ${ED}usr/$(get_libdir)/ocaml/*/*.a
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
-	python_convert_shebangs -r 2 "${ED}"
 	# xend expects these to exist
 	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
 
 	# for xendomains
 	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(udev_get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(udev_get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
 }
 
 pkg_postinst() {
@@ -283,13 +302,14 @@ pkg_postinst() {
 	elog " http://www.gentoo.org/doc/en/xen-guide.xml"
 	elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
 
-	if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
+	if [[ "$(scanelf -s __guard -q "${PYTHON}")" ]] ; then
 		echo
 		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
 		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
-		ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
+		ewarn "This problem may be resolved as of Xen 3.0.4, if not post in the bug."
 	fi
 
+	# TODO: we need to have the current Python slot here.
 	if ! has_version "dev-lang/python[ncurses]"; then
 		echo
 		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
@@ -321,9 +341,4 @@ pkg_postinst() {
 		elog "xensv is broken upstream (Gentoo bug #142011)."
 		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
 	fi
-	python_mod_optimize $(use pygrub && echo grub) xen
-}
-
-pkg_postrm() {
-	python_mod_cleanup $(use pygrub && echo grub) xen
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
@ 2012-11-21 12:48 Ian Delaney
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Delaney @ 2012-11-21 12:48 UTC (permalink / raw
  To: gentoo-commits

commit:     93cd3557c7b3cbdfcabe1bdaefb7419e21cc97d7
Author:     Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
AuthorDate: Thu Nov 22 04:47:48 2012 +0000
Commit:     Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
CommitDate: Thu Nov 22 04:47:48 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=93cd3557

revbump, patch to counter downloads during build, patch to counter double stripping, nopie patch returned to conditional state, fixes to QA issues, one remaining

Package-Manager: portage-2.1.11.30

---
 app-emulation/xen-tools/Manifest                   |    2 +
 .../xen-tools/files/xen-4.2.0-anti-download.patch  |   28 ++++++++++
 .../xen-tools/files/xen-4.2.0-nostrip.patch        |   54 ++++++++++++++++++++
 ...ools-4.2.0.ebuild => xen-tools-4.2.0-r1.ebuild} |   53 +++++++++++---------
 4 files changed, 113 insertions(+), 24 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a4cb7e4..6d7274e 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,4 +1,6 @@
 DIST ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz 2888480 SHA256 ea2a52a999afab7fefa6300e0f1b38409c170a7503a51d8b572d790e71f2d0f0 SHA512 02314727af850bdf51c1963e8da258a65868f3ef116e9833918c770b8737cd1501891d4dc90d787702a1f34e35198e57373d730b7e2e6671e5fa93ece7c2f073 WHIRLPOOL 9a232852c3dee266dcbd27fae6814497814a0f65123484c37196a99c6cc746a348cf38c77ba084e62e052c64e950b34aa2f152a154e99c0366746f97941b23d7
 DIST ipxe-git-v1.0.0.tar.gz 1996881 SHA256 d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723 SHA512 6921fb857ca615899a5912d5590ca36b6f46daf828b85edc75461c08a189d9fed71ee74a82e42724da7a1355e45070d28a0a61694b3a4872c3554390e4bb4147 WHIRLPOOL 160e24eea479c9d67a8a5c7c5182864904ee594167f061adc40a3e74974197b6befe2ecdb76af1c101ff1a5697b060dae71dd3f9f969c8e18054526584d57031
+DIST ipxe.tar.gz 2867999 SHA256 632ce8c193ccacc3012bd354bdb733a4be126f7c098e111930aa41dad537405c SHA512 c5cb1cdff40d2d71fd3e692a9d0efadf2aa17290daf5195391a1c81ddd9dfc913a8e44d5be2b12be85b2a5565ea31631c99c7053564f2fb2225c80ea0bb0e4a4 WHIRLPOOL 58b7459aaf7323968e2f4d1cdcb563a04a0ee40d7d0e8fc600495baf6914127fbbbcddfb66199cd9f462eb59565b3d1ae90a05b3c771b8f13c2d2dcb6070eebc
+DIST seabios-0-20121121.tar.bz2 2199282 SHA256 f7f67181c6c0b4cea3a9db48e2569fdcbbc81b732a2f672079c42fb44153ee62 SHA512 4f886088ebaa911590b8cb19db5c5dbc8f1384d2d5a7c4bf04df083e177513b3123b1839dad744171670eded8b69ce092a774288aec1804d00aa32b1b6778599 WHIRLPOOL f2e62682d7213ee5eaecbc2590637ef36d9c86f746840c0ee758c0c153139f485032ea2cd098c87bb8a2b5f17f91375b8fb65599e3b71b45b1645df85a88887f
 DIST xen-4.1.2.tar.gz 10365786 SHA256 7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d SHA512 8f50f238b0b474ec5556279cbd51d704b4365033f2541a5d0376f287b26b7e8f0193172041109d97bb76d35ace3adf71e12f89f5766ff79a8ea861e7282f00d7 WHIRLPOOL 93a4bdd05125ef722464ef682798191c8b3db7228cbc0a27bcbe7932a7776491f90e727e1fcc4a9e7ec3eada7f56c567c07ad61cdda2f514109f702800fe5566
 DIST xen-4.2.0.tar.gz 15587687 SHA256 43f4a086e4e0330145a27b7ace8365c42b5afbc95cefadafe067be91bd3e5cfb SHA512 4fb56c79d722fb307bc657f16d02079c6636427e7650c4354193632d38d2d1db8e588f844ff0ca6e757c108ed639a528565ec9fc7c00bb4d5b6fbc9d122d8a70 WHIRLPOOL 369a109375864cb61920b56cf501522051d28513e738f0fd0e7b76244c3e08a8a0a6ff6cf245872d9bbd9c0f22c7da76c9cbc0f852bad6108ca25fd42dc677c0

diff --git a/app-emulation/xen-tools/files/xen-4.2.0-anti-download.patch b/app-emulation/xen-tools/files/xen-4.2.0-anti-download.patch
new file mode 100644
index 0000000..95a1ce6
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.2.0-anti-download.patch
@@ -0,0 +1,28 @@
+diff -ur xen-4.2.0.orig/tools/firmware/etherboot/Makefile xen-4.2.0/tools/firmware/etherboot/Makefile
+--- tools/firmware/etherboot/Makefile	2012-09-17 18:21:18.000000000 +0800
++++ tools/firmware/etherboot/Makefile	2012-11-21 14:12:54.389536642 +0800
+@@ -28,13 +28,6 @@
+ 	$(MAKE) -C $D/src bin/$(*F).rom
+ 
+ $T:
+-	if ! wget -O _$T $(IPXE_TARBALL_URL); then \
+-		$(GIT) clone $(IPXE_GIT_URL) $D.git; \
+-		(cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
+-		$(IPXE_GIT_TAG) | gzip >../_$T); \
+-		rm -rf $D.git; \
+-	fi
+-	mv _$T $T
+ 
+ $D/src/arch/i386/Makefile: $T Config
+ 	rm -rf $D
+diff -ur xen-4.2.0.orig/tools/firmware/Makefile xen-4.2.0/tools/firmware/Makefile
+--- tools/firmware/Makefile	2012-09-17 18:21:18.000000000 +0800
++++ tools/firmware/Makefile	2012-11-21 16:14:21.974868539 +0800
+@@ -18,7 +18,6 @@
+ 	cp ovmf-makefile ovmf/Makefile;
+ 
+ seabios-dir:
+-	GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_TAG) seabios-dir
+	cp seabios-config seabios-dir/.config;
+ 
+ .PHONY: all

diff --git a/app-emulation/xen-tools/files/xen-4.2.0-nostrip.patch b/app-emulation/xen-tools/files/xen-4.2.0-nostrip.patch
new file mode 100644
index 0000000..1ef1555
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-4.2.0-nostrip.patch
@@ -0,0 +1,54 @@
+diff -ur xen-4.2.0.orig/tools/qemu-xen-traditional/Makefile xen-4.2.0/tools/qemu-xen-traditional/Makefile
+--- tools/qemu-xen-traditional/Makefile	2012-09-07 00:05:30.000000000 +0800
++++ tools/qemu-xen-traditional/Makefile	2012-11-22 06:12:29.433599695 +0800
+@@ -243,7 +243,7 @@
+ install: all $(if $(BUILD_DOCS),install-doc)
+ 	mkdir -p "$(DESTDIR)$(bindir)"
+ ifneq ($(TOOLS),)
+-	$(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
++	$(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
+ endif
+ ifneq ($(BLOBS),)
+ 	mkdir -p "$(DESTDIR)$(datadir)"
+diff -ur xen-4.2.0.orig/tools/qemu-xen-traditional/Makefile.target xen-4.2.0/tools/qemu-xen-traditional/Makefile.target
+--- tools/qemu-xen-traditional/Makefile.target	2012-09-07 00:05:30.000000000 +0800
++++ tools/qemu-xen-traditional/Makefile.target	2012-11-22 06:26:45.302521231 +0800
+@@ -755,7 +755,7 @@
+ 
+ install: all install-hook
+ ifneq ($(PROGS),)
+-	$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
++	$(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+ endif
+ 
+ # Include automatically generated dependency files
+diff -ur xen-4.2.0.orig/tools/qemu-xen/Makefile.target xen-4.2.0/tools/qemu-xen/Makefile.target
+--- tools/qemu-xen/Makefile.target	2012-09-11 02:10:52.000000000 +0800
++++ tools/qemu-xen/Makefile.target	2012-11-22 07:13:38.894263291 +0800
+@@ -437,9 +437,6 @@
+ install: all
+ ifneq ($(PROGS),)
+ 	$(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+-ifneq ($(STRIP),)
+-	$(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS))
+-endif
+ endif
+ ifdef CONFIG_TRACE_SYSTEMTAP
+ ifdef CONFIG_TRACE_SYSTEMTAP
+#diff -ur xen-4.2.0.orig/Makefile xen-4.2.0/Makefile
+#--- Makefile	2012-09-17 18:21:17.000000000 +0800
+#+++ Makefile	2012-11-22 09:09:45.080624651 +0800
+#@@ -62,11 +62,11 @@
+# 
+# .PHONY: install-xen
+# install-xen:
+#-	$(MAKE) -C xen install
+#+	+$(MAKE) -C xen install
+# 
+# .PHONY: install-tools
+# install-tools:
+#-	$(MAKE) -C tools install
+#+	+$(MAKE) -C tools install
+# 
+# ifeq ($(CONFIG_IOEMU),y)
+# install-tools: tools/qemu-xen-traditional-dir tools/qemu-xen-dir

diff --git a/app-emulation/xen-tools/xen-tools-4.2.0.ebuild b/app-emulation/xen-tools/xen-tools-4.2.0-r1.ebuild
similarity index 89%
rename from app-emulation/xen-tools/xen-tools-4.2.0.ebuild
rename to app-emulation/xen-tools/xen-tools-4.2.0-r1.ebuild
index 93c8afa..7ee1dc5 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.0-r1.ebuild
@@ -6,6 +6,9 @@ EAPI="4"
 PYTHON_DEPEND="2"
 PYTHON_USE_WITH="xml threads"
 
+IPXE_TARBALL_URL="http://dev.gentoo.org/~idella4/tarballs/ipxe.tar.gz"
+XEN_SEABIOS_URL="http://dev.gentoo.org/~idella4/tarballs/seabios-0-20121121.tar.bz2"
+
 if [[ $PV == *9999 ]]; then
 	KEYWORDS=""
 	REPO="xen-unstable.hg"
@@ -14,17 +17,16 @@ if [[ $PV == *9999 ]]; then
 	live_eclass="mercurial"
 else
 	KEYWORDS="~amd64 ~x86"
-	XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
-# 	$XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
+	$IPXE_TARBALL_URL
+	$XEN_SEABIOS_URL"
 	S="${WORKDIR}/xen-${PV}"
 fi
-
 inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
 
 DESCRIPTION="Xend daemon and tools"
 HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
+DOCS=( README docs/README.xen-bugtool )
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -32,11 +34,6 @@ IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen static-libs xend"
 
 REQUIRED_USE="hvm? ( qemu )"
 
-QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
-	/usr/share/xen/qemu/openbios-sparc64 \
-	/usr/share/xen/qemu/openbios-sparc32"
-QA_WX_LOAD=${QA_PRESTRIPPED}
-
 CDEPEND="<dev-libs/yajl-2
 	dev-python/lxml
 	dev-python/pypam
@@ -86,8 +83,7 @@ RDEPEND="${CDEPEND}
 # hvmloader is used to bootstrap a fully virtualized kernel
 # Approved by QA team in bug #144032
 QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
-	usr/share/xen/qemu/openbios-sparc64"
+
 RESTRICT="test"
 
 pkg_setup() {
@@ -129,11 +125,11 @@ pkg_setup() {
 }
 
 src_prepare() {
-#	cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
 	sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
 
 	# Drop .config
 	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+
 	# Xend
 	if ! use xend; then
 		sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
@@ -182,19 +178,24 @@ src_prepare() {
 	# Fix network broadcast on bridged networks
 	epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
 
-	# Prevent the downloading of ipxe
-#	sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
-#		-e 's:^\tfi:#\tfi:' -i \
-#		-e 's:^\tmv _$T $T:#\tmv _$T $T:' \
-#		-i tools/firmware/etherboot/Makefile || die
+	# Prevent the downloading of ipxe, seabios
+	epatch "${FILESDIR}"/${P/-tools/}-anti-download.patch
+	cp $DISTDIR/ipxe.tar.gz tools/firmware/etherboot/ || die
+	mv ../seabios-dir-remote tools/firmware/ || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
 
 	# Fix bridge by idella4, bug #362575
 	epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
 
 	# Don't build ipxe with pie on hardened, Bug #360805
-#	if gcc-specs-pie; then
+	if gcc-specs-pie; then
 		epatch "${FILESDIR}/ipxe-nopie-4.2.0.patch"
-#	fi
+	fi
+
+	# Prevent double stripping of files at install
+	epatch "${FILESDIR}"/${P/-tools/}-nostrip.patch
 }
 
 src_compile() {
@@ -226,7 +227,6 @@ src_install() {
 	export CONFIG_LEAF_DIR=default
 
 	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
-	python_convert_shebangs -r 2 "${ED}"
 
 	# Remove RedHat-specific stuff
 	rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
@@ -237,16 +237,15 @@ src_install() {
 		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
 		-i tools/examples/xl.conf  || die
 
-#	dodoc README docs/README.xen-bugtool docs/ChangeLog
 	if use doc; then
 		emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
 
 		dohtml -r docs/api/
 		docinto pdf
 		dodoc ${DOCS[@]}
-	#docs/api/tools/python/latex/refman.pdf
 		[ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
 	fi
+
 	rm -rf "${ED}"/usr/share/doc/xen/
 	doman docs/man?/*
 
@@ -271,7 +270,7 @@ src_install() {
 		rm -f ${ED}usr/$(get_libdir)/*.a ${ED}usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
-	python_convert_shebangs -r 2 "${ED}"
+	#python_convert_shebangs -r 2 "${ED}"
 	# xend expects these to exist
 	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
 
@@ -281,6 +280,12 @@ src_install() {
 	# Temp QA workaround
 	mkdir -p "${ED}"$(get_libdir)
 	mv "${ED}"etc/udev "${ED}"$(get_libdir)
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	rm -f $(find "${ED}" -name openbios-sparc32) \
+                $(find "${ED}" -name openbios-sparc64) \
+                $(find "${ED}" -name openbios-ppc) \
+                $(find "${ED}" -name palcode-clipper) || die
 }
 
 pkg_postinst() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
@ 2011-11-28 18:29 Alexey Shvetsov
  0 siblings, 0 replies; 6+ messages in thread
From: Alexey Shvetsov @ 2011-11-28 18:29 UTC (permalink / raw
  To: gentoo-commits

commit:     a90e67fdd2f5e2107ec6862cbedd00b981a53031
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 18:29:01 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 18:29:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=a90e67fd

Move to tree

(Portage version: 2.2.0_alpha79/git/Linux x86_64, unsigned Manifest commit)

---
 app-emulation/xen-tools/Manifest                  |   20 --
 app-emulation/xen-tools/files/xendomains.initd-r2 |    4 +-
 app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild |  324 ---------------------
 app-emulation/xen-tools/xen-tools-9999.ebuild     |   10 +-
 4 files changed, 4 insertions(+), 354 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
deleted file mode 100644
index 37a1e0c..0000000
--- a/app-emulation/xen-tools/Manifest
+++ /dev/null
@@ -1,20 +0,0 @@
-AUX ipxe-nopie.patch 952 RMD160 243c65b1e9e27fde14b10c5f605cce635de88032 SHA1 06870bb3bb063aabe16e721f487f0756a5889e8f SHA256 22d1e84568e4bdf204404c45cd4d323a78a1b5a5a29cc4a0707894e22f40bd48
-AUX xen-consoles.logrotate 63 RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 SHA1 6f88a4da3349aade6070dfc5c4465e2c00f3e68c SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19
-AUX xen-tools-3.3.0-nostrip.patch 1021 RMD160 f702b588596dfdebf71fafbf866d270ac5bb549e SHA1 bb4db097af6e206ed68bcc1a1c3ef48b02e9a4c5 SHA256 2debac718c01a7eac4daf3182a7ae04aa562137d791cd510ecf1848d7eaccebd
-AUX xen-tools-3.4.0-network-bridge-broadcast.patch 496 RMD160 3a8c57fe70837861f6f69d1d260c6fa6adad43e3 SHA1 cc02643eee7a39e97b53674066516c80ec0c3b38 SHA256 d00a1954447fc29500ab2f1a8c7900310e0dee81942be5c922ad66b6b42dfb74
-AUX xen-tools-4.1.1-bridge.patch 449 RMD160 165524a3a92014f79e886b0a20dba8b1c1920cc2 SHA1 32db884422a48819d71003860f99779b7b82540a SHA256 71eea5408e3600c3c6f7ce4e8363ea2c19db36c1882e20cf0ef8143af527782b
-AUX xen-tools-4.1.1-curl.patch 550 RMD160 87e09f92f292d89c86416036d4207b0460a3dc6e SHA1 dec0e47d62d85cb21d9fb6d097ab183f02b80310 SHA256 4bdb2875b36e7dbb0bd8d61b697da78007bb22922f56e020795c91ebb9ddd50b
-AUX xen-tools-4.1.2-pyxml.patch 408 RMD160 131ff6e6a1b3bd71ff584d3cbfca4b078abd77b1 SHA1 5fa6ce64ef125e97df65ed357e1c40964a7a3619 SHA256 6a8d8ca5478bc68850fd930749ca22207807c87f8624c0c3596a8cd70bc06c65
-AUX xenconsoled.confd 44 RMD160 0134f85258cf524807c4e2eae94739a70808c20d SHA1 6435bba449e9cffd3f99c5afdeb3cc37ecbd744d SHA256 2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060
-AUX xenconsoled.initd 652 RMD160 5aa785e9c73c5eb8460863af2c1bc50d2a07faf4 SHA1 dceffade1f3f5f2503fc6c3ccb4b9f9788365d00 SHA256 1a5594e4e924b94490c5c942b1b63e5fe857b8ad8061060e5d8a3bdfc9f0f1b7
-AUX xend.initd-r2 1064 RMD160 07b94d60a9c93577864086945389ef9821913522 SHA1 60f246da00f829776f1bb9a16ec07a6f91cbd24e SHA256 b9dcd925856eb5213b9052169492492d686b5d1ccae65b1c94a8ac944708d155
-AUX xendomains-screen.confd 594 RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 SHA1 7f9ed2986495d5fa4a6f8b050cd632fde6a19994 SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a
-AUX xendomains.confd 291 RMD160 75d55db5360da12fc3d721c37001ccbfbb844e52 SHA1 e7be8973a4bcbfc7680258e369b07e2ed097ef49 SHA256 2fac318bb96b357dd185f7729d83c0a0b941799cdb89c24ed83051bb085735dc
-AUX xendomains.initd-r2 2933 RMD160 31d35c58d0286a34bebd636e85a9368054b8f6c0 SHA1 5e9cbdb5f2b1770bf30ba99ca7c67dbf38b78e84 SHA256 da69c146e5213df5376bd9b2758d9d5957c802e5513c6ea510e604d00f1d9e40
-AUX xenstored.confd 42 RMD160 3407e1ff0958d5797e257da284798a21fe31a5db SHA1 c18f64d2a41de25695b7dfb924478e3fa64ed0c3 SHA256 afcc14f014fe4ec478f85d230efefba9ffad024bf8c83b30074e8a3712cc7831
-AUX xenstored.initd 812 RMD160 57a880e0024f3733bb3ebe945389eed6474b96f5 SHA1 9837c052afac31ee623ef02280a43114866869c8 SHA256 8f9df8ad835e45f9c995244e9e80d1a9ee630787bf2da88b7c4a73354d056fd8
-DIST ipxe-git-v1.0.0.tar.gz 1996881 RMD160 dcd9b6eaafa1ce05c1ebf2a15f2f73ad7a8c5547 SHA1 da052c8de5f3485fe0253c19cf52ed6d72528485 SHA256 d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723
-DIST xen-4.1.2.tar.gz 10365786 RMD160 457797ec4be286afbbcad940a9ce04e44f3f40d6 SHA1 db584cb0a0cc614888d7df3b196d514fdb2edd6e SHA256 7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d
-EBUILD xen-tools-4.1.2-r2.ebuild 9745 RMD160 3eee671f1e60d1eab97bc4fdc922eb3fe5407913 SHA1 59db466f30d1f46130dcbc28edf83dc8649ab668 SHA256 dabaa91efc5c13c2c0d85c99b653a2c58935188db0074a043aaef81a0f8a6f6c
-EBUILD xen-tools-9999.ebuild 9220 RMD160 c4bccde67520da1d5f66123fe604876b9a6e96a7 SHA1 2465ef2e555b74dcae600af204d5c3c651fa6f9c SHA256 5a393d34346484b642c6ec3d73c6a0b4b5cfdf3d5604bbb23a3f6087ef4fd1e0
-MISC metadata.xml 821 RMD160 a05d03fc9accefb4261be9a66ce63d25db2134ae SHA1 8abd3ea5f2c54c1682af838c9d13df43ef13897e SHA256 5e77961ab06a700cc9292df0bce39dca6803a019720ca915baf43b50c2916f02

diff --git a/app-emulation/xen-tools/files/xendomains.initd-r2 b/app-emulation/xen-tools/files/xendomains.initd-r2
index 9240376..2ca081c 100644
--- a/app-emulation/xen-tools/files/xendomains.initd-r2
+++ b/app-emulation/xen-tools/files/xendomains.initd-r2
@@ -6,8 +6,8 @@
 opts="start stop status restart"
 
 depend() {
-	need xenstored xenconsoled xend
-	after dhcp
+	need xenstored xenconsoled
+	after dhcp xend
 }
 
 get_domname() {

diff --git a/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
deleted file mode 100644
index b32b668..0000000
--- a/app-emulation/xen-tools/xen-tools-4.1.2-r2.ebuild
+++ /dev/null
@@ -1,324 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild,v 1.1 2011/11/11 17:50:59 neurogeek Exp $
-
-EAPI="4"
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH="xml threads"
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="~amd64 ~x86"
-	XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
-	$XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
-	S="${WORKDIR}/xen-${PV}"
-fi
-
-inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend"
-
-REQUIRED_USE="hvm? ( qemu )"
-
-QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
-	/usr/share/xen/qemu/openbios-sparc64 \
-	/usr/share/xen/qemu/openbios-sparc32"
-QA_WX_LOAD=${QA_PRESTRIPPED}
-
-CDEPEND="<dev-libs/yajl-2
-	dev-python/lxml
-	dev-python/pypam
-	dev-python/pyxml
-	sys-libs/zlib
-	hvm? ( media-libs/libsdl
-		sys-power/iasl )
-	api? ( dev-libs/libxml2 net-misc/curl )"
-
-DEPEND="${CDEPEND}
-	sys-devel/gcc
-	dev-lang/perl
-	app-misc/pax-utils
-	dev-ml/findlib
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/transfig
-		media-gfx/graphviz
-		dev-tex/xcolor
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? (
-		x11-proto/xproto
-		sys-devel/dev86
-	)	pygrub? ( dev-lang/python[ncurses] )
-	"
-
-RDEPEND="${CDEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	>=dev-lang/ocaml-3.12.0
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	|| ( sys-fs/udev sys-apps/hotplug )"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
-	usr/share/xen/qemu/openbios-sparc64"
-RESTRICT="test"
-
-pkg_setup() {
-	python_set_active_version 2
-	python_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	if use qemu; then
-		export "CONFIG_IOEMU=y"
-	else
-		export "CONFIG_IOEMU=n"
-	fi
-
-	if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
-		eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
-		eerror "an amd64 multilib profile is required. Remove the hvm use flag"
-		eerror "to build xen-tools on your current profile."
-		die "USE=hvm is unsupported on this system."
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	use api     && export "LIBXENAPI_BINDINGS=y"
-	use flask   && export "FLASK_ENABLE=y"
-}
-
-src_prepare() {
-	cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
-	sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
-	# Xend
-	if ! use xend; then
-		sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
-			-i tools/misc/Makefile || die "Disabling xend failed" || die
-		sed -e 's:^XEND_INITD:#XEND_INITD:' \
-			-i tools/examples/Makefile || "Disabling xend failed" || die
-	fi
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-	# try and remove all the default custom-cflags
-	find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-		-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-		-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-		-i {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
-	fi
-
-	# Disable hvm support on systems that don't support x86_32 binaries.
-	if ! use hvm; then
-		chmod 644 tools/check/check_x11_devel
-		sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
-		sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Fix build for gcc-4.6
-	sed -e "s:-Werror::g" -i  tools/xenstat/xentop/Makefile || die
-
-	# Fix network broadcast on bridged networks
-	epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
-
-	# Do not strip binaries
-	epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
-
-	# Prevent the downloading of ipxe
-	sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
-		-e 's:^\tfi:#\tfi:' -i \
-		-e 's:^\tmv _$T $T:#\tmv _$T $T:' \
-		-i tools/firmware/etherboot/Makefile || die
-
-	# Fix bridge by idella4, bug #362575
-	epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
-
-	# Remove check_curl, new fix to Bug #386487
-	epatch "${FILESDIR}/${PN}-4.1.1-curl.patch"
-	sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
-		tools/check/check_curl || die
-
-	# Don't build ipxe with pie on hardened, Bug #360805
-	if gcc-specs-pie; then
-		epatch "${FILESDIR}/ipxe-nopie.patch"
-	fi
-
-	# Fix create.py for pyxml Bug 367735
-	epatch "${FILESDIR}/xen-tools-4.1.2-pyxml.patch"
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
-
-	if use doc; then
-		sh ./docs/check_pkgs || die "package check failed"
-		emake docs
-		emake dev-docs
-	fi
-
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/etc/init.d
-	export CONFIG_LEAF_DIR=default
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
-	python_convert_shebangs -r 2 "${ED}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=1:autoballoon=1:' \
-		-e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
-		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
-		-i tools/examples/xl.conf  || die
-
-#	dodoc README docs/README.xen-bugtool docs/ChangeLog
-	if use doc; then
-		emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/api/
-		docinto pdf
-		dodoc ${DOCS[@]}
-	#docs/api/tools/python/latex/refman.pdf
-		[ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
-	fi
-	rm -rf "${ED}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	if use xend; then
-		newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd"
-	fi
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored \
-		"${FILESDIR}"/xenconsoled.initd xenconsoled
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	python_convert_shebangs -r 2 "${ED}"
-	# xend expects these to exist
-	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
-
-	# for xendomains
-	keepdir /etc/xen/auto
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " http://www.gentoo.org/doc/en/xen-guide.xml"
-	elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
-
-	if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
-		echo
-		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
-		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
-		ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
-	fi
-
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 multilib system is required to build HVM support."
-		echo
-		elog "The qemu use flag has been removed and replaced with hvm."
-	fi
-
-	if use xend; then
-		echo
-		elog "xend capability has been enabled and installed"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-	python_mod_optimize $(use pygrub && echo grub) xen
-}
-
-pkg_postrm() {
-	python_mod_cleanup $(use pygrub && echo grub) xen
-}
\ No newline at end of file

diff --git a/app-emulation/xen-tools/xen-tools-9999.ebuild b/app-emulation/xen-tools/xen-tools-9999.ebuild
index 7a66079..aa447c1 100644
--- a/app-emulation/xen-tools/xen-tools-9999.ebuild
+++ b/app-emulation/xen-tools/xen-tools-9999.ebuild
@@ -117,13 +117,6 @@ pkg_setup() {
 		fi
 	fi
 
-	if use doc && ! has_version "dev-tex/latex2html[png,gif]"; then
-		# die early instead of later
-		eerror "USE=doc requires latex2html with image support. Please add"
-		eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
-		die "latex2html missing both png and gif flags"
-	fi
-
 	use api     && export "LIBXENAPI_BINDINGS=y"
 	use flask   && export "FLASK_ENABLE=y"
 }
@@ -304,4 +297,5 @@ pkg_postinst() {
 
 pkg_postrm() {
 	python_mod_cleanup $(use pygrub && echo grub) xen
-}
\ No newline at end of file
+}
+



^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
@ 2011-11-20 19:57 Ian Delaney
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Delaney @ 2011-11-20 19:57 UTC (permalink / raw
  To: gentoo-commits

commit:     271eb7f83e63aca3efc009a074b9077e2d327c3d
Author:     Ian Delaney <johneed <AT> hotmail <DOT> com>
AuthorDate: Sat Nov 19 05:38:10 2011 +0000
Commit:     Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
CommitDate: Sat Nov 19 05:38:10 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=271eb7f8

"EAPI4 tp xen-tools [4.1.2 -9999]"

---
 app-emulation/xen-tools/Manifest                   |   38 ++
 app-emulation/xen-tools/files/ipxe-nopie.patch     |   27 ++
 .../xen-tools/files/xen-consoles.logrotate         |    5 +
 .../xen-tools/files/xen-tools-3.3.0-nostrip.patch  |   26 ++
 .../files/xen-tools-3.3.1-sandbox-fix.patch        |   21 +
 .../xen-tools-3.4.0-network-bridge-broadcast.patch |   11 +
 .../files/xen-tools-3.4.2-as-needed.patch          |   13 +
 .../files/xen-tools-3.4.2-fix-definitions.patch    |   16 +
 .../files/xen-tools-3.4.2-fix-include.patch        |   28 ++
 .../files/xen-tools-3.4.2-ldflags-respect.patch    |   31 ++
 .../xen-tools-3.4.2-remove-default-cflags.patch    |  257 ++++++++++++
 .../files/xen-tools-3.4.2-werror-idiocy-v2.patch   |  429 ++++++++++++++++++++
 .../xen-tools/files/xen-tools-4.1.1-bridge.patch   |   12 +
 .../xen-tools/files/xen-tools-4.1.1-curl.patch     |   10 +
 .../files/xen-tools-4.1.1-libxl-tap.patch          |   37 ++
 .../xen-tools/files/xen-tools-4.1.2-pyxml.patch    |   12 +
 app-emulation/xen-tools/files/xenconsoled.confd    |    2 +
 app-emulation/xen-tools/files/xenconsoled.initd    |   25 ++
 app-emulation/xen-tools/files/xend.initd-r1        |   71 ++++
 app-emulation/xen-tools/files/xend.initd-r2        |   52 +++
 .../xen-tools/files/xendomains-screen.confd        |   15 +
 app-emulation/xen-tools/files/xendomains.confd     |    9 +
 app-emulation/xen-tools/files/xendomains.initd-r1  |  117 ++++++
 app-emulation/xen-tools/files/xendomains.initd-r2  |  117 ++++++
 app-emulation/xen-tools/files/xenstored.confd      |    2 +
 app-emulation/xen-tools/files/xenstored.initd      |   29 ++
 app-emulation/xen-tools/metadata.xml               |   20 +
 app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild  |  250 ++++++++++++
 app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild  |  344 ++++++++++++++++
 app-emulation/xen-tools/xen-tools-9999.ebuild      |  319 +++++++++++++++
 30 files changed, 2345 insertions(+), 0 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
new file mode 100644
index 0000000..b28974f
--- /dev/null
+++ b/app-emulation/xen-tools/Manifest
@@ -0,0 +1,38 @@
+AUX ipxe-nopie.patch 952 RMD160 243c65b1e9e27fde14b10c5f605cce635de88032 SHA1 06870bb3bb063aabe16e721f487f0756a5889e8f SHA256 22d1e84568e4bdf204404c45cd4d323a78a1b5a5a29cc4a0707894e22f40bd48
+AUX xen-consoles.logrotate 63 RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 SHA1 6f88a4da3349aade6070dfc5c4465e2c00f3e68c SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19
+AUX xen-tools-3.3.0-nostrip.patch 1021 RMD160 f702b588596dfdebf71fafbf866d270ac5bb549e SHA1 bb4db097af6e206ed68bcc1a1c3ef48b02e9a4c5 SHA256 2debac718c01a7eac4daf3182a7ae04aa562137d791cd510ecf1848d7eaccebd
+AUX xen-tools-3.3.1-sandbox-fix.patch 828 RMD160 6c637b0883b72f12ce33b9c6d2dc7cf5267fc85a SHA1 51b35f096c0ad5c83e9654cfe0267b8efc51367e SHA256 519236a71e81e1da1c9a7616745422e6f205f4f7901abba7af0e0aef665af343
+AUX xen-tools-3.4.0-network-bridge-broadcast.patch 496 RMD160 3a8c57fe70837861f6f69d1d260c6fa6adad43e3 SHA1 cc02643eee7a39e97b53674066516c80ec0c3b38 SHA256 d00a1954447fc29500ab2f1a8c7900310e0dee81942be5c922ad66b6b42dfb74
+AUX xen-tools-3.4.2-as-needed.patch 765 RMD160 dbb5ad2ec52e96c40f109e28c91b566e88cb6220 SHA1 9e38f5c06153b5293daa55abe00106404ff6555f SHA256 91f9bf0723462a70d025c8b7ce0dee50e170b68f1a22092f28d92b140a4e5772
+AUX xen-tools-3.4.2-fix-definitions.patch 358 RMD160 d9cbf9cacb780f5de2ad7f05d981d292aa7dc994 SHA1 1a6163deb6b177b00e013fdfc6f1faf0bf20769e SHA256 0e43548bb3727beff625050fadacd04c1b2a0bec315531f793928a6808654aa8
+AUX xen-tools-3.4.2-fix-include.patch 894 RMD160 c1c17e63f4296b175159cae579b9d25f8654d7d3 SHA1 f7549495b1cecf8142c98ea4601d77e5f69619ec SHA256 3095dc197c48d0e4bf3ee122e427e00bfdd8e52f4e2b421fdca30ce32886d476
+AUX xen-tools-3.4.2-ldflags-respect.patch 1057 RMD160 d463f678e845e1d92012ec7013e211f52489839b SHA1 54916dd7f1d2c83df0219a5a092fcb2db8d2f71b SHA256 d1afe208eab5b00f5c3204b231b8f68a2d2335699a42b913f1ea9101f280736c
+AUX xen-tools-3.4.2-remove-default-cflags.patch 10646 RMD160 cc8175c33251310645fd6cc400c6180a7fcdcf75 SHA1 5e94fce8db6b67df6264e92a69f9f3802610b93f SHA256 f234c45b0a96c4eb5c97e7a8d76fb1f4a3dff110c4ea2ec68e8db71e03044d98
+AUX xen-tools-3.4.2-werror-idiocy-v2.patch 16827 RMD160 80fe78d3fd5f2d23d4852cf8608c616ae7e4e8b6 SHA1 619f42bf7ac7886a4b214bf813ad3369265f424b SHA256 45dfc85ea28c7a70bfcf94986758370e27c32698d78b90a2066335dd378f3669
+AUX xen-tools-4.1.1-bridge.patch 449 RMD160 165524a3a92014f79e886b0a20dba8b1c1920cc2 SHA1 32db884422a48819d71003860f99779b7b82540a SHA256 71eea5408e3600c3c6f7ce4e8363ea2c19db36c1882e20cf0ef8143af527782b
+AUX xen-tools-4.1.1-curl.patch 550 RMD160 87e09f92f292d89c86416036d4207b0460a3dc6e SHA1 dec0e47d62d85cb21d9fb6d097ab183f02b80310 SHA256 4bdb2875b36e7dbb0bd8d61b697da78007bb22922f56e020795c91ebb9ddd50b
+AUX xen-tools-4.1.1-libxl-tap.patch 1071 RMD160 a345fab381af82ffdf7a4206d9db30f6845e5867 SHA1 bbe2ddd9eb8119ae172fd9671fe58bda80bf9095 SHA256 ee03a5b68a9edf5d4fe78a322ff261e13f6ded879f3898b0ea72c407f678f885
+AUX xen-tools-4.1.1-upstream-23104-1976adbf2b80.patch 26848 RMD160 7d3bd028c5da4b2a48f1e992900bbf1866c9c4ea SHA1 55c5476e632649d4d635db1023193216455d076d SHA256 8654c4b587b350baaaea12cde3ef1737dc80088fba281556bf4c714fa4d8111f
+AUX xen-tools-4.1.2-pyxml.patch 408 RMD160 131ff6e6a1b3bd71ff584d3cbfca4b078abd77b1 SHA1 5fa6ce64ef125e97df65ed357e1c40964a7a3619 SHA256 6a8d8ca5478bc68850fd930749ca22207807c87f8624c0c3596a8cd70bc06c65
+AUX xenconsoled.confd 44 RMD160 0134f85258cf524807c4e2eae94739a70808c20d SHA1 6435bba449e9cffd3f99c5afdeb3cc37ecbd744d SHA256 2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060
+AUX xenconsoled.initd 652 RMD160 5aa785e9c73c5eb8460863af2c1bc50d2a07faf4 SHA1 dceffade1f3f5f2503fc6c3ccb4b9f9788365d00 SHA256 1a5594e4e924b94490c5c942b1b63e5fe857b8ad8061060e5d8a3bdfc9f0f1b7
+AUX xend.initd-r1 1664 RMD160 8d7ea19e96c49631a8f432dd93ae91ca4f37d26b SHA1 bd3a8f083288cd89624d31f3c7932e1a831d99a3 SHA256 6ea8848ca1203c5ef8490014ded86ec67100385c217660d393b25dc6519d254d
+AUX xend.initd-r2 1064 RMD160 07b94d60a9c93577864086945389ef9821913522 SHA1 60f246da00f829776f1bb9a16ec07a6f91cbd24e SHA256 b9dcd925856eb5213b9052169492492d686b5d1ccae65b1c94a8ac944708d155
+AUX xendomains-screen.confd 594 RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 SHA1 7f9ed2986495d5fa4a6f8b050cd632fde6a19994 SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a
+AUX xendomains.confd 291 RMD160 75d55db5360da12fc3d721c37001ccbfbb844e52 SHA1 e7be8973a4bcbfc7680258e369b07e2ed097ef49 SHA256 2fac318bb96b357dd185f7729d83c0a0b941799cdb89c24ed83051bb085735dc
+AUX xendomains.initd-r1 2930 RMD160 9a1c467d63043ce04c5f3c268745a30e4db1d006 SHA1 e649a34fae4cfc25f9f904008a79603c47df9836 SHA256 cf03eb7d8eb6d79bce02e857a4a6bcff68a6a63c55ff283f18ebb8d013a27111
+AUX xendomains.initd-r2 2933 RMD160 31d35c58d0286a34bebd636e85a9368054b8f6c0 SHA1 5e9cbdb5f2b1770bf30ba99ca7c67dbf38b78e84 SHA256 da69c146e5213df5376bd9b2758d9d5957c802e5513c6ea510e604d00f1d9e40
+AUX xenstored.confd 42 RMD160 3407e1ff0958d5797e257da284798a21fe31a5db SHA1 c18f64d2a41de25695b7dfb924478e3fa64ed0c3 SHA256 afcc14f014fe4ec478f85d230efefba9ffad024bf8c83b30074e8a3712cc7831
+AUX xenstored.initd 812 RMD160 57a880e0024f3733bb3ebe945389eed6474b96f5 SHA1 9837c052afac31ee623ef02280a43114866869c8 SHA256 8f9df8ad835e45f9c995244e9e80d1a9ee630787bf2da88b7c4a73354d056fd8
+DIST ipxe-git-v1.0.0.tar.gz 1996881 RMD160 dcd9b6eaafa1ce05c1ebf2a15f2f73ad7a8c5547 SHA1 da052c8de5f3485fe0253c19cf52ed6d72528485 SHA256 d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723
+DIST xen-3.4.2.tar.gz 11187726 RMD160 2ef81df1f44356d60e04e21df2173ce5357d8509 SHA1 3cd2cafacd52bbac2e2da1cfd846ee6260b43455 SHA256 d17c33136041cc8da69214ccf527fc48637bee7a9ab4d68a88ec50e6a9d20b0b
+DIST xen-4.1.1.tar.gz 10355625 RMD160 4b3c0641b0f098889f627662aa6b8fea00c5b636 SHA1 f1b5ef4b663c339faf9c77fc895327cfbcc9776c SHA256 246289227507466b5da8b2d0da84a5b0e68a392527b16cde38898d0348890f5b
+DIST xen-4.1.2.tar.gz 10365786 RMD160 457797ec4be286afbbcad940a9ce04e44f3f40d6 SHA1 db584cb0a0cc614888d7df3b196d514fdb2edd6e SHA256 7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d
+EBUILD xen-tools-3.4.2-r3.ebuild 7049 RMD160 05ffd0fdba6761df2d59f3bd7421599e1f20f4a1 SHA1 e36b7900c84de2ca1f861af081678ff3c7eb943a SHA256 d1513d443231dd27cb0267acac47c00c9bf95c25aa296e90ee6bb21a134e1e51
+EBUILD xen-tools-3.4.2-r5.ebuild 7383 RMD160 b31318f590f2d563c036a7acffe65cecc9bf677f SHA1 34312c51b92c28dc7d7ab718c1b5f67b1554be61 SHA256 0ae0c406503dbc8342d5a4abc72d896ec0205317c9e6ec8690f71a40bd7bb8c4
+EBUILD xen-tools-4.1.1-r5.ebuild 10316 RMD160 92450a0dba081cda3e23e94072953b858538d31e SHA1 f1af2fba3958c0813b37adc16c82d69d720f2458 SHA256 80485abdbcaf256d21289f0cf260de671d72bbcc023bf49df3bd99db99b23720
+EBUILD xen-tools-4.1.1-r6.ebuild 10651 RMD160 993111049c34acbbf59857b3794e68319a50e301 SHA1 4af2c578e12f6f9b29490dc04488a956d526af4c SHA256 4147a0918b80cda6c22cfe4219c4767a5b2a50b65790852de9f33ce0c16122fd
+EBUILD xen-tools-4.1.2-r1.ebuild 10661 RMD160 e6d79f599d28ba19f8452f2cd953e537ca263a31 SHA1 9c5858944006f46cf53234a83867de8889ce44ea SHA256 e80e19f6fb1feebd4f52c55de17564792b32e2c8da89b5a6bc7eceee10f4d9f7
+EBUILD xen-tools-9999.ebuild 9797 RMD160 a295e2bc881a274318a8c1c047c5eb7f0d3c9873 SHA1 064ff777ba534f689303c4b89bfd23b9add7d1df SHA256 795b2d62d02001ee304880e0c9fa1611e12e969e7c94fb0e4aecb1a850ba7e13
+MISC ChangeLog 26416 RMD160 9dedc8200cef808e17460fc462dfa58b4697a00b SHA1 527ac5a862ec32895ab6b1bc476721a6564a929b SHA256 6177a750826abbe6084535a884b47bf43d5109c037a36bd320db079f54edffa3
+MISC metadata.xml 947 RMD160 96890462f83ee4a47c9c77993ba76ef82a732af5 SHA1 7ff424eead47cb6ce81930c10d3b22b0d8f73d61 SHA256 74f0e5bea356989a42fd4086d87271ed7c25331306acb333707476f53cac4d60

diff --git a/app-emulation/xen-tools/files/ipxe-nopie.patch b/app-emulation/xen-tools/files/ipxe-nopie.patch
new file mode 100644
index 0000000..0663eaa
--- /dev/null
+++ b/app-emulation/xen-tools/files/ipxe-nopie.patch
@@ -0,0 +1,27 @@
+2011-10-22	Ralf Glauberman	<ralfglauberman@gmx.de>
+
+		#360805 Don't compile ipxe with pie on hardened.
+		* /tools/firmware/etherboot/patches/ipxe-nopie.patche		New patch
+		* /tools/firmware/etherboot/patches/series				Add ipxe-nopie.patch
+
+--- a/tools/firmware/etherboot/patches/ipxe-nopie.patch	1970-01-01 01:00:00.000000000 +0100
++++ b/tools/firmware/etherboot/patches/ipxe-nopie.patch	2011-03-27 17:45:13.929697782 +0200
+@@ -0,0 +1,11 @@
++--- ipxe/src/Makefile~	2011-03-27 17:41:52.000000000 +0200
+++++ ipxe/src/Makefile	2011-03-27 17:43:20.869446433 +0200
++@@ -4,7 +4,7 @@
++ #
++ 
++ CLEANUP		:=
++-CFLAGS		:=
+++CFLAGS		:= -nopie
++ ASFLAGS		:=
++ LDFLAGS		:=
++ MAKEDEPS	:= Makefile
+--- a/tools/firmware/etherboot/patches/series	2011-03-25 11:42:50.000000000 +0100
++++ b/tools/firmware/etherboot/patches/series	2011-03-27 17:45:45.140446216 +0200
+@@ -1,3 +1,4 @@
+ boot_prompt_option.patch
+ gpxe-git-0edf2405b457
+ gpxe-git-a803ef3dfeac
++ipxe-nopie.patch

diff --git a/app-emulation/xen-tools/files/xen-consoles.logrotate b/app-emulation/xen-tools/files/xen-consoles.logrotate
new file mode 100644
index 0000000..c644523
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-consoles.logrotate
@@ -0,0 +1,5 @@
+/var/log/xen-consoles/*.log {
+	rotate 7
+	missingok
+	compress
+}

diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch
new file mode 100644
index 0000000..48e7cd5
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch
@@ -0,0 +1,26 @@
+Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile
+===================================================================
+--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile
++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile
+@@ -205,7 +205,7 @@ endif
+ install: all $(if $(BUILD_DOCS),install-doc)
+ 	mkdir -p "$(DESTDIR)$(bindir)"
+ ifneq ($(TOOLS),)
+-	$(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
++	$(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
+ endif
+ 	mkdir -p "$(DESTDIR)$(datadir)"
+ 	set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
+Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target
+===================================================================
+--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile.target
++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target
+@@ -707,7 +707,7 @@ clean:
+ 
+ install: all install-hook
+ ifneq ($(PROGS),)
+-	$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
++	$(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+ endif
+ 
+ # Include automatically generated dependency files

diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch b/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch
new file mode 100644
index 0000000..be0527a
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.3.1-sandbox-fix.patch
@@ -0,0 +1,21 @@
+diff -urN xen-3.3.1/tools/ioemu-qemu-xen/xen-setup xen-3.3.1-fix/tools/ioemu-qemu-xen/xen-setup
+--- xen-3.3.1/tools/ioemu-qemu-xen/xen-setup	2009-01-05 04:36:22.000000000 -0700
++++ xen-3.3.1-fix/tools/ioemu-qemu-xen/xen-setup	2009-04-25 17:55:03.000000000 -0600
+@@ -3,6 +3,8 @@
+ 
+ # git-clean -x -d && ./xen-setup && make prefix=/usr CMDLINE_CFLAGS='-O0 -g' -j4 && make install DESTDIR=`pwd`/dist/ prefix=/usr && rsync -a --stats --delete . thule:shadow/qemu-iwj.git/ && rsync -a --stats dist/. root@thule:/
+ 
++target=i386-dm
++
+ rm -f $target/Makefile
+ rm -f $target/config.mak
+ rm -f config-host.mak
+@@ -11,8 +13,6 @@
+ 
+ ./configure --disable-gfx-check --disable-gcc-check --disable-curses --disable-slirp "$@" --prefix=/usr
+ 
+-target=i386-dm
+-
+ if [ "x$XEN_ROOT" != x ]; then
+ 	echo "XEN_ROOT=$XEN_ROOT" >>config-host.mak
+ fi

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.0-network-bridge-broadcast.patch b/app-emulation/xen-tools/files/xen-tools-3.4.0-network-bridge-broadcast.patch
new file mode 100644
index 0000000..c926510
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.4.0-network-bridge-broadcast.patch
@@ -0,0 +1,11 @@
+--- xen-3.4.0/tools/hotplug/Linux/network-bridge.orig	2009-05-18 15:05:38.000000000 +0400
++++ xen-3.4.0/tools/hotplug/Linux/network-bridge	2009-06-09 23:16:05.000000000 +0400
+@@ -101,7 +101,7 @@
+ tdev=tmpbridge
+ 
+ get_ip_info() {
+-    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e 's/ .*//'`
++    addr_pfx=`ip addr show dev $1 | egrep '^ *inet ' | sed -e 's/ *inet //' -e "s/$1//"`
+     gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`
+ }
+     

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch
new file mode 100644
index 0000000..5d97373
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-as-needed.patch
@@ -0,0 +1,13 @@
+--- xen-3.4.2.orig/tools/libxc/Makefile	2009-11-10 16:12:56.000000000 +0100
++++ xen-3.4.2/tools/libxc/Makefile	2009-12-12 18:46:27.547714651 +0100
+@@ -167,9 +167,8 @@
+ xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D)
+ xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D)
+ 
+-libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l)
+ libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
+-	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS) $(call zlib-options,l)
+ 
+ -include $(DEPS)
+ 

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch
new file mode 100644
index 0000000..403d612
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-definitions.patch
@@ -0,0 +1,16 @@
+--- tools/blktap/lib/blktaplib.h.orig	2011-09-21 19:29:30.240868534 +0800
++++ tools/blktap/lib/blktaplib.h	2011-09-21 19:34:21.184868372 +0800
+@@ -195,8 +195,13 @@
+ 	pid_t     pid;
+ } msg_pid_t;
+ 
++#ifndef READ
+ #define READ 0
++#endif
++
++#ifndef WRITE
+ #define WRITE 1
++#endif
+ 
+ /*Control Messages between manager and tapdev*/
+ #define CTLMSG_PARAMS      1

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch
new file mode 100644
index 0000000..2fe3f05
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-fix-include.patch
@@ -0,0 +1,28 @@
+--- ./tools/blktap/drivers/blktapctrl.c	2011-09-20 00:27:01.846896986 +0800
++++ ./tools/blktap/drivers/blktapctrl.c	2011-09-20 00:29:09.910897067 +0800
+@@ -40,6 +40,7 @@
+ #include <err.h>
+ #include <errno.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <fcntl.h>
+--- ./tools/blktap/drivers/block-qcow2.c     2011-09-22 04:15:49.339854677 +0800
++++ ./tools/blktap/drivers/block-qcow2.c  2009-11-10 23:12:55.000000000 +0800
+@@ -26,6 +26,7 @@
+ #include "aes.h"
+ #include <assert.h>
+ #include <stdint.h>
++#include <sys/stat.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+--- ./tools/ioemu-qemu-xen/block-qcow2.c	2011-09-19 23:43:40.005898352 +0800
++++ ./tools/ioemu-qemu-xen/block-qcow2.c	2011-09-19 23:26:53.979898723 +0800
+@@ -26,6 +26,7 @@
+ #include <zlib.h>
+ #include "aes.h"
+ #include <assert.h>
++#include <sys/stat.h>
+

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch
new file mode 100644
index 0000000..fd77712
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-ldflags-respect.patch
@@ -0,0 +1,31 @@
+--- ./tools/fs-back/Makefile	2011-09-26 23:14:30.454759297 +0800
++++ ./tools/fs-back/Makefile	2011-09-27 16:37:57.445748680 +0800
+@@ -23,7 +23,7 @@ 
+ all: $(IBIN)
+ 
+ fs-backend: $(OBJS) fs-backend.c
+-	$(CC) $(CFLAGS) -o fs-backend $(OBJS) $(LIBS) fs-backend.c
++	$(CC) $(CFLAGS) $(LDFLAGS) -o fs-backend $(OBJS) $(LIBS) fs-backend.c
+ 
+ install: all
+ 	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR)
+--- ./tools/libfsimage/common/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ ./tools/libfsimage/common/Makefile	2011-09-27 16:41:16.516748626 +0800
+@@ -6,7 +6,7 @@ 
+ 
+ LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
+ LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
+-LDFLAGS = $(LDFLAGS-y)
++#LDFLAGS = $(LDFLAGS-y)
+ 
+ LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c
+ 
+--- ./tools/misc/lomount/Makefile	2011-09-27 14:23:26.596752233 +0800
++++ ./tools/misc/lomount/Makefile	2011-09-27 16:37:57.445748680 +0800
+@@ -23,5 +23,5 @@ 
+ 	$(RM) *.a *.so *.o *.rpm $(BIN)
+ 
+ %: %.c $(HDRS) Makefile
+-	$(CC) $(CFLAGS) -o $@ $< 
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< 
+ 

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch
new file mode 100644
index 0000000..8ca546b
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch
@@ -0,0 +1,257 @@
+Only in xen-3.4.2/: cflags.sh
+diff -ur xen-3.4.2.orig//config/StdGNU.mk xen-3.4.2//config/StdGNU.mk
+--- xen-3.4.2.orig//config/StdGNU.mk	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//config/StdGNU.mk	2011-09-26 02:18:14.630771549 +0800
+@@ -48,7 +48,7 @@
+ SHLIB_CFLAGS = -shared
+ 
+ ifneq ($(debug),y)
+-CFLAGS += -O2 -fomit-frame-pointer
++CFLAGS += -fomit-frame-pointer
+ else
+ # Less than -O1 produces bad code and large stack frames
+ CFLAGS += -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls
+diff -ur xen-3.4.2.orig//config/SunOS.mk xen-3.4.2//config/SunOS.mk
+--- xen-3.4.2.orig//config/SunOS.mk	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//config/SunOS.mk	2011-09-26 02:18:14.640771549 +0800
+@@ -45,7 +45,7 @@
+ SHLIB_CFLAGS = -R $(SunOS_LIBDIR) -shared
+ 
+ ifneq ($(debug),y)
+-CFLAGS += -O2 -fno-omit-frame-pointer
++CFLAGS += -fno-omit-frame-pointer
+ else
+ # Less than -O1 produces bad code and large stack frames
+ CFLAGS += -O1 -fno-omit-frame-pointer
+diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk
+--- xen-3.4.2.orig//Config.mk	2011-09-26 02:17:29.221771569 +0800
++++ xen-3.4.2//Config.mk	2011-09-26 02:18:14.686771549 +0800
+@@ -14,7 +14,7 @@
+ 
+ # Tools to run on system hosting the build
+ HOSTCC      = gcc
+-HOSTCFLAGS  = -Wall  -Wstrict-prototypes -O2 -fomit-frame-pointer
++HOSTCFLAGS  = -Wall  -Wstrict-prototypes -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
+ 
+ DISTDIR     ?= $(XEN_ROOT)/dist
+diff -ur xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk xen-3.4.2//extras/mini-os/arch/ia64/arch.mk
+--- xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//extras/mini-os/arch/ia64/arch.mk	2011-09-26 02:18:14.689771549 +0800
+@@ -1,8 +1,8 @@
+ 
+ ARCH_CFLAGS := -mfixed-range=f2-f5,f12-f15,f32-f127 -mconstant-gp
+-ARCH_CFLAGS += -O2
++#ARCH_CFLAGS += -O2
+ ARCH_ASFLAGS := -x assembler-with-cpp
+-ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127 -fomit-frame-pointer
++ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127
+ ARCH_ASFLAGS += -fno-builtin -fno-common -fno-strict-aliasing -mconstant-gp
+ 
+ ARCH_LDFLAGS = -warn-common
+diff -ur xen-3.4.2.orig//stubdom/grub.patches/00cvs xen-3.4.2//stubdom/grub.patches/00cvs
+--- xen-3.4.2.orig//stubdom/grub.patches/00cvs	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//stubdom/grub.patches/00cvs	2011-09-26 02:18:14.549771549 +0800
+@@ -223,8 +223,8 @@
+ +++ grub/configure.ac	2008-04-10 23:26:50.000000000 +0100
+ @@ -86,13 +86,13 @@ if test "x$ac_cv_prog_gcc" = xyes; then
+      fi
+-     STAGE1_CFLAGS="-O2"
+-     GRUB_CFLAGS="-O2"
++     STAGE1_CFLAGS=""
++     GRUB_CFLAGSS=""
+ -    AC_CACHE_CHECK([whether optimization for size works], size_flag, [
+ +    AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [
+        saved_CFLAGS=$CFLAGS
+@@ -237,7 +237,7 @@
+ +    if test "x$grub_cv_cc_Os" = xyes; then
+        STAGE2_CFLAGS="-Os"
+      else
+-       STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
++       STAGE2_CFLAGS=" -fno-strength-reduce -fno-unroll-loops"
+ @@ -100,16 +100,16 @@ if test "x$ac_cv_prog_gcc" = xyes; then
+      # OpenBSD has a GCC extension for protecting applications from
+      # stack smashing attacks, but GRUB doesn't want this feature.
+diff -ur xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure
+--- xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure	2011-09-26 02:24:37.261771380 +0800
+@@ -1849,7 +1849,7 @@
+ GCC=`test $ac_compiler_gnu = yes && echo yes`
+ ac_test_CFLAGS=${CFLAGS+set}
+ ac_save_CFLAGS=$CFLAGS
+-CFLAGS="-g"
++CFLAGS=""
+ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+ echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+ if test "${ac_cv_prog_cc_g+set}" = set; then
+@@ -1898,15 +1898,15 @@
+   CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+   if test "$GCC" = yes; then
+-    CFLAGS="-g -O2"
++    CFLAGS=""
+   else
+-    CFLAGS="-g"
++    CFLAGS=""
+   fi
+ else
+   if test "$GCC" = yes; then
+-    CFLAGS="-O2"
++#    CFLAGS="-O2"
+   else
+-    CFLAGS=
++    CFLAGS=""
+   fi
+ fi
+ echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+Only in xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver: configure~
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure	2011-09-26 02:17:29.223771569 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/configure	2011-09-26 02:22:14.583771444 +0800
+@@ -464,7 +464,7 @@
+ 
+ 
+ # default flags for all hosts
+-CFLAGS="$CFLAGS -O2 -g -fno-strict-aliasing"
++CFLAGS="$CFLAGS -g -fno-strict-aliasing"
+ CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
+ LDFLAGS="$LDFLAGS -g"
+ if test "$werror" = "yes" ; then
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile	2009-11-05 19:44:56.000000000 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile	2011-09-26 02:18:14.264771549 +0800
+@@ -12,7 +12,7 @@
+ OBJCOPY = $(CROSS)objcopy
+ 
+ # we rely on GCC inline:ing the stuff we tell it to in many places here.
+-CFLAGS  = -Winline -Wall -g -O2 -static
++CFLAGS  = -Winline -Wall -g -static
+ NOSTDFLAGS = -nostartfiles -nostdlib
+ ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/cris/
+ LDLIBS  =
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c	2009-11-05 19:44:56.000000000 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c	2011-09-26 02:18:14.669771549 +0800
+@@ -6,7 +6,7 @@
+ * http://www.linux.com/howtos/Assembly-HOWTO/mips.shtml
+ *
+ * mipsel-linux-gcc -nostdlib -mno-abicalls -fno-PIC -mabi=32 \
+-*                  -O2 -static -o hello-mips hello-mips.c
++*                  -static -o hello-mips hello-mips.c
+ *
+ */
+ #define __NR_SYSCALL_BASE	4000
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile	2009-11-05 19:44:56.000000000 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile	2011-09-26 02:18:14.262771549 +0800
+@@ -2,7 +2,7 @@
+ -include ../config-host.mak
+ VPATH=$(SRC_PATH)/tests
+ 
+-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
++CFLAGS=-Wall -g -fno-strict-aliasing
+ #CFLAGS+=-msse2
+ LDFLAGS=
+ 
+@@ -52,7 +52,7 @@
+ 
+ .PHONY: test-mmap
+ test-mmap: test-mmap.c
+-	$(CC) $(CFLAGS) -Wall -static -O2 $(LDFLAGS) -o $@ $<
++	$(CC) $(CFLAGS) -Wall -static $(LDFLAGS) -o $@ $<
+ 	-./test-mmap
+ 	-$(QEMU) ./test-mmap
+ 	-$(QEMU) -p 8192 ./test-mmap 8192
+@@ -88,17 +88,17 @@
+ 	arm-linux-ld -o $@ $<
+ 
+ hello-arm.o: hello-arm.c
+-	arm-linux-gcc -Wall -g -O2 -c -o $@ $<
++	arm-linux-gcc -Wall -g -c -o $@ $<
+ 
+ test-arm-iwmmxt: test-arm-iwmmxt.s
+ 	cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
+ 
+ # MIPS test
+ hello-mips: hello-mips.c
+-	mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
++	mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $<
+ 
+ hello-mipsel: hello-mips.c
+-	mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
++	mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $<
+ 
+ # testsuite for the CRIS port.
+ test-cris:
+diff -ur xen-3.4.2.orig//tools/libaio/src/Makefile xen-3.4.2//tools/libaio/src/Makefile
+--- xen-3.4.2.orig//tools/libaio/src/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/libaio/src/Makefile	2011-09-26 02:18:14.288771549 +0800
+@@ -6,7 +6,7 @@
+ libdir=$(prefix)/lib
+ 
+ ARCH := $(shell uname -m | sed -e s/i.86/i386/)
+-CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
++CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -fPIC
+ SO_CFLAGS=-shared $(CFLAGS)
+ L_CFLAGS=$(CFLAGS)
+ LINK_FLAGS=
+diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist
+--- xen-3.4.2.orig//tools/libxen/Makefile.dist	2011-09-26 02:17:29.223771569 +0800
++++ xen-3.4.2//tools/libxen/Makefile.dist	2011-09-26 02:18:14.553771549 +0800
+@@ -22,7 +22,7 @@
+ CFLAGS = -Iinclude                     \
+          $(shell xml2-config --cflags) \
+          $(shell curl-config --cflags) \
+-         -W -Wall -Wmissing-prototypes  -std=c99 -O2 -fPIC
++         -W -Wall -Wmissing-prototypes  -std=c99 -fPIC
+ 
+ LDFLAGS = $(shell xml2-config --libs) \
+           $(shell curl-config --libs)
+diff -ur xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4 xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4
+--- xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4	2011-09-26 02:18:14.659771549 +0800
+@@ -62,7 +62,7 @@
+ CFLAGS += -Wno-unused-parameter 
+ 
+ CFLAGS += -g
+-CFLAGS += -O2
++#CFLAGS += -O2
+ CFLAGS += -fno-strict-aliasing 
+ CFLAGS += -fno-common 
+ #CFLAGS += -fomit-frame-pointer
+diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk
+--- xen-3.4.2.orig//extras/mini-os/minios.mk	2011-09-26 02:29:41.869771248 +0800
++++ xen-3.4.2//extras/mini-os/minios.mk	2011-09-26 02:33:55.708771108 +0800
+@@ -23,7 +23,7 @@
+ DEF_CFLAGS += -DGNT_DEBUG
+ DEF_CFLAGS += -DGNTMAP_DEBUG
+ else
+-DEF_CFLAGS += -O3
++#DEF_CFLAGS += -O3
+ endif
+ 
+ # Make the headers define our internal stuff
+diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile
+--- xen-3.4.2.orig//tools/vnet/libxutil/Makefile	2011-09-26 02:29:41.872771248 +0800
++++ xen-3.4.2//tools/vnet/libxutil/Makefile	2011-09-26 02:37:59.835771029 +0800
+@@ -26,7 +26,7 @@
+ 
+ $(call cc-option-add,CFLAGS,CC,-fgnu89-inline)
+ CFLAGS   +=  -fno-strict-aliasing
+-CFLAGS   += -O3
++#CFLAGS   += -O3
+ #CFLAGS   += -g
+ 
+ MAJOR    := 3.0
+diff -ur xen-3.4.2.orig//tools/vnet/vnetd/Makefile xen-3.4.2//tools/vnet/vnetd/Makefile
+--- xen-3.4.2.orig//tools/vnet/vnetd/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/vnet/vnetd/Makefile	2011-09-26 02:37:59.834771029 +0800
+@@ -44,7 +44,7 @@
+ CPPFLAGS += -D __ARCH_I386_ATOMIC__
+ 
+ #----------------------------------------------------------------------------
+-CFLAGS += -O3
++#CFLAGS += -O3
+ CFLAGS += $(INCLUDES) $(LIBS)
+ 
+ LDFLAGS += $(LIBS)
\ No newline at end of file

diff --git a/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch b/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch
new file mode 100644
index 0000000..f9c746d
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-3.4.2-werror-idiocy-v2.patch
@@ -0,0 +1,429 @@
+diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk
+--- xen-3.4.2.orig//Config.mk	2009-11-10 23:16:03.000000000 +0800
++++ xen-3.4.2//Config.mk	2011-09-25 02:34:11.605793042 +0800
+@@ -14,7 +14,7 @@
+ 
+ # Tools to run on system hosting the build
+ HOSTCC      = gcc
+-HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
++HOSTCFLAGS  = -Wall  -Wstrict-prototypes -O2 -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
+ 
+ DISTDIR     ?= $(XEN_ROOT)/dist
+diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk
+--- xen-3.4.2.orig//extras/mini-os/minios.mk	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//extras/mini-os/minios.mk	2011-09-25 02:34:11.855793042 +0800
+@@ -6,7 +6,7 @@
+ 
+ # Define some default flags.
+ # NB. '-Wcast-qual' is nasty, so I omitted it.
+-DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls
++DEF_CFLAGS += -fno-builtin -Wall  -Wredundant-decls -Wno-format -Wno-redundant-decls
+ DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
+ DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
+ DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
+diff -ur xen-3.4.2.orig//tools/blktap/drivers/Makefile xen-3.4.2//tools/blktap/drivers/Makefile
+--- xen-3.4.2.orig//tools/blktap/drivers/Makefile	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//tools/blktap/drivers/Makefile	2011-09-25 02:34:11.750793042 +0800
+@@ -5,7 +5,7 @@
+ QCOW_UTIL    = img2qcow qcow2raw qcow-create
+ LIBAIO_DIR   = ../../libaio/src
+ 
+-CFLAGS   += -Werror
++CFLAGS   += 
+ CFLAGS   += -Wno-unused
+ CFLAGS   += -I../lib
+ CFLAGS   += $(CFLAGS_libxenctrl)
+diff -ur xen-3.4.2.orig//tools/blktap/lib/Makefile xen-3.4.2//tools/blktap/lib/Makefile
+--- xen-3.4.2.orig//tools/blktap/lib/Makefile	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//tools/blktap/lib/Makefile	2011-09-25 02:34:11.748793042 +0800
+@@ -13,7 +13,7 @@
+ SRCS     :=
+ SRCS     += xenbus.c blkif.c xs_api.c
+ 
+-CFLAGS   += -Werror
++CFLAGS   += 
+ CFLAGS   += -Wno-unused
+ CFLAGS   += -fPIC
+ # get asprintf():
+diff -ur xen-3.4.2.orig//tools/console/Makefile xen-3.4.2//tools/console/Makefile
+--- xen-3.4.2.orig//tools/console/Makefile	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//tools/console/Makefile	2011-09-25 02:34:11.704793042 +0800
+@@ -2,7 +2,7 @@
+ XEN_ROOT=../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS  += -Werror
++CFLAGS  += 
+ 
+ CFLAGS  += $(CFLAGS_libxenctrl)
+ CFLAGS  += $(CFLAGS_libxenstore)
+diff -ur xen-3.4.2.orig//tools/debugger/xenitp/Makefile xen-3.4.2//tools/debugger/xenitp/Makefile
+--- xen-3.4.2.orig//tools/debugger/xenitp/Makefile	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//tools/debugger/xenitp/Makefile	2011-09-25 02:34:11.744793042 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-#CFLAGS  += -Werror -g -O0
++#CFLAGS  +=  -g -O0
+ 
+ CFLAGS  += $(CFLAGS_libxenctrl)
+ 
+diff -ur xen-3.4.2.orig//tools/firmware/Rules.mk xen-3.4.2//tools/firmware/Rules.mk
+--- xen-3.4.2.orig//tools/firmware/Rules.mk	2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//tools/firmware/Rules.mk	2011-09-25 02:34:11.565793045 +0800
+@@ -10,7 +10,7 @@
+ CFLAGS += -DNDEBUG
+ endif
+ 
+-CFLAGS += -Werror
++CFLAGS += 
+ 
+ # Disable PIE/SSP if GCC supports them. They can break us.
+ $(call cc-option-add,CFLAGS,CC,-nopie)
+diff -ur xen-3.4.2.orig//tools/flask/libflask/Makefile xen-3.4.2//tools/flask/libflask/Makefile
+--- xen-3.4.2.orig//tools/flask/libflask/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/flask/libflask/Makefile	2011-09-25 02:34:11.657793042 +0800
+@@ -9,7 +9,7 @@
+ SRCS       :=
+ SRCS       += flask_op.c
+ 
+-CFLAGS   += -Werror
++CFLAGS   += 
+ CFLAGS   += -fno-strict-aliasing
+ CFLAGS   += $(INCLUDES) -I./include -I$(XEN_LIBXC) -I$(XEN_INCLUDE)
+ 
+diff -ur xen-3.4.2.orig//tools/flask/loadpolicy/Makefile xen-3.4.2//tools/flask/loadpolicy/Makefile
+--- xen-3.4.2.orig//tools/flask/loadpolicy/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/flask/loadpolicy/Makefile	2011-09-25 02:34:11.660793042 +0800
+@@ -6,7 +6,7 @@
+ LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask
+ 
+ PROFILE=#-pg
+-BASECFLAGS=-Wall -g -Werror
++BASECFLAGS=-Wall -g 
+ BASECFLAGS+= $(PROFILE)
+ #BASECFLAGS+= -I$(XEN_ROOT)/tools
+ BASECFLAGS+= $(CFLAGS_libxenctrl)
+diff -ur xen-3.4.2.orig//tools/fs-back/Makefile xen-3.4.2//tools/fs-back/Makefile
+--- xen-3.4.2.orig//tools/fs-back/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/fs-back/Makefile	2011-09-25 02:34:11.637793042 +0800
+@@ -5,7 +5,7 @@
+ 
+ IBIN         = fs-backend 
+ 
+-CFLAGS   += -Werror
++CFLAGS   += 
+ CFLAGS   += -Wno-unused
+ CFLAGS   += -fno-strict-aliasing
+ CFLAGS   += $(CFLAGS_libxenctrl)
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure	2009-11-05 19:44:56.000000000 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/configure	2011-09-25 02:34:11.888793042 +0800
+@@ -468,7 +468,7 @@
+ CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
+ LDFLAGS="$LDFLAGS -g"
+ if test "$werror" = "yes" ; then
+-CFLAGS="$CFLAGS -Werror"
++CFLAGS="$CFLAGS"
+ fi
+ 
+ if test "$solaris" = "no" ; then
+@@ -1150,7 +1150,7 @@
+ echo "sparse enabled    $sparse"
+ echo "profiler          $profiler"
+ echo "static build      $static"
+-echo "-Werror enabled   $werror"
++
+ if test "$darwin" = "yes" ; then
+     echo "Cocoa support     $cocoa"
+ fi
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target	2011-09-25 02:33:23.946793064 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target	2011-09-25 02:34:11.584793042 +0800
+@@ -26,7 +26,7 @@
+ TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
+ VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
+ CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
+-#CFLAGS+=-Werror
++#CFLAGS+=
+ LIBS=
+ # user emulator name
+ ifndef TARGET_ARCH2
+diff -ur xen-3.4.2.orig//tools/libaio/harness/Makefile xen-3.4.2//tools/libaio/harness/Makefile
+--- xen-3.4.2.orig//tools/libaio/harness/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/libaio/harness/Makefile	2011-09-25 02:34:11.674793042 +0800
+@@ -4,7 +4,7 @@
+ HARNESS_SRCS:=main.c
+ # io_queue.c
+ 
+-CFLAGS=-Wall -Werror -g -O -laio
++CFLAGS=-Wall  -g -O -laio
+ #-lpthread -lrt
+ 
+ all: $(PROGS)
+diff -ur xen-3.4.2.orig//tools/libfsimage/Rules.mk xen-3.4.2//tools/libfsimage/Rules.mk
+--- xen-3.4.2.orig//tools/libfsimage/Rules.mk	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/libfsimage/Rules.mk	2011-09-25 02:34:11.566793044 +0800
+@@ -1,6 +1,6 @@
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror
++CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ 
+ LDFLAGS += -L../common/
+ 
+ PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
+diff -ur xen-3.4.2.orig//tools/libxc/Makefile xen-3.4.2//tools/libxc/Makefile
+--- xen-3.4.2.orig//tools/libxc/Makefile	2011-09-25 02:33:23.987793064 +0800
++++ xen-3.4.2//tools/libxc/Makefile	2011-09-25 02:34:11.687793042 +0800
+@@ -52,7 +52,7 @@
+ 
+ -include $(XEN_TARGET_ARCH)/Makefile
+ 
+-CFLAGS   += -Werror -Wmissing-prototypes
++CFLAGS   +=  -Wmissing-prototypes
+ CFLAGS   += $(INCLUDES) -I. -I../xenstore -I../include
+ 
+ # Needed for posix_fadvise64() in xc_linux.c
+diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist
+--- xen-3.4.2.orig//tools/libxen/Makefile.dist	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/libxen/Makefile.dist	2011-09-25 02:34:11.593793042 +0800
+@@ -22,7 +22,7 @@
+ CFLAGS = -Iinclude                     \
+          $(shell xml2-config --cflags) \
+          $(shell curl-config --cflags) \
+-         -W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC
++         -W -Wall -Wmissing-prototypes  -std=c99 -O2 -fPIC
+ 
+ LDFLAGS = $(shell xml2-config --libs) \
+           $(shell curl-config --libs)
+diff -ur xen-3.4.2.orig//tools/misc/lomount/Makefile xen-3.4.2//tools/misc/lomount/Makefile
+--- xen-3.4.2.orig//tools/misc/lomount/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/misc/lomount/Makefile	2011-09-25 02:34:11.666793042 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=../../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS  += -Werror
++CFLAGS  += 
+ 
+ HDRS     = $(wildcard *.h)
+ OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
+diff -ur xen-3.4.2.orig//tools/misc/Makefile xen-3.4.2//tools/misc/Makefile
+--- xen-3.4.2.orig//tools/misc/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/misc/Makefile	2011-09-25 02:34:11.669793042 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS   += -Werror
++CFLAGS   += 
+ 
+ INCLUDES += -I $(XEN_XC)
+ INCLUDES += -I $(XEN_LIBXC)
+diff -ur xen-3.4.2.orig//tools/pygrub/setup.py xen-3.4.2//tools/pygrub/setup.py
+--- xen-3.4.2.orig//tools/pygrub/setup.py	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/pygrub/setup.py	2011-09-25 02:34:11.901793042 +0800
+@@ -3,7 +3,7 @@
+ import os
+ import sys
+ 
+-extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
++extra_compile_args  = [ "-fno-strict-aliasing" ]
+ 
+ XEN_ROOT = "../.."
+ 
+diff -ur xen-3.4.2.orig//tools/python/setup.py xen-3.4.2//tools/python/setup.py
+--- xen-3.4.2.orig//tools/python/setup.py	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/python/setup.py	2011-09-25 02:34:11.897793042 +0800
+@@ -4,7 +4,7 @@
+ 
+ XEN_ROOT = "../.."
+ 
+-extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
++extra_compile_args  = [ "-fno-strict-aliasing" ]
+ 
+ include_dirs = [ XEN_ROOT + "/tools/libxc",
+                  XEN_ROOT + "/tools/xenstore",
+diff -ur xen-3.4.2.orig//tools/security/Makefile xen-3.4.2//tools/security/Makefile
+--- xen-3.4.2.orig//tools/security/Makefile	2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/security/Makefile	2011-09-25 02:34:11.701793042 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT = ../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS   += -Werror
++CFLAGS   += 
+ CFLAGS   += -fno-strict-aliasing
+ CFLAGS   += -I. $(CFLAGS_libxenctrl)
+ 
+diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile
+--- xen-3.4.2.orig//tools/vnet/libxutil/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/vnet/libxutil/Makefile	2011-09-25 02:34:11.694793042 +0800
+@@ -25,7 +25,7 @@
+ PIC_OBJS := $(LIB_SRCS:.c=.opic)
+ 
+ $(call cc-option-add,CFLAGS,CC,-fgnu89-inline)
+-CFLAGS   += -Werror -fno-strict-aliasing
++CFLAGS   +=  -fno-strict-aliasing
+ CFLAGS   += -O3
+ #CFLAGS   += -g
+ 
+diff -ur xen-3.4.2.orig//tools/vtpm/Rules.mk xen-3.4.2//tools/vtpm/Rules.mk
+--- xen-3.4.2.orig//tools/vtpm/Rules.mk	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/vtpm/Rules.mk	2011-09-25 02:34:11.563793044 +0800
+@@ -9,7 +9,7 @@
+ TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
+ 
+ # General compiler flags
+-CFLAGS   = -Werror -g3 -I.
++CFLAGS   =  -g3 -I.
+ 
+ # Generic project files
+ HDRS	= $(wildcard *.h)
+diff -ur xen-3.4.2.orig//tools/vtpm_manager/Rules.mk xen-3.4.2//tools/vtpm_manager/Rules.mk
+--- xen-3.4.2.orig//tools/vtpm_manager/Rules.mk	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/vtpm_manager/Rules.mk	2011-09-25 02:34:11.562793042 +0800
+@@ -9,7 +9,7 @@
+ TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
+ 
+ # General compiler flags
+-CFLAGS	= -Werror -g3 -I.
++CFLAGS	=  -g3 -I.
+ 
+ # Generic project files
+ HDRS	= $(wildcard *.h)
+diff -ur xen-3.4.2.orig//tools/xcutils/Makefile xen-3.4.2//tools/xcutils/Makefile
+--- xen-3.4.2.orig//tools/xcutils/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xcutils/Makefile	2011-09-25 02:34:11.636793042 +0800
+@@ -11,7 +11,7 @@
+ XEN_ROOT	= ../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS += -Werror
++CFLAGS += 
+ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
+ 
+ PROGRAMS = xc_restore xc_save readnotes lsevtchn
+diff -ur xen-3.4.2.orig//tools/xenmon/Makefile xen-3.4.2//tools/xenmon/Makefile
+--- xen-3.4.2.orig//tools/xenmon/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xenmon/Makefile	2011-09-25 02:34:11.641793042 +0800
+@@ -13,7 +13,7 @@
+ XEN_ROOT=../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS  += -Werror
++CFLAGS  += 
+ CFLAGS  += -I $(XEN_XC)
+ CFLAGS  += $(CFLAGS_libxenctrl)
+ LDFLAGS += $(LDFLAGS_libxenctrl)
+diff -ur xen-3.4.2.orig//tools/xenpmd/Makefile xen-3.4.2//tools/xenpmd/Makefile
+--- xen-3.4.2.orig//tools/xenpmd/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xenpmd/Makefile	2011-09-25 02:34:11.656793042 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS  += -Werror
++CFLAGS  += 
+ CFLAGS  += $(CFLAGS_libxenstore)
+ LDFLAGS += $(LDFLAGS_libxenstore)
+ 
+diff -ur xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile xen-3.4.2//tools/xenstat/libxenstat/Makefile
+--- xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xenstat/libxenstat/Makefile	2011-09-25 02:34:11.681793042 +0800
+@@ -34,7 +34,7 @@
+ OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o
+ SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR)
+ 
+-WARN_FLAGS=-Wall -Werror
++WARN_FLAGS=-Wall 
+ 
+ CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_INCLUDE)
+ LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/
+diff -ur xen-3.4.2.orig//tools/xenstat/xentop/Makefile xen-3.4.2//tools/xenstat/xentop/Makefile
+--- xen-3.4.2.orig//tools/xenstat/xentop/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xenstat/xentop/Makefile	2011-09-25 02:34:11.684793042 +0800
+@@ -18,7 +18,7 @@
+ all install xentop:
+ else
+ 
+-CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
++CFLAGS += -DGCC_PRINTF -Wall  -I$(XEN_LIBXENSTAT)
+ LDFLAGS += -L$(XEN_LIBXENSTAT)
+ LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS)
+ CFLAGS += -DHOST_$(XEN_OS)
+diff -ur xen-3.4.2.orig//tools/xenstore/Makefile xen-3.4.2//tools/xenstore/Makefile
+--- xen-3.4.2.orig//tools/xenstore/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xenstore/Makefile	2011-09-25 02:34:11.640793042 +0800
+@@ -4,7 +4,7 @@
+ MAJOR = 3.0
+ MINOR = 0
+ 
+-CFLAGS += -Werror
++CFLAGS += 
+ CFLAGS += -I.
+ CFLAGS += $(CFLAGS_libxenctrl)
+ 
+diff -ur xen-3.4.2.orig//tools/xenstore/xenstored_core.c xen-3.4.2//tools/xenstore/xenstored_core.c
+--- xen-3.4.2.orig//tools/xenstore/xenstored_core.c	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xenstore/xenstored_core.c	2011-09-25 02:34:11.845793042 +0800
+@@ -865,7 +865,7 @@
+ {
+ 	unsigned int offset, datalen;
+ 	struct node *node;
+-	char *vec[1] = { NULL }; /* gcc4 + -W + -Werror fucks code. */
++	char *vec[1] = { NULL }; /* gcc4 + -W +  fucks code. */
+ 	char *name;
+ 
+ 	/* Extra "strings" can be created by binary data. */
+diff -ur xen-3.4.2.orig//tools/xentrace/Makefile xen-3.4.2//tools/xentrace/Makefile
+--- xen-3.4.2.orig//tools/xentrace/Makefile	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/xentrace/Makefile	2011-09-25 02:34:11.745793042 +0800
+@@ -1,7 +1,7 @@
+ XEN_ROOT=../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+-CFLAGS  += -Werror
++CFLAGS  += 
+ 
+ CFLAGS  += $(CFLAGS_libxenctrl)
+ LDFLAGS += $(LDFLAGS_libxenctrl)
+Only in xen-3.4.2/: Werror.sh
+diff -ur xen-3.4.2.orig//xen/arch/ia64/Rules.mk xen-3.4.2//xen/arch/ia64/Rules.mk
+--- xen-3.4.2.orig//xen/arch/ia64/Rules.mk	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//xen/arch/ia64/Rules.mk	2011-09-25 02:34:11.570793042 +0800
+@@ -68,7 +68,7 @@
+ CFLAGS += -DCONFIG_XEN_IA64_TLBFLUSH_CLOCK
+ endif
+ ifeq ($(no_warns),y)
+-CFLAGS	+= -Wa,--fatal-warnings -Werror -Wno-uninitialized
++CFLAGS	+= -Wa,--fatal-warnings  -Wno-uninitialized
+ endif
+ ifneq ($(vhpt_disable),y)
+ CFLAGS += -DVHPT_ENABLED=1
+diff -ur xen-3.4.2.orig//xen/arch/x86/boot/build32.mk xen-3.4.2//xen/arch/x86/boot/build32.mk
+--- xen-3.4.2.orig//xen/arch/x86/boot/build32.mk	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//xen/arch/x86/boot/build32.mk	2011-09-25 02:34:11.914793042 +0800
+@@ -8,7 +8,7 @@
+ $(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
+ $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
+ 
+-CFLAGS += -Werror -fno-builtin -msoft-float
++CFLAGS += -fno-builtin -msoft-float
+ 
+ # NB. awk invocation is a portable alternative to 'head -n -1'
+ %.S: %.bin
+diff -ur xen-3.4.2.orig//xen/arch/x86/Rules.mk xen-3.4.2//xen/arch/x86/Rules.mk
+--- xen-3.4.2.orig//xen/arch/x86/Rules.mk	2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//xen/arch/x86/Rules.mk	2011-09-25 02:34:11.572793042 +0800
+@@ -17,7 +17,7 @@
+ endif
+ 
+ CFLAGS += -fno-builtin -fno-common
+-CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
++CFLAGS += -iwithprefix include  -Wno-pointer-arith -pipe
+ CFLAGS += -I$(BASEDIR)/include 
+ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
+ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default

diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.1-bridge.patch b/app-emulation/xen-tools/files/xen-tools-4.1.1-bridge.patch
new file mode 100644
index 0000000..4b3a4ba
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.1.1-bridge.patch
@@ -0,0 +1,12 @@
+diff -ur xen-4.1.1.orig//tools/hotplug/Linux/network-bridge xen-4.1.1/tools/hotplug/Linux/network-bridge
+--- xen-4.1.1.orig//tools/hotplug/Linux/network-bridge	2011-10-14 02:28:43.481714285 +0800
++++ xen-4.1.1/tools/hotplug/Linux/network-bridge	2011-10-16 01:06:11.226673108 +0800
+@@ -216,7 +216,7 @@
+ 	return
+     fi
+ 
+-    if [ `brctl show | wc -l` != 1 ]; then
++    if [ `brctl show | grep $netdev | wc -l` != 0 ]; then
+         return
+     fi
+ 

diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.1-curl.patch b/app-emulation/xen-tools/files/xen-tools-4.1.1-curl.patch
new file mode 100644
index 0000000..c3fd913
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.1.1-curl.patch
@@ -0,0 +1,10 @@
+diff -ur xen-4.1.1.orig//tools/check/check_curl xen-4.1.1/tools/check/check_curl
+--- xen-4.1.1.orig//tools/check/check_curl	2011-06-15 00:03:44.000000000 +0800
++++ xen-4.1.1/tools/check/check_curl	2011-10-14 00:42:08.189717078 +0800
+@@ -9,5 +9,6 @@
+ fi
+ 
+ has_or_fail curl-config
+ curl_libs=`curl-config --libs` || fail "curl-config --libs failed"
++curl_libs=`echo $curl_libs | sed -re 's/-(W|march|mtune|pipe)[^[:space:]]*[[:space:]]//g'` || fail "curl-config --libs failed"
+ test_link $curl_libs || fail "dependency libraries for curl are missing"

diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch b/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch
new file mode 100644
index 0000000..ba72c49
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.1.1-libxl-tap.patch
@@ -0,0 +1,37 @@
+Index: xen-tools-4.1.1/tools/libxl/libxl_dm.c
+===================================================================
+--- xen-4.1.1.orig/tools/libxl/libxl_dm.c	Tue Mar 15 10:14:27 2011 +0000
++++ xen-4.1.1/tools/libxl/libxl_dm.c	Tue Mar 15 18:19:47 2011 +0000
+@@ -828,8 +828,29 @@
+         goto out;
+     }
+ 
+-    if (nr_disks > 0 && !libxl__blktap_enabled(&gc))
+-        ret = 1;
++    if (nr_disks > 0) {
++        int blktap_enabled = -1;
++        for (i = 0; i < nr_disks; i++) {
++            switch (disks[i].backend) {
++            case DISK_BACKEND_TAP:
++                if (blktap_enabled == -1)
++                    blktap_enabled = libxl__blktap_enabled(&gc);
++                if (!blktap_enabled) {
++                    ret = 1;
++                    goto out;
++                }
++                break;
++
++            case DISK_BACKEND_QDISK:
++                ret = 1;
++                goto out;
++
++            case DISK_BACKEND_PHY:
++            case DISK_BACKEND_UNKNOWN:
++                break;
++            }
++        }
++    }
+ 
+ out:
+     libxl__free_all(&gc);
+

diff --git a/app-emulation/xen-tools/files/xen-tools-4.1.2-pyxml.patch b/app-emulation/xen-tools/files/xen-tools-4.1.2-pyxml.patch
new file mode 100644
index 0000000..5b14e4c
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.1.2-pyxml.patch
@@ -0,0 +1,12 @@
+--- tools/python/xen/xm/create.py
++++ tools/python/xen/xm/create.py
+@@ -1538,6 +1538,9 @@
+             SXPPrettyPrint.prettyprint(config)
+ 
+         if opts.vals.xmldryrun and serverType == SERVER_XEN_API:
++            import xml
++            if hasattr(xml, "use_pyxml"):
++                xml.use_pyxml()
+             from xml.dom.ext import PrettyPrint as XMLPrettyPrint
+             XMLPrettyPrint(doc)
+ 

diff --git a/app-emulation/xen-tools/files/xenconsoled.confd b/app-emulation/xen-tools/files/xenconsoled.confd
new file mode 100644
index 0000000..b2e194b
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenconsoled.confd
@@ -0,0 +1,2 @@
+# /etc/conf.d/xenstored
+XENCONSOLED_OPTS=""

diff --git a/app-emulation/xen-tools/files/xenconsoled.initd b/app-emulation/xen-tools/files/xenconsoled.initd
new file mode 100644
index 0000000..12e4381
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenconsoled.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenconsoled.initd,v 1.1 2011/04/05 19:23:05 alexxy Exp $
+
+depend() {
+	need xenstored
+}
+
+start() {
+	ebegin "Starting xenconsoled daemon"
+	start-stop-daemon --start --exec /usr/sbin/xenconsoled \
+		--pidfile /var/run/xenconsoled.pid \
+		-- --pid-file=/var/run/xenconsoled.pid \
+		${XENCONSOLED_OPTS}
+	eend $*
+}
+
+stop() {
+	ebegin "Stoping xenconsoled daemon"
+	start-stop-daemon --stop --exec /usr/sbin/xenconsoled \
+		--pidfile /var/run/xenconsoled.pid
+	eend $*
+}
+

diff --git a/app-emulation/xen-tools/files/xend.initd-r1 b/app-emulation/xen-tools/files/xend.initd-r1
new file mode 100644
index 0000000..d1e49b0
--- /dev/null
+++ b/app-emulation/xen-tools/files/xend.initd-r1
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r1,v 1.1 2009/09/01 09:56:36 wschlich Exp $
+
+opts="start stop status restart"
+
+depend() {
+	need net
+	before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
+}
+
+await_daemons_up() {
+	for ((i=0; i<5; i++)); do
+		/usr/sbin/xend status && return 0
+		sleep 1
+	done
+	return 1
+}
+
+is_privileged_domain() {
+	grep -qsE '^control_d$' /proc/xen/capabilities
+	return $?
+}
+
+start() {
+	if is_privileged_domain ; then
+		ebegin "Starting Xen control daemon"
+		/usr/sbin/xend start && await_daemons_up
+		eend $?
+	else
+		eerror "Can't start xend - this is not a privileged domain."
+		return 1
+	fi
+}
+
+stop() {
+	if [ "$(xm list 2>/dev/null | wc -l)" -gt 2 ]; then
+		ebegin "Stopping all Xen domains"
+		/usr/sbin/xm shutdown --all --wait >/dev/null
+		eend $?
+	fi
+
+	ebegin "Stopping Xen control daemon"
+	/usr/sbin/xend stop
+	eend $?
+
+	#ebegin "Stopping xenconsoled"
+	#kill $(</var/run/xenconsoled.pid)
+	#eend $?
+
+	#ebegin "Stopping xenstored"
+	#kill $(</var/run/xenstore.pid)
+	#eend $?
+}
+
+restart() {
+	# IMPORTANT: do NOT restart xenstored/xenconsoled when restarting
+	# just xend, as this can be fatal!
+	# When restarting xend, leave alone xenstored/xenconsoled and all
+	# running domains.
+	# See http://article.gmane.org/gmane.comp.emulators.xen.user/40656
+	ebegin "Restarting Xen control daemon"
+	/usr/sbin/xend restart
+	eend $?
+	# we fool /etc/init.d/runscript.sh:svc_restart() here: svc_stop svc_start
+}
+
+status() {
+	is_privileged_domain && /usr/sbin/xend status
+}

diff --git a/app-emulation/xen-tools/files/xend.initd-r2 b/app-emulation/xen-tools/files/xend.initd-r2
new file mode 100644
index 0000000..b790e7f
--- /dev/null
+++ b/app-emulation/xen-tools/files/xend.initd-r2
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd-r2,v 1.2 2011/09/10 17:22:46 alexxy Exp $
+
+opts="start stop status restart"
+
+depend() {
+	need net xenconsoled xenstored
+	before xendomains sshd
+}
+
+await_daemons_up() {
+	for ((i=0; i<5; i++)); do
+		sleep 1
+		/usr/sbin/xend status && return 0
+	done
+	return 1
+}
+
+is_privileged_domain() {
+	grep -qsE '^control_d$' /proc/xen/capabilities
+	return $?
+}
+
+start() {
+	if is_privileged_domain ; then
+		ebegin "Starting Xen control daemon"
+		/usr/sbin/xend start
+		/usr/sbin/xend status || await_daemons_up
+		eend $?
+	else
+		eerror "Can't start xend - this is not a privileged domain."
+		return 1
+	fi
+}
+
+stop() {
+	if [ "$(xm list | wc -l)" -gt 2 ]; then
+		ebegin "  Stopping all domains"
+		/usr/sbin/xl shutdown -a -w >/dev/null
+		eend $?
+	fi
+
+	ebegin "Stopping Xen control daemon"
+	/usr/sbin/xend stop
+	eend $?
+}
+
+status() {
+	is_privileged_domain && /usr/sbin/xend status
+}

diff --git a/app-emulation/xen-tools/files/xendomains-screen.confd b/app-emulation/xen-tools/files/xendomains-screen.confd
new file mode 100644
index 0000000..1482c0a
--- /dev/null
+++ b/app-emulation/xen-tools/files/xendomains-screen.confd
@@ -0,0 +1,15 @@
+# When SCREEN="yes", domains in AUTODIR have their consoles connected to a
+# screen session named SCREEN_NAME, with output logged to individual files 
+# named after each domain and written to /var/log/xen-consoles/ . These files
+# are rotated (using app-admin/logrotate) every time xendomains is started.
+
+SCREEN="yes"
+SCREEN_NAME="xen"
+
+# Number of seconds between writes to screen's logfiles.
+#
+# Lower values mean more disk activity and hence a possible performance
+# impact, but higher values mean a greater chance of loosing some output
+# in the event of a crash.
+
+SCREEN_LOG_INTERVAL="1"

diff --git a/app-emulation/xen-tools/files/xendomains.confd b/app-emulation/xen-tools/files/xendomains.confd
new file mode 100644
index 0000000..90c1f52
--- /dev/null
+++ b/app-emulation/xen-tools/files/xendomains.confd
@@ -0,0 +1,9 @@
+# /etc/conf.d/xendomains
+
+# Directory of domains to boot. AUTODIR should contain one or more symlinks
+# to domain config files in /etc/xen
+AUTODIR=/etc/xen/auto
+
+# Send shutdown commands to all domains in parallel instead of waiting for
+# each to shutdown individually
+PARALLEL_SHUTDOWN=yes

diff --git a/app-emulation/xen-tools/files/xendomains.initd-r1 b/app-emulation/xen-tools/files/xendomains.initd-r1
new file mode 100755
index 0000000..c7f6f88
--- /dev/null
+++ b/app-emulation/xen-tools/files/xendomains.initd-r1
@@ -0,0 +1,117 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r1,v 1.2 2011/10/13 19:30:37 alexxy Exp $
+
+opts="start stop status restart"
+
+depend() {
+	need xend
+	after dhcp
+}
+
+get_domname() {
+	local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
+
+	if [[ -z ${name_from_file} ]] ; then
+		basename "${1}"
+	else
+		echo ${name_from_file}	
+	fi
+}
+
+is_running() {
+	/usr/sbin/xm list "${1}" >/dev/null 2>&1
+}
+
+using_screen() {
+	[[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]]	
+}
+
+set_screen_cmd() {
+	screen_cmd="screen -c ${SCREENRC:-/dev/null} -q -r ${SCREEN_NAME:=xen} -X"
+}
+
+start() {
+	set_screen_cmd
+
+	einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}"
+	if using_screen ; then
+		ebegin "Creating screen session to hold domain consoles"
+		(  screen -c ${SCREENRC:-/dev/null} -d -m -S ${SCREEN_NAME} -t dom0 && sleep 3 \
+		&& ${screen_cmd} zombie dr \
+		&& logrotate -f /etc/xen/xen-consoles.logrotate \
+		&& ${screen_cmd} logfile  /var/log/xen-consoles/%t.log \
+		&& ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \
+		&& ${screen_cmd} log on \
+		&& ${screen_cmd} deflog on ) >/dev/null
+		if [[ $? -ne 0 ]] ; then
+			eend 1
+			return 1
+		else
+			eend
+		fi
+	fi
+	# Create all domains with config files in AUTODIR.
+	for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
+		name=$(get_domname ${dom})
+		if ! is_running ${name} ; then
+			ebegin "  Starting domain ${name}"
+			if using_screen ; then
+				${screen_cmd} screen -t ${name} xm create ${dom} -c
+			else
+				xm create --quiet ${dom}
+			fi
+			eend $?
+		else
+			einfo "  Not starting domain ${name} - already running"
+		fi
+	done
+}
+
+stop() {
+	set_screen_cmd
+
+	einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}"
+	# Stop all domains with config files in AUTODIR.
+	DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)"
+
+	if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then
+		for dom in $DOMAINS ; do
+			name=$(get_domname ${dom})
+			if is_running ${name} ; then
+				ebegin "  Asking domain ${name} to shutdown in the background..."
+				xm shutdown --wait ${name} >/dev/null &
+			else
+				einfo "  Not stopping domain ${name} - not running"
+			fi
+		done
+		einfo "  Waiting for shutdown of domains that are still running"
+		wait
+		eend $?
+	else
+		for dom in $DOMAINS ; do
+			name=$(get_domname ${dom})
+			if is_running ${name} ; then
+				ebegin "  Waiting for domain ${name} to shutdown"
+				xm shutdown --wait ${name} >/dev/null
+				eend $?
+			else
+				einfo "  Not stopping domain ${name} - not running"
+			fi
+		done
+	fi
+	if using_screen ; then
+		if ${screen_cmd} sleep 0 >/dev/null 2>&1 ; then
+			ebegin "Closing screen session ${SCREEN_NAME}"
+			${screen_cmd} quit
+			eend $?
+		else
+			eend 0
+		fi
+	fi
+}
+
+status() {
+	/usr/sbin/xm list
+}

diff --git a/app-emulation/xen-tools/files/xendomains.initd-r2 b/app-emulation/xen-tools/files/xendomains.initd-r2
new file mode 100644
index 0000000..9240376
--- /dev/null
+++ b/app-emulation/xen-tools/files/xendomains.initd-r2
@@ -0,0 +1,117 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xendomains.initd-r2,v 1.2 2011/09/10 17:22:46 alexxy Exp $
+
+opts="start stop status restart"
+
+depend() {
+	need xenstored xenconsoled xend
+	after dhcp
+}
+
+get_domname() {
+	local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
+
+	if [[ -z ${name_from_file} ]] ; then
+		basename "${1}"
+	else
+		echo ${name_from_file}	
+	fi
+}
+
+is_running() {
+	/usr/sbin/xl list "${1}" >/dev/null 2>&1
+}
+
+using_screen() {
+	[[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]]	
+}
+
+set_screen_cmd() {
+	screen_cmd="screen -c ${SCREENRC:-/dev/null} -q -r ${SCREEN_NAME:=xen} -X"
+}
+
+start() {
+	set_screen_cmd
+
+	einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}"
+	if using_screen ; then
+		ebegin "Creating screen session to hold domain consoles"
+		(  screen -c ${SCREENRC:-/dev/null} -d -m -S ${SCREEN_NAME} -t dom0 \
+		&& ${screen_cmd} zombie dr \
+		&& logrotate -f /etc/xen/xen-consoles.logrotate \
+		&& ${screen_cmd} logfile  /var/log/xen-consoles/%t.log \
+		&& ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \
+		&& ${screen_cmd} log on \
+		&& ${screen_cmd} deflog on ) >/dev/null
+		if [[ $? -ne 0 ]] ; then
+			eend 1
+			return 1
+		else
+			eend
+		fi
+	fi
+	# Create all domains with config files in AUTODIR.
+	for dom in $(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort); do
+		name=$(get_domname ${dom})
+		if ! is_running ${name} ; then
+			ebegin "  Starting domain ${name}"
+			if using_screen ; then
+				${screen_cmd} screen -t ${name} xl create ${dom} -c
+			else
+				xl create --quiet ${dom}
+			fi
+			eend $?
+		else
+			einfo "  Not starting domain ${name} - already running"
+		fi
+	done
+}
+
+stop() {
+	set_screen_cmd
+
+	einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}"
+	# Stop all domains with config files in AUTODIR.
+	DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)"
+
+	if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then
+		for dom in $DOMAINS ; do
+			name=$(get_domname ${dom})
+			if is_running ${name} ; then
+				ebegin "  Asking domain ${name} to shutdown in the background..."
+				xl shutdown -w ${name} >/dev/null &
+			else
+				einfo "  Not stopping domain ${name} - not running"
+			fi
+		done
+		einfo "  Waiting for shutdown of domains that are still running"
+		wait
+		eend $?
+	else
+		for dom in $DOMAINS ; do
+			name=$(get_domname ${dom})
+			if is_running ${name} ; then
+				ebegin "  Waiting for domain ${name} to shutdown"
+				xl shutdown -w ${name} >/dev/null
+				eend $?
+			else
+				einfo "  Not stopping domain ${name} - not running"
+			fi
+		done
+	fi
+	if using_screen ; then
+		if ${screen_cmd} sleep 0 >/dev/null 2>&1 ; then
+			ebegin "Closing screen session ${SCREEN_NAME}"
+			${screen_cmd} quit
+			eend $?
+		else
+			eend 0
+		fi
+	fi
+}
+
+status() {
+	/usr/sbin/xl list
+}

diff --git a/app-emulation/xen-tools/files/xenstored.confd b/app-emulation/xen-tools/files/xenstored.confd
new file mode 100644
index 0000000..31b9293
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenstored.confd
@@ -0,0 +1,2 @@
+# /etc/conf.d/xenstored
+XENSTORED_OPTS=""

diff --git a/app-emulation/xen-tools/files/xenstored.initd b/app-emulation/xen-tools/files/xenstored.initd
new file mode 100755
index 0000000..f85aa4f
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenstored.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xenstored.initd,v 1.2 2011/04/05 21:25:03 alexxy Exp $
+
+depend() {
+	need net
+	before xendomains xend sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp 
+}
+
+start() {
+	ebegin "Starting xenstored daemon"
+	start-stop-daemon --start --exec /usr/sbin/xenstored \
+		--pidfile /var/run/xenstored.pid \
+		-- --pid-file=/var/run/xenstored.pid \
+		$XENSTORED_OPTS
+	sleep 15
+	einfo "Setting domain0 name record"
+	/usr/bin/xenstore-write "/local/domain/0/name" "Domain-0"
+	eend $*
+}
+
+stop() {
+	ebegin "Stopping xenstored daemon"
+	start-stop-daemon --stop --exec /usr/sbin/xenstored \
+		--pidfile /var/run/xenstored.pid
+	eend $?
+}
+

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
new file mode 100644
index 0000000..501368b
--- /dev/null
+++ b/app-emulation/xen-tools/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>xen</herd>
+	<maintainer>
+		<email>johneed@hotmail.com</email>
+		<name>Ian Delaney aka idella4 proxy maintainer</name>
+	</maintainer>
+	<use>
+		<flag name='acm'>Enable the ACM/sHype XSM module from IBM for xen-3</flag>
+		<flag name='api'>Build the C libxenapi bindings</flag>
+		<flag name='flask'>Enable the Flask XSM module from NSA</flag>
+		<flag name='hvm'>Enable support for hardware based virtualization (VT-x,AMD-v)</flag>
+		<flag name='ioemu'>Enable IOEMU support</flag>
+		<flag name='qemu'>Enable IOEMU support via the use of qemu-dm</flag>
+		<flag name='pygrub'>Install the pygrub boot loader</flag>
+		<flag name='screen'>Enable support for running domain U console in an <pkg>app-misc/screen</pkg> session</flag>
+		<flag name='xend'>Enable support the xend and xm to manage xen</flag>
+	</use>
+</pkgmetadata>

diff --git a/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild b/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild
new file mode 100644
index 0000000..c31830b
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.4.2-r5.ebuild,v 1.4 2011/10/25 18:40:28 alexxy Exp $
+
+EAPI="3"
+
+inherit base flag-o-matic eutils multilib python toolchain-funcs
+
+# TPMEMUFILE=tpm_emulator-0.4.tar.gz
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
+#	vtpm? ( mirror://berlios/tpm-emulator/${TPMEMUFILE} )"
+S="${WORKDIR}/xen-${PV}"
+QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
+	/usr/share/xen/qemu/openbios-sparc64 \
+	/usr/share/xen/qemu/openbios-sparc32"
+QA_WX_LOAD="${QA_PRESTRIPPED}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc debug screen custom-cflags pygrub hvm api acm flask"
+
+CDEPEND="dev-lang/python[ncurses,threads]
+	sys-libs/zlib
+	hvm? ( media-libs/libsdl )
+	acm? ( dev-libs/libxml2 )
+	api? ( dev-libs/libxml2 net-misc/curl )"
+#	vtpm? ( dev-libs/gmp dev-libs/openssl )
+
+DEPEND="${CDEPEND}
+	sys-devel/gettext
+	sys-devel/gcc
+	dev-lang/perl
+	dev-lang/python[ssl]
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-tex/latex2html[png,gif]
+		media-gfx/transfig
+		media-gfx/graphviz
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? (
+		x11-proto/xproto
+		sys-devel/dev86
+	)"
+
+RDEPEND="${CDEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	dev-python/pyxml
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	|| ( sys-fs/udev sys-apps/hotplug )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
+	"${FILESDIR}/${PN}-3.3.0-nostrip.patch"
+	"${FILESDIR}/${PN}-3.3.1-sandbox-fix.patch"
+	"${FILESDIR}/${P}-as-needed.patch"
+	"${FILESDIR}/${P}-fix-definitions.patch"
+	"${FILESDIR}/${P}-fix-include.patch"
+	"${FILESDIR}/${P}-werror-idiocy-v2.patch"
+	"${FILESDIR}/${P}-ldflags-respect.patch"
+)
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
+QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
+	usr/share/xen/qemu/openbios-sparc64"
+
+pkg_setup() {
+	if [ -x /.config/ ]; then
+		die "the system has a dir /.config; this needs to be removed to allow the package to emerge"
+	fi
+
+	export "CONFIG_LOMOUNT=y"
+
+	if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
+		eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
+		eerror "an amd64 multilib profile is required. Remove the hvm use flag"
+		eerror "to build xen-tools on your current profile."
+		die "USE=hvm is unsupported on this system."
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+
+#	use vtpm    && export "VTPM_TOOLS=y"
+	use api     && export "LIBXENAPI_BINDINGS=y"
+	use acm     && export "ACM_SECURITY=y"
+	use flask   && export "FLASK_ENABLE=y"
+}
+
+src_prepare() {
+	base_src_prepare
+
+	#	use vtpm && cp "${DISTDIR}"/${TPMEMUFILE}  tools/vtpm
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	# Try and remove all the default custom-cflags
+	if use custom-cflags; then
+		epatch "${FILESDIR}/${P}-remove-default-cflags.patch"
+	fi
+
+	# Disable hvm support on systems that don't support x86_32 binaries.
+	if ! use hvm; then
+		chmod 644 tools/check/check_x11_devel
+		sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
+		sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
+	fi
+
+	if ! use pygrub; then
+		sed -i -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' "${S}"/tools/Makefile
+	fi
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt} || die "compile failed"
+
+	if use doc; then
+		sh ./docs/check_pkgs || die "package check failed"
+		emake docs || die "compiling docs failed"
+		emake dev-docs || die "make dev-docs failed"
+	fi
+
+	emake -C docs man-pages || die "make man-pages failed"
+}
+
+src_install() {
+	make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools  \
+		|| die "install failed"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/etc/sysconfig
+
+	# Remove unneeded static-libs
+	rm "${D}"/usr/lib64/libxenctrl.a "${D}"/usr/lib64/libxenguest.a \
+	"${D}"/usr/lib64/libflask.a "${D}"/usr/lib64/libxenstore.a \
+	"${D}"/usr/lib64/libblktap.a "${D}"/usr/lib64/libxenapi.a
+
+	dodoc README docs/README.xen-bugtool docs/ChangeLog
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \
+			|| die "install docs failed"
+
+		dohtml -r docs/api/
+		docinto pdf
+		dodoc docs/api/tools/python/latex/refman.pdf
+
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+	rm -rf "${D}"/usr/share/doc/xen/
+
+	doman docs/man?/*
+
+	newinitd "${FILESDIR}"/xend.initd-r1 xend \
+		|| die "Couldn't install xen.initd"
+	newconfd "${FILESDIR}"/xendomains.confd xendomains \
+		|| die "Couldn't install xendomains.confd"
+	newinitd "${FILESDIR}"/xendomains.initd-r1 xendomains \
+		|| die "Couldn't install xendomains.initd"
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/
+		keepdir /var/log/xen-consoles
+	fi
+
+	# xend expects these to exist
+	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
+
+	# for xendomains
+	keepdir /etc/xen/auto
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the unoffical wiki page:"
+	elog " http://www.gentoo.org/doc/en/xen-guide.xml"
+	elog " http://en.gentoo-wiki.com/wiki/Xen/"
+
+	if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
+		echo
+		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
+		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
+		ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
+	fi
+
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 multilib system is required to build HVM support."
+		echo
+		elog "The ioemu use flag has been removed and replaced with hvm."
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+
+	python_mod_optimize $(use pygrub && echo grub) xen
+}
+
+pkg_postrm() {
+	python_mod_cleanup $(use pygrub && echo grub) xen
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild
new file mode 100644
index 0000000..e27e24d
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild
@@ -0,0 +1,344 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-4.1.2-r1.ebuild,v 1.1 2011/11/11 17:50:59 neurogeek Exp $
+
+EAPI="4"
+
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="xml"
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~x86"
+	XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
+	$XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
+	S="${WORKDIR}/xen-${PV}"
+fi
+
+inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend"
+QA_PRESTRIPPED="/usr/share/xen/qemu/openbios-ppc \
+	/usr/share/xen/qemu/openbios-sparc64 \
+	/usr/share/xen/qemu/openbios-sparc32"
+QA_WX_LOAD=${QA_PRESTRIPPED}
+
+CDEPEND="<dev-libs/yajl-2
+	dev-python/lxml
+	dev-python/pypam
+	dev-python/pyxml
+	sys-libs/zlib
+	hvm? ( media-libs/libsdl
+		sys-power/iasl )
+	api? ( dev-libs/libxml2 net-misc/curl )"
+
+DEPEND="${CDEPEND}
+	sys-devel/gcc
+	dev-lang/perl
+	app-misc/pax-utils
+	dev-ml/findlib
+	doc? (
+		app-doc/doxygen
+		dev-tex/latex2html
+		media-gfx/transfig
+		media-gfx/graphviz
+		dev-tex/xcolor
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? (
+		x11-proto/xproto
+		sys-devel/dev86
+	)"
+
+RDEPEND="${CDEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	>=dev-lang/ocaml-3.12.0
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	|| ( sys-fs/udev sys-apps/hotplug )"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
+QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
+	usr/share/xen/qemu/openbios-sparc64"
+RESTRICT="test"
+
+pkg_setup() {
+	python_set_active_version 2
+	python_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	if use qemu; then
+		export "CONFIG_IOEMU=y"
+	else
+		export "CONFIG_IOEMU=n"
+	fi
+
+	if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
+		eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
+		eerror "an amd64 multilib profile is required. Remove the hvm use flag"
+		eerror "to build xen-tools on your current profile."
+		die "USE=hvm is unsupported on this system."
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+
+	if use doc && ! has_version "dev-tex/latex2html[png,gif]"; then
+		# die early instead of later
+		eerror "USE=doc requires latex2html with image support. Please add"
+		eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
+		die "latex2html missing both png and gif flags"
+	fi
+
+	if use pygrub && ! has_version "dev-lang/python[ncurses]"; then
+		eerror "USE=pygrub requires python to be built with ncurses support. Please add"
+		eerror "'ncurses' to your use flags and re-emerge python"
+		die "python is missing ncurses flags"
+	fi
+
+	if ! has_version "dev-lang/python[threads]"; then
+		eerror "Python is required to be built with threading support. Please add"
+		eerror "'threads' to your use flags and re-emerge python"
+		die "python is missing threads flags"
+	fi
+
+	use api     && export "LIBXENAPI_BINDINGS=y"
+	use flask   && export "FLASK_ENABLE=y"
+
+	if use hvm && ! use qemu; then
+		elog "With qemu disabled, it is not possible to use HVM machines " \
+			"or PVM machines with a framebuffer attached in the kernel config" \
+			"The addition of use flag qemu is required when use flag hvm ise selected"
+	fi
+}
+
+src_prepare() {
+	cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
+	sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
+
+	# Drop .config
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+	# Xend
+	if ! use xend; then
+		sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
+			-i tools/misc/Makefile || die "Disabling xend failed" || die
+		sed -e 's:^XEND_INITD:#XEND_INITD:' \
+			-i tools/examples/Makefile || "Disabling xend failed" || die
+	fi
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+	# try and remove all the default custom-cflags
+	find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
+		-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+		-i {} \; || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
+	fi
+
+	# Disable hvm support on systems that don't support x86_32 binaries.
+	if ! use hvm; then
+		chmod 644 tools/check/check_x11_devel
+		sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
+		sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Fix build for gcc-4.6
+	sed -e "s:-Werror::g" -i  tools/xenstat/xentop/Makefile || die
+
+	# Fix network broadcast on bridged networks
+	epatch "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
+
+	# Do not strip binaries
+	epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
+
+	# Prevent the downloading of ipxe
+	sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
+		-e 's:^\tfi:#\tfi:' -i \
+		-e 's:^\tmv _$T $T:#\tmv _$T $T:' \
+		-i tools/firmware/etherboot/Makefile || die
+
+	# Fix bridge by idella4, bug #362575
+	epatch "${FILESDIR}/${PN}-4.1.1-bridge.patch"
+
+	# Remove check_curl, new fix to Bug #386487
+	epatch "${FILESDIR}/xen-tools-4.1.1-curl.patch"
+	sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' \
+		tools/check/check_curl || die
+
+	# Don't build ipxe with pie on hardened, Bug #360805
+	if gcc-specs-pie; then
+		epatch "${FILESDIR}/ipxe-nopie.patch"
+	fi
+
+	# Fix create.py for pyxml Bug 367735
+	epatch "${FILESDIR}/xen-tools-4.1.2-pyxml.patch"
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
+
+	if use doc; then
+		sh ./docs/check_pkgs || die "package check failed"
+		emake docs
+		emake dev-docs
+	fi
+
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/etc/init.d
+	export CONFIG_LEAF_DIR=default
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
+	python_convert_shebangs -r 2 "${ED}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=1:autoballoon=1:' \
+		-e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
+		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
+		-i tools/examples/xl.conf  || die
+
+	dodoc README docs/README.xen-bugtool docs/ChangeLog
+	if use doc; then
+		emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+	dohtml -r docs/api/
+		docinto pdf
+		dodoc ${DOCS[@]}
+	#docs/api/tools/python/latex/refman.pdf
+		[ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
+	fi
+	rm -rf "${ED}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	if use xend; then
+		newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd"
+	fi
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored \
+		"${FILESDIR}"/xenconsoled.initd xenconsoled
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# xend expects these to exist
+	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
+
+	# for xendomains
+	keepdir /etc/xen/auto
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the unoffical wiki page:"
+	elog " http://www.gentoo.org/doc/en/xen-guide.xml"
+	elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
+
+	if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
+		echo
+		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
+		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
+		ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
+	fi
+
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 multilib system is required to build HVM support."
+		echo
+		elog "The qemu use flag has been removed and replaced with hvm."
+	fi
+
+	if use xend; then
+		echo
+		elog "xend capability has been enabled and installed"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+	python_mod_optimize $(use pygrub && echo grub) xen
+}
+
+pkg_postrm() {
+	python_mod_cleanup $(use pygrub && echo grub) xen
+}

diff --git a/app-emulation/xen-tools/xen-tools-9999.ebuild b/app-emulation/xen-tools/xen-tools-9999.ebuild
new file mode 100644
index 0000000..d9b8b0a
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-9999.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-9999.ebuild,v 1.7 2011/10/23 10:49:29 patrick Exp $
+
+EAPI="4"
+
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="xml"
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~x86"
+	XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz \
+	$XEN_EXTFILES_URL/ipxe-git-v1.0.0.tar.gz"
+	S="${WORKDIR}/xen-${PV}"
+fi
+
+inherit flag-o-matic eutils multilib python toolchain-funcs ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool docs/ChangeLog )
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="api custom-cflags debug doc flask hvm qemu pygrub screen xend"
+
+CDEPEND="<dev-libs/yajl-2
+	dev-python/lxml
+	dev-python/pypam
+	dev-python/pyxml
+	sys-libs/zlib
+	hvm? ( media-libs/libsdl
+		sys-power/iasl )
+	api? ( dev-libs/libxml2 net-misc/curl )"
+
+DEPEND="${CDEPEND}
+	sys-devel/gcc
+	dev-lang/perl
+	app-misc/pax-utils
+	dev-ml/findlib
+	doc? (
+		app-doc/doxygen
+		dev-tex/latex2html
+		media-gfx/transfig
+		media-gfx/graphviz
+		dev-tex/xcolor
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? (
+		x11-proto/xproto
+		sys-devel/dev86
+	)"
+
+RDEPEND="${CDEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	>=dev-lang/ocaml-3.12.0
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	|| ( sys-fs/udev sys-apps/hotplug )"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
+QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
+	usr/share/xen/qemu/openbios-sparc64"
+RESTRICT="test"
+
+pkg_setup() {
+	python_set_active_version 2
+	python_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	if use qemu; then
+		export "CONFIG_IOEMU=y"
+	else
+		export "CONFIG_IOEMU=n"
+	fi
+
+	if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
+		eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
+		eerror "an amd64 multilib profile is required. Remove the hvm use flag"
+		eerror "to build xen-tools on your current profile."
+		die "USE=hvm is unsupported on this system."
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+
+	if use doc && ! has_version "dev-tex/latex2html[png,gif]"; then
+		# die early instead of later
+		eerror "USE=doc requires latex2html with image support. Please add"
+		eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
+		die "latex2html missing both png and gif flags"
+	fi
+
+	if use pygrub && ! has_version "dev-lang/python[ncurses]"; then
+		eerror "USE=pygrub requires python to be built with ncurses support. Please add"
+		eerror "'ncurses' to your use flags and re-emerge python"
+		die "python is missing ncurses flags"
+	fi
+
+	if ! has_version "dev-lang/python[threads]"; then
+		eerror "Python is required to be built with threading support. Please add"
+		eerror "'threads' to your use flags and re-emerge python"
+		die "python is missing threads flags"
+	fi
+
+	use api     && export "LIBXENAPI_BINDINGS=y"
+	use flask   && export "FLASK_ENABLE=y"
+
+	if use hvm && ! use qemu; then
+		elog "With qemu disabled, it is not possible to use HVM machines " \
+			"or PVM machines with a framebuffer attached in the kernel config" \
+			"The addition of use flag qemu is required when use flag hvm ise selected"
+	fi
+}
+
+src_prepare() {
+	cp "$DISTDIR/ipxe-git-v1.0.0.tar.gz" tools/firmware/etherboot/ipxe.tar.gz
+	sed -e 's/-Wall//' -i Config.mk || die "Couldn't sanitize CFLAGS"
+
+	# Drop .config
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
+	# Xend
+	if ! use xend; then
+		sed -e 's:xm xen-bugtool xen-python-path xend:xen-bugtool xen-python-path:' \
+			-i tools/misc/Makefile || die "Disabling xend failed" || die
+		sed -e 's:^XEND_INITD:#XEND_INITD:' \
+			-i tools/examples/Makefile || "Disabling xend failed" || die
+	fi
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+	# try and remove all the default custom-cflags
+	find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
+		-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+		-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+		-i {} \; || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
+	fi
+
+	# Disable hvm support on systems that don't support x86_32 binaries.
+	if ! use hvm; then
+		chmod 644 tools/check/check_x11_devel
+		sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
+		sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g"  -i Makefile || die
+	fi
+
+	# Fix build for gcc-4.6
+	sed -e "s:-Werror::g" -i  tools/xenstat/xentop/Makefile || die
+
+	# Prevent the downloading of ipxe
+	sed -e 's:^\tif ! wget -O _$T:#\tif ! wget -O _$T:' \
+		-e 's:^\tfi:#\tfi:' -i \
+		-e 's:^\tmv _$T $T:#\tmv _$T $T:' \
+		-i tools/firmware/etherboot/Makefile || die
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	emake CC=$(tc-getCC) LD=$(tc-getLD) -C tools ${myopt}
+
+	if use doc; then
+		sh ./docs/check_pkgs || die "package check failed"
+		emake docs
+		emake dev-docs
+	fi
+
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/etc/init.d
+	export CONFIG_LEAF_DIR=default
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools
+	python_convert_shebangs -r 2 "${ED}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${ED}"/etc/init.d/xen* "${ED}"/etc/default || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=1:autoballoon=1:' \
+		-e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
+		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
+		-i tools/examples/xl.conf  || die
+
+	dodoc README docs/README.xen-bugtool docs/ChangeLog
+	if use doc; then
+		emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-docs \
+			|| die "install docs failed"
+
+		dohtml -r docs/api/
+		docinto pdf
+		dodoc ${DOCS[@]}
+#docs/api/tools/python/latex/refman.pdf
+		[ -d "${ED}"/usr/share/doc/xen ] && mv "${ED}"/usr/share/doc/xen/* "${ED}"/usr/share/doc/${PF}/html
+	fi
+	rm -rf "${ED}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	if use xend; then
+		newinitd "${FILESDIR}"/xend.initd-r2 xend || die "Couldn't install xen.initd"
+	fi
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# xend expects these to exist
+	keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
+
+	# for xendomains
+	keepdir /etc/xen/auto
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the unoffical wiki page:"
+	elog " http://www.gentoo.org/doc/en/xen-guide.xml"
+	elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
+
+	if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
+		echo
+		ewarn "xend may not work when python is built with stack smashing protection (ssp)."
+		ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
+		ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
+	fi
+
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 multilib system is required to build HVM support."
+		echo
+		elog "The qemu use flag has been removed and replaced with hvm."
+	fi
+
+	if use xend; then
+		echo
+		elog "xend capability has been enabled and installed"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+	python_mod_optimize $(use pygrub && echo grub) xen
+}
+
+pkg_postrm() {
+	python_mod_cleanup $(use pygrub && echo grub) xen
+}
\ No newline at end of file



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-28  9:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 15:41 [gentoo-commits] proj/virtualization:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/ Alexey Shvetsov
  -- strict thread matches above, loose matches on Subject: below --
2014-02-28  9:35 Lan Yixun
2013-02-12 13:22 Ian Delaney
2012-11-21 12:48 Ian Delaney
2011-11-28 18:29 Alexey Shvetsov
2011-11-20 19:57 Ian Delaney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox