aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2010-12-27 18:06:25 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2010-12-28 21:15:44 -0600
commitd16919042d04958d058eb71a618a8d0c4836789c (patch)
tree7a3b740cbf51a1fc470a3810e1ebb22a6a159426 /testing
parentd44d3ca74a0a6b98edf4cb071d99a8f5e7f940ba (diff)
downloadaports-d16919042d04958d058eb71a618a8d0c4836789c.tar.bz2
aports-d16919042d04958d058eb71a618a8d0c4836789c.tar.xz
testing/xen: new aport.
Diffstat (limited to 'testing')
-rw-r--r--testing/xen/APKBUILD69
-rw-r--r--testing/xen/xen-blktap-uclibc.patch11
-rw-r--r--testing/xen/xen-blktap2-uclibc.patch22
-rw-r--r--testing/xen/xen-disable-firmware.patch10
-rw-r--r--testing/xen/xen-disable-fsback.patch10
-rw-r--r--testing/xen/xen-disable-werror.patch33
-rw-r--r--testing/xen/xen-dont-use-lib64.patch11
7 files changed, 166 insertions, 0 deletions
diff --git a/testing/xen/APKBUILD b/testing/xen/APKBUILD
new file mode 100644
index 0000000000..094f42abd1
--- /dev/null
+++ b/testing/xen/APKBUILD
@@ -0,0 +1,69 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=xen
+pkgver=4.0.1
+pkgrel=0
+pkgdesc="Xen hypervisor"
+url="http://www.xen.org/"
+license="GPL"
+depends=
+makedepends="coreutils python sed gawk libgcrypt-dev gnutls-dev pciutils-dev texinfo git wget"
+install=
+subpackages="$pkgname-doc"
+source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
+ xen-blktap-uclibc.patch
+ xen-blktap2-uclibc.patch
+ xen-disable-firmware.patch
+ xen-disable-fsback.patch
+ xen-disable-werror.patch
+ xen-dont-use-lib64.patch"
+arch="x86 x86_64"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i..."
+ patch -s -p1 -N -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+
+ # We unset $CFLAGS and $LDFLAGS because Xen's buildsystem does not
+ # like these values being set. Arguably this is a bug but I can't be
+ # bothered to track it down. --nenolod
+ unset CFLAGS
+ unset LDFLAGS
+
+ # If we provide no parameters it tries to build a kernel image. We
+ # definitely don't want that.
+ make xen tools stubdom || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ # We unset $CFLAGS and $LDFLAGS because Xen's buildsystem does not
+ # like these values being set. Arguably this is a bug but I can't be
+ # bothered to track it down. --nenolod
+ unset CFLAGS
+ unset LDFLAGS
+
+ make DESTDIR="$pkgdir" install-xen install-tools install-stubdom
+}
+
+md5sums="d197afad975ab2396a67323d57388c27 xen-4.0.1.tar.gz
+edb5c3e7fba8214702fac709f0e53124 xen-blktap-uclibc.patch
+1f7f847ae0baa915c7b52d0ed5869fe6 xen-blktap2-uclibc.patch
+a569f16a7e3c832ba3fab6154f657244 xen-disable-firmware.patch
+03d1fff892e627b812bba4e6c56d696a xen-disable-fsback.patch
+949d0d3bc1e8f300a849279b60760c6a xen-disable-werror.patch
+b6599060e22b61dabee0fe460b4a0c9d xen-dont-use-lib64.patch"
diff --git a/testing/xen/xen-blktap-uclibc.patch b/testing/xen/xen-blktap-uclibc.patch
new file mode 100644
index 0000000000..d8668ec19b
--- /dev/null
+++ b/testing/xen/xen-blktap-uclibc.patch
@@ -0,0 +1,11 @@
+--- xen-4.0.1/tools/blktap/drivers/bswap.h
++++ xen-4.0.1.mod/tools/blktap/drivers/bswap.h
+@@ -15,6 +15,8 @@
+ #define bswap_64(x) swap64(x)
+ #else
+
++#define HAVE_BYTESWAP_H
++
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
+ #else
diff --git a/testing/xen/xen-blktap2-uclibc.patch b/testing/xen/xen-blktap2-uclibc.patch
new file mode 100644
index 0000000000..7ce1dc0cfd
--- /dev/null
+++ b/testing/xen/xen-blktap2-uclibc.patch
@@ -0,0 +1,22 @@
+--- xen-4.0.1/tools/blktap2/drivers/bswap.h
++++ xen-4.0.1.mod/tools/blktap2/drivers/bswap.h
+@@ -15,6 +15,8 @@
+ #define bswap_64(x) swap64(x)
+ #else
+
++#define HAVE_BYTESWAP_H
++
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
+ #else
+--- xen-4.0.1/tools/blktap2/vhd/lib/Makefile
++++ xen-4.0.1.mod/tools/blktap2/vhd/lib/Makefile
+@@ -23,6 +23,8 @@
+ LIBS := -luuid
+ endif
+
++LIBS += -liconv
++
+ # Get gcc to generate the dependencies for us.
+ CFLAGS += -Wp,-MD,.$(@F).d
+ DEPS = .*.d
diff --git a/testing/xen/xen-disable-firmware.patch b/testing/xen/xen-disable-firmware.patch
new file mode 100644
index 0000000000..06e43d41c4
--- /dev/null
+++ b/testing/xen/xen-disable-firmware.patch
@@ -0,0 +1,10 @@
+--- xen-4.0.1/tools/Makefile
++++ xen-4.0.1.mod/tools/Makefile
+@@ -13,7 +13,6 @@
+ SUBDIRS-y += hotplug
+ SUBDIRS-y += xentrace
+ SUBDIRS-$(CONFIG_XCUTILS) += xcutils
+-SUBDIRS-$(CONFIG_X86) += firmware
+ SUBDIRS-$(ACM_SECURITY) += security
+ SUBDIRS-y += console
+ SUBDIRS-y += xenmon
diff --git a/testing/xen/xen-disable-fsback.patch b/testing/xen/xen-disable-fsback.patch
new file mode 100644
index 0000000000..d0ae91b122
--- /dev/null
+++ b/testing/xen/xen-disable-fsback.patch
@@ -0,0 +1,10 @@
+--- xen-4.0.1/tools/Makefile
++++ xen-4.0.1.mod/tools/Makefile
+@@ -29,7 +28,6 @@
+ SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
+ SUBDIRS-y += libfsimage
+ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
+-SUBDIRS-$(CONFIG_Linux) += fs-back
+ SUBDIRS-$(CONFIG_NetBSD) += fs-back
+ SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
+ SUBDIRS-y += xenpmd
diff --git a/testing/xen/xen-disable-werror.patch b/testing/xen/xen-disable-werror.patch
new file mode 100644
index 0000000000..c2c5512457
--- /dev/null
+++ b/testing/xen/xen-disable-werror.patch
@@ -0,0 +1,33 @@
+--- xen-4.0.1/Config.mk
++++ xen-4.0.1.mod/Config.mk
+@@ -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
+--- xen-4.0.1/extras/mini-os/minios.mk
++++ xen-4.0.1.mod/extras/mini-os/minios.mk
+@@ -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
+--- xen-4.0.1/tools/libxc/Makefile
++++ xen-4.0.1.mod/tools/libxc/Makefile
+@@ -57,7 +57,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 --git a/testing/xen/xen-dont-use-lib64.patch b/testing/xen/xen-dont-use-lib64.patch
new file mode 100644
index 0000000000..a22f139029
--- /dev/null
+++ b/testing/xen/xen-dont-use-lib64.patch
@@ -0,0 +1,11 @@
+--- xen-4.0.1/config/StdGNU.mk
++++ xen-4.0.1.mod/config/StdGNU.mk
+@@ -28,7 +28,7 @@
+ INCLUDEDIR = $(PREFIX)/include
+ LIBLEAFDIR = lib
+ LIBLEAFDIR_x86_32 = lib
+-LIBLEAFDIR_x86_64 = lib64
++LIBLEAFDIR_x86_64 = lib
+ LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
+ LIBDIR_x86_32 = $(PREFIX)/$(LIBLEAFDIR_x86_32)
+ LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)