diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2011-09-25 19:45:22 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2011-09-25 19:45:22 +0000 |
commit | 1c324afb2286bd36767bb46e15d5b71a05a15ff0 (patch) | |
tree | e2033c31f8243999b9cdeb29c24a8be724104d26 /app-emulation | |
parent | Fix pari-2.5 compatibility (Bug 381347) and two emacs-improvements (diff) | |
download | historical-1c324afb2286bd36767bb46e15d5b71a05a15ff0.tar.gz historical-1c324afb2286bd36767bb46e15d5b71a05a15ff0.tar.bz2 historical-1c324afb2286bd36767bb46e15d5b71a05a15ff0.zip |
Proxy commit for Ian "idella4" Delaney. Be more thorough for custom-cflags and use a diff instead of sed magic, closes bug #383975. Use toolchain-funcs to invoke correct compiler, closes bug #383973.
Package-Manager: portage-2.1.10.18/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/xen-tools/ChangeLog | 10 | ||||
-rw-r--r-- | app-emulation/xen-tools/Manifest | 5 | ||||
-rw-r--r-- | app-emulation/xen-tools/files/xen-tools-3.4.2-remove-default-cflags.patch | 257 | ||||
-rw-r--r-- | app-emulation/xen-tools/xen-tools-3.4.2-r4.ebuild | 231 |
4 files changed, 501 insertions, 2 deletions
diff --git a/app-emulation/xen-tools/ChangeLog b/app-emulation/xen-tools/ChangeLog index 3bfcc47d17f0..63ca11d31fa0 100644 --- a/app-emulation/xen-tools/ChangeLog +++ b/app-emulation/xen-tools/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-emulation/xen-tools # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.93 2011/09/25 13:41:47 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.94 2011/09/25 19:45:22 chainsaw Exp $ + +*xen-tools-3.4.2-r4 (25 Sep 2011) + + 25 Sep 2011; Tony Vroon <chainsaw@gentoo.org> +xen-tools-3.4.2-r4.ebuild, + +files/xen-tools-3.4.2-remove-default-cflags.patch: + Proxy commit for Ian "idella4" Delaney. Be more thorough for custom-cflags + and use a diff instead of sed magic, closes bug #383975. Use toolchain-funcs + to invoke correct compiler, closes bug #383973. 25 Sep 2011; Tony Vroon <chainsaw@gentoo.org> xen-tools-3.4.2-r3.ebuild: Marked stable on AMD64 based on arch testing by Agostino "ago" Sarubbo & Ian diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest index 6e7464df77c1..b3996126dbe0 100644 --- a/app-emulation/xen-tools/Manifest +++ b/app-emulation/xen-tools/Manifest @@ -5,6 +5,7 @@ AUX xen-tools-3.4.0-network-bridge-broadcast.patch 496 RMD160 3a8c57fe70837861f6 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-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-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 @@ -22,8 +23,10 @@ DIST ipxe-git-v1.0.0.tar.gz 1996881 RMD160 dcd9b6eaafa1ce05c1ebf2a15f2f73ad7a8c5 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 EBUILD xen-tools-3.4.2-r3.ebuild 7053 RMD160 64a4d2b29944d66ffbe8093ba41c8cdbba33bf40 SHA1 e5ec4ae7d3329488f9ff69785c4dec11fc242aa0 SHA256 8e8c5ff10424e9a3d922b5e6d8efb448c2bf42f591f19f240c3654c4c5803d25 +EBUILD xen-tools-3.4.2-r4.ebuild 6683 RMD160 01459e03920d5f0e01d546ea6a91ba1e847b1b87 SHA1 8b673bac9ac64b87e94ae86e861094190ce02536 SHA256 4ef7a68d34b76ba334f59ffb710bcdb882fbab429afe604c1ef2ee52862d94b5 EBUILD xen-tools-3.4.2.ebuild 7086 RMD160 ce6037714a2bef2aa117157f200ddbcb4bd88484 SHA1 30f5ffe1852ba3c3676a12e1983898d1a89fa852 SHA256 23547d91a41cfe46579310004cb8edcd9119a1b8e5672ba3489f7b845f178b14 EBUILD xen-tools-4.1.1-r5.ebuild 9879 RMD160 ca9d66695af20b3fcb9a55de588fc90ef296a7d7 SHA1 a6218a798cbba8fd47036af39b03cdbf6752c0be SHA256 2d857bd4b385d66cb1c5f6a90fcf0f941e990ec5c48627bd28de146d7456b7aa EBUILD xen-tools-9999.ebuild 9682 RMD160 2f60aa64bb720767cee6b7a88a421613f92dcf02 SHA1 69a5487f75dd757d5da96bb2339c38819fe6d4d6 SHA256 20770f7c8a02ea141be8a8772624e6dcf8266dbee477b31e87f265695b939a69 -MISC ChangeLog 22829 RMD160 874997ae78411d1f2d27ed81af3d87a4ce44172a SHA1 c85dcfac56b440ab6ec340f7156717025ac47abc SHA256 edfbbe1f3d1ef8edb4ca3c7efb25ce703992b7a96baa147bd16c48f4b8911733 +MISC ChangeLog 23201 RMD160 14819e6b125018cfd4dadf59106725617b649ced SHA1 d97c5bfec40513c9be268e00d870625b5172a6e4 SHA256 efc670375692854b110753f8e18e4604e6d1c631e6614f1f4591a11de08ece7d MISC metadata.xml 865 RMD160 7188d730684d02d8bcf8dbce413c01ae50b84ad1 SHA1 4815bcf6d0c2c61c6186ecde52d984669c44ccfd SHA256 08f789d1d92184515d9360b20c7ec0f8554977c470c702c659e79aced68edf38 +MISC xen-tools-3.4.2-r4.ebuild.orig 7053 RMD160 64a4d2b29944d66ffbe8093ba41c8cdbba33bf40 SHA1 e5ec4ae7d3329488f9ff69785c4dec11fc242aa0 SHA256 8e8c5ff10424e9a3d922b5e6d8efb448c2bf42f591f19f240c3654c4c5803d25 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 000000000000..8ca546b55190 --- /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/xen-tools-3.4.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-3.4.2-r4.ebuild new file mode 100644 index 000000000000..f7f92c77235d --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.4.2-r4.ebuild @@ -0,0 +1,231 @@ +# 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-r4.ebuild,v 1.1 2011/09/25 19:45:22 chainsaw 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}" + +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] + dev-texlive/texlive-latexextra + media-gfx/transfig + media-gfx/graphviz + ) + 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" +) + +# 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() { + 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) -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 + + 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 +} |