commit: 98ccc7d063db5a65915d994c9a2683c9e76493be
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed May 24 11:05:08 2017 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed May 24 11:07:16 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98ccc7d0
dev-python/pycapnp: Fix build with capnproto 0.6
Package-Manager: Portage-2.3.6, Repoman-2.3.2
dev-python/pycapnp/files/capn06.patch | 29 +++++++++++++++++++++++++++++
dev-python/pycapnp/pycapnp-0.5.12.ebuild | 8 ++++++++
2 files changed, 37 insertions(+)
diff --git a/dev-python/pycapnp/files/capn06.patch
b/dev-python/pycapnp/files/capn06.patch
new file mode 100644
index 00000000000..e1c1709fe8c
--- /dev/null
+++ b/dev-python/pycapnp/files/capn06.patch
@@ -0,0 +1,29 @@
+Index: pycapnp-0.5.12/capnp/includes/capnp_cpp.pxd
+===================================================================
+--- pycapnp-0.5.12.orig/capnp/includes/capnp_cpp.pxd
++++ pycapnp-0.5.12/capnp/includes/capnp_cpp.pxd
+@@ -100,8 +100,10 @@ cdef extern from "kj/array.h" namespace
+ ctypedef Promise[PyArray] PyPromiseArray
+
+ cdef extern from "kj/time.h" namespace " ::kj":
++ cdef cppclass Unsafe_:
++ Unsafe_()
+ cdef cppclass Duration:
+- Duration(int64_t)
++ Duration(int64_t, Unsafe_)
+ # cdef cppclass TimePoint:
+ # TimePoint(Duration)
+ cdef cppclass Timer:
+Index: pycapnp-0.5.12/capnp/lib/capnp.pyx
+===================================================================
+--- pycapnp-0.5.12.orig/capnp/lib/capnp.pyx
++++ pycapnp-0.5.12/capnp/lib/capnp.pyx
+@@ -1688,7 +1688,7 @@ cdef class _Timer:
+ return self
+
+ cpdef after_delay(self, time) except +reraise_kj_exception:
+- return
_VoidPromise()._init(self.thisptr.afterDelay(capnp.Duration(time)))
++ return
_VoidPromise()._init(self.thisptr.afterDelay(capnp.Duration(time,
capnp.Unsafe_())))
+
+ def getTimer():
+ return
_Timer()._init(helpers.getTimer(C_DEFAULT_EVENT_LOOP_GETTER().thisptr))
diff --git a/dev-python/pycapnp/pycapnp-0.5.12.ebuild
b/dev-python/pycapnp/pycapnp-0.5.12.ebuild
index 95802eec8db..4fb238062a9 100644
--- a/dev-python/pycapnp/pycapnp-0.5.12.ebuild
+++ b/dev-python/pycapnp/pycapnp-0.5.12.ebuild
@@ -20,3 +20,11 @@ RDEPEND="dev-libs/capnproto"
DEPEND="${RDEPEND}
dev-python/cython[${PYTHON_USEDEP}]
"
+
+PATCHES=( "${FILESDIR}/capn06.patch" )
+
+src_prepare() {
+ distutils-r1_src_prepare
+ # regen cython files
+ rm -f capnp/lib/capnp.cpp || die
+}