summaryrefslogtreecommitdiff
path: root/community/libvirt
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-04-27 22:24:53 +0000
committerroot <root@rshg047.dnsready.net>2011-04-27 22:24:53 +0000
commit18d6577d511b9a1ac36eaae50060133a401e42a3 (patch)
treef681f9444a7a0a95916de40af82d3b805d5fb8d3 /community/libvirt
parent69e1fada8bdc9588d0a3d8bc3403fa809d809a84 (diff)
Wed Apr 27 22:24:53 UTC 2011
Diffstat (limited to 'community/libvirt')
-rw-r--r--community/libvirt/PKGBUILD13
-rw-r--r--community/libvirt/yajl-2.x.patch66
2 files changed, 75 insertions, 4 deletions
diff --git a/community/libvirt/PKGBUILD b/community/libvirt/PKGBUILD
index f12c165ef..9c4e26186 100644
--- a/community/libvirt/PKGBUILD
+++ b/community/libvirt/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 45197 2011-04-18 09:53:26Z spupykin $
+# $Id: PKGBUILD 45630 2011-04-26 00:59:03Z dreisner $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jonathan Wiersma <archaur at jonw dot org>
pkgname=libvirt
pkgver=0.9.0
-pkgrel=2
+pkgrel=3
pkgdesc="API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)"
arch=('i686' 'x86_64')
url="http://libvirt.org/"
@@ -35,12 +35,14 @@ source=("http://libvirt.org/sources/$pkgname-$pkgver.tar.gz"
libvirtd.rc.d
libvirtd.conf.d
openbsd-netcat-default.patch
- unixperms.patch)
+ unixperms.patch
+ yajl-2.x.patch)
md5sums=('53d005e6f3732aba1fd6b2718f9cec99'
'018d97dafc0049075fba6f2850f17a12'
'3ed0e24f5b5e25bf553f5427d64915e6'
'7d5a841d51321be56ad3c4f93d112fb0'
- 'db95aecdf2ccf3693fef5821cdcb7eba')
+ 'db95aecdf2ccf3693fef5821cdcb7eba'
+ '5745bb8d0b254abb7a3528c66e03b0f9')
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -59,6 +61,9 @@ build() {
[ $NOEXTRACT -eq 1 ] || patch -Np1 -i "$srcdir"/openbsd-netcat-default.patch
+ # fixes for yajl 2.0 API changes
+ [ $NOEXTRACT -eq 1 ] || patch -Np1 -i "$srcdir/yajl-2.x.patch"
+
export LDFLAGS=-lX11
[ -f Makefile ] || ./configure --prefix=/usr --libexec=/usr/lib/"$pkgname" \
--with-storage-lvm --without-xen --with-udev --without-hal
diff --git a/community/libvirt/yajl-2.x.patch b/community/libvirt/yajl-2.x.patch
new file mode 100644
index 000000000..80d3edce0
--- /dev/null
+++ b/community/libvirt/yajl-2.x.patch
@@ -0,0 +1,66 @@
+--- a/src/util/json.c 2011-03-24 03:10:26.000000000 -0400
++++ b/src/util/json.c 2011-04-25 20:01:29.354939116 -0400
+@@ -709,7 +709,7 @@
+
+ static int virJSONParserHandleNumber(void * ctx,
+ const char * s,
+- unsigned int l)
++ size_t l)
+ {
+ virJSONParserPtr parser = ctx;
+ char *str = strndup(s, l);
+@@ -735,7 +735,7 @@
+
+ static int virJSONParserHandleString(void * ctx,
+ const unsigned char * stringVal,
+- unsigned int stringLen)
++ size_t stringLen)
+ {
+ virJSONParserPtr parser = ctx;
+ virJSONValuePtr value = virJSONValueNewStringLen((const char *)stringVal,
+@@ -756,7 +756,7 @@
+
+ static int virJSONParserHandleMapKey(void * ctx,
+ const unsigned char * stringVal,
+- unsigned int stringLen)
++ size_t stringLen)
+ {
+ virJSONParserPtr parser = ctx;
+ virJSONParserStatePtr state;
+@@ -894,14 +894,14 @@
+ /* XXX add an incremental streaming parser - yajl trivially supports it */
+ virJSONValuePtr virJSONValueFromString(const char *jsonstring)
+ {
+- yajl_parser_config cfg = { 1, 1 };
+ yajl_handle hand;
+ virJSONParser parser = { NULL, NULL, 0 };
+ virJSONValuePtr ret = NULL;
+
+ VIR_DEBUG("string=%s", jsonstring);
+
+- hand = yajl_alloc(&parserCallbacks, &cfg, NULL, &parser);
++ hand = yajl_alloc(&parserCallbacks, NULL, &parser);
++ yajl_config(hand, yajl_allow_comments, 1);
+
+ if (yajl_parse(hand,
+ (const unsigned char *)jsonstring,
+@@ -1002,15 +1002,16 @@
+
+ char *virJSONValueToString(virJSONValuePtr object)
+ {
+- yajl_gen_config conf = { 0, " " }; /* Turns off pretty printing since QEMU can't cope */
+ yajl_gen g;
+ const unsigned char *str;
+ char *ret = NULL;
+- unsigned int len;
++ size_t len;
+
+ VIR_DEBUG("object=%p", object);
+
+- g = yajl_gen_alloc(&conf, NULL);
++ g = yajl_gen_alloc(NULL);
++ yajl_gen_config(g, yajl_gen_beautify, 0);
++ yajl_gen_config(g, yajl_gen_indent_string, " ");
+
+ if (virJSONValueToStringOne(object, g) < 0) {
+ virReportOOMError();