diff options
author | Brendan MacDonell | 2015-11-27 18:20:05 -0800 |
---|---|---|
committer | Brendan MacDonell | 2015-11-27 18:28:03 -0800 |
commit | d072b92b2630f99f5ec4848138bea9890ce1fb39 (patch) | |
tree | 930a525c21f80288006766af5ca3389043de4298 | |
parent | 1d0d8a25b201c1dc82dfa541c573e27915f4d071 (diff) | |
download | aur-d072b92b2630f99f5ec4848138bea9890ce1fb39.tar.gz |
Upgrade to 4.0.0
Requires a couple new patches:
- jsonc-compile.patch uses the version of json-c from the AUR,
instead of installing a vendored-version site-wide (!)
- subobject-access.patch fixes missing nested objects and related
crashes.
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | jsonc-compile.patch | 27 | ||||
-rw-r--r-- | subobject-access.patch | 15 |
4 files changed, 73 insertions, 13 deletions
@@ -1,15 +1,21 @@ pkgbase = mongo_fdw pkgdesc = PostgreSQL foreign data wrapper for MongoDB - pkgver = 3.0 + pkgver = 4.0.0 pkgrel = 1 - url = https://github.com/citusdata/mongo_fdw + url = https://github.com/EnterpriseDB/mongo_fdw install = mongo_fdw.install arch = i686 arch = x86_64 license = LGPL3 + makedepends = json-c + depends = mongo-c-driver>=1.2 depends = postgresql - source = https://github.com/citusdata/mongo_fdw/archive/v3.0.tar.gz - md5sums = c2b9267c21199852ddd1989d447fd413 + source = https://github.com/EnterpriseDB/mongo_fdw/archive/REL-4_0_0.tar.gz + source = jsonc-compile.patch + source = subobject-access.patch + md5sums = 9705f9d0c9affefa4184fb66051b7c90 + md5sums = 5052ecc1a0f48a6c9ca6e4488817369b + md5sums = 68a315f57525226505933f9d4ea7bad5 pkgname = mongo_fdw @@ -1,22 +1,34 @@ # Maintainer: Brendan MacDonell <brendan@macdonell.net> pkgname=mongo_fdw -pkgver=3.0 +pkgver=4.0.0 pkgrel=1 pkgdesc="PostgreSQL foreign data wrapper for MongoDB" arch=('i686' 'x86_64') -url="https://github.com/citusdata/mongo_fdw" +url="https://github.com/EnterpriseDB/mongo_fdw" license=('LGPL3') -depends=(postgresql) +depends=('mongo-c-driver>=1.2' 'postgresql') +makedepends=('json-c') install=mongo_fdw.install -source=("https://github.com/citusdata/${pkgname}/archive/v${pkgver}.tar.gz") -md5sums=('c2b9267c21199852ddd1989d447fd413') +_relname="REL-${pkgver//\./_}" +source=("https://github.com/EnterpriseDB/${pkgname}/archive/${_relname}.tar.gz" + 'jsonc-compile.patch' + 'subobject-access.patch') +md5sums=('9705f9d0c9affefa4184fb66051b7c90' + '5052ecc1a0f48a6c9ca6e4488817369b' + '68a315f57525226505933f9d4ea7bad5') + +prepare() { + cd "${pkgname}-${_relname}" + patch -p1 -i ../jsonc-compile.patch + patch -p1 -i ../subobject-access.patch +} build() { - cd "${pkgname}-${pkgver}" - make + cd "${pkgname}-${_relname}" + make -f Makefile.meta } package() { - cd "${pkgname}-${pkgver}" - make DESTDIR="${pkgdir}/" install + cd "${pkgname}-${_relname}" + make DESTDIR="${pkgdir}" -f Makefile.meta install } diff --git a/jsonc-compile.patch b/jsonc-compile.patch new file mode 100644 index 000000000000..eec54e22f13a --- /dev/null +++ b/jsonc-compile.patch @@ -0,0 +1,27 @@ +diff -Naur a/config.h b/config.h +--- a/config.h 1969-12-31 16:00:00.000000000 -0800 ++++ b/config.h 2015-07-01 13:39:20.906185032 -0700 +@@ -0,0 +1,3 @@ ++#ifdef __CONFIG__ ++#define META_DRIVER ++#endif +\ No newline at end of file +diff -Naur a/Makefile.meta b/Makefile.meta +--- a/Makefile.meta 2015-02-27 05:47:37.000000000 -0800 ++++ b/Makefile.meta 2015-07-01 13:43:37.139605246 -0700 +@@ -12,13 +12,10 @@ + # on another platform, change env_posix.os in MONGO_OBJS with the appropriate + # environment object file. + # +-LIBJSON = json-c +-LIBJSON_OBJS = $(LIBJSON)/json_util.o $(LIBJSON)/json_object.o $(LIBJSON)/json_tokener.o \ +- $(LIBJSON)/json_object_iterator.o $(LIBJSON)/printbuf.o $(LIBJSON)/linkhash.o \ +- $(LIBJSON)/arraylist.o $(LIBJSON)/random_seed.o $(LIBJSON)/debug.o + ++LIBJSON_INCLUDE = $(shell pkg-config --cflags json-c) + MONGO_INCLUDE = $(shell pkg-config --cflags libmongoc-1.0) +-PG_CPPFLAGS = --std=c99 $(MONGO_INCLUDE) -I$(LIBJSON) -DMETA_DRIVER ++PG_CPPFLAGS = --std=c99 $(MONGO_INCLUDE) $(LIBJSON_INCLUDE) -DMETA_DRIVER + SHLIB_LINK = $(shell pkg-config --libs libmongoc-1.0) + + OBJS = connection.o option.o mongo_wrapper_meta.o mongo_fdw.o mongo_query.o diff --git a/subobject-access.patch b/subobject-access.patch new file mode 100644 index 000000000000..293e96615301 --- /dev/null +++ b/subobject-access.patch @@ -0,0 +1,15 @@ +--- a/mongo_wrapper_meta.c 2015-02-27 05:47:37.000000000 -0800 ++++ b/mongo_wrapper_meta.c 2015-11-27 17:17:38.844792464 -0800 +@@ -212,7 +212,11 @@ + bool + BsonIterSubObject(BSON_ITERATOR *it, BSON *b) + { +- /* TODO: Need to see the Meta Driver equalient for "bson_iterator_subobject" */ ++ const uint8_t *buffer; ++ uint32_t len; ++ ++ bson_iter_document(it, &len, &buffer); ++ bson_init_static(b, buffer, len); + return true; + } + |