libsearpc: update to 3.2.0.20200318

Update to 3.2.0.20200318 (i.e. 3.2-latest).

Remove patch to support python3.

Add patch to support include of header file within extern "C".
This commit is contained in:
Lon Willett 2021-04-20 13:14:36 +02:00 committed by Érico Nogueira Rolim
parent 53f9b8c15f
commit e1c5f79800
3 changed files with 29 additions and 119 deletions

View file

@ -1,114 +0,0 @@
upstream: yes
From b0079d2a0c3ce0cb4698a162498b108244726912 Mon Sep 17 00:00:00 2001
From: Xiangyue Cai <caixiangyue007@gmail.com>
Date: Mon, 8 Jun 2020 15:09:06 +0800
Subject: [PATCH] configure with python3 (#53)
* configure with python3
* remove future
---
configure.ac | 2 +-
pysearpc/client.py | 1 -
pysearpc/named_pipe.py | 3 ---
pysearpc/pygencode.py | 3 ---
pysearpc/server.py | 2 --
pysearpc/test_pysearpc.py | 1 -
pysearpc/transport.py | 2 --
pysearpc/utils.py | 1 -
8 files changed, 1 insertion(+), 14 deletions(-)
diff --git configure.ac configure.ac
index 53d7438..9c2159a 100644
--- configure.ac
+++ configure.ac
@@ -98,7 +98,7 @@ PKG_CHECK_MODULES(JANSSON, [jansson >= $JANSSON_REQUIRED])
AC_SUBST(JANSSON_CFLAGS)
AC_SUBST(JANSSON_LIBS)
-AM_PATH_PYTHON([2.4])
+AM_PATH_PYTHON([3.5])
if test "$bwin32" = true; then
if test x$PYTHON_DIR != x; then
# set pyexecdir to somewhere like /c/Python26/Lib/site-packages
diff --git pysearpc/client.py pysearpc/client.py
index 20e5535..3650cb1 100644
--- pysearpc/client.py
+++ pysearpc/client.py
@@ -1,4 +1,3 @@
-from builtins import object
import json
from .common import SearpcError
diff --git pysearpc/named_pipe.py pysearpc/named_pipe.py
index a0ca619..73df576 100644
--- pysearpc/named_pipe.py
+++ pysearpc/named_pipe.py
@@ -2,9 +2,6 @@
RPC client/server implementation based on named pipe transport.
"""
-from future import standard_library
-standard_library.install_aliases()
-from builtins import object
import json
import logging
import os
diff --git pysearpc/pygencode.py pysearpc/pygencode.py
index 62a635b..8c718ce 100644
--- pysearpc/pygencode.py
+++ pysearpc/pygencode.py
@@ -1,8 +1,5 @@
#!/usr/bin/python
-
-from __future__ import print_function
-from builtins import str
import string
import sys
diff --git pysearpc/server.py pysearpc/server.py
index a7ec7be..94d9bac 100644
--- pysearpc/server.py
+++ pysearpc/server.py
@@ -1,5 +1,3 @@
-from builtins import str
-from builtins import object
import json
from .common import SearpcError
diff --git pysearpc/test_pysearpc.py pysearpc/test_pysearpc.py
index a9c6f8b..64a455d 100755
--- pysearpc/test_pysearpc.py
+++ pysearpc/test_pysearpc.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
#coding: UTF-8
-from builtins import object
import json
import logging
import os
diff --git pysearpc/transport.py pysearpc/transport.py
index 3c6e821..3deb42c 100644
--- pysearpc/transport.py
+++ pysearpc/transport.py
@@ -1,5 +1,3 @@
-
-from builtins import object
class SearpcTransport(object):
"""
A transport is repsonsible to send the serialized request to the
diff --git pysearpc/utils.py pysearpc/utils.py
index 2aeda93..451ad4e 100644
--- pysearpc/utils.py
+++ pysearpc/utils.py
@@ -1,4 +1,3 @@
-from builtins import bytes
import os
import socket
--
2.30.0

View file

@ -0,0 +1,21 @@
Recent versions of glib don't work inside an extern "C" block, but some seafile sources
include searpc-client.h inside one. See https://github.com/haiwen/libsearpc/pull/57.
This is the easy fix, needed until upstream fixes the problem.
--- lib/searpc-client.h~ 2020-06-18 05:23:11.000000000 +0200
+++ lib/searpc-client.h 2021-04-10 15:48:09.994005146 +0200
@@ -7,8 +7,14 @@
#define LIBSEARPC_API
#endif
+#ifdef __cplusplus
+extern "C++" {
+#endif
#include <glib.h>
#include <glib-object.h>
+#ifdef __cplusplus
+}
+#endif
#include <jansson.h>
#ifndef DFT_DOMAIN

View file

@ -1,18 +1,21 @@
# Template file for 'libsearpc'
# WARNING: upstream sometimes retag source. Wait for official announcement
pkgname=libsearpc
version=3.2.0
revision=4
# 3.2-latest (as of 2021-04-10)
version=3.2.0.20200318
revision=1
_gitrev=50ff08b03c7cec8e10b35ba438633b9fe08a8d90
wrksrc="${pkgname}-${_gitrev}"
build_style=gnu-configure
configure_args="PYTHON=python3 --disable-static --disable-compile-demo"
configure_args="--with-python3 --disable-static --disable-compile-demo"
hostmakedepends="automake libtool pkg-config python3 glib-devel"
makedepends="libglib-devel jansson-devel"
short_desc="Seafile RPC library"
maintainer="yopito <pierre.bourgin@free.fr>"
license="LGPL-3.0-or-later, Apache-2.0"
homepage="https://seafile.com"
distfiles="https://github.com/haiwen/libsearpc/archive/v${version}.tar.gz"
checksum=cd00197fcc40b45b1d5e892b2d08dfa5947f737e0d80f3ef26419334e75b0bff
distfiles="https://github.com/haiwen/libsearpc/archive/${_gitrev}.tar.gz"
checksum=2a58894cefbc1d7398581fc58103261688c93a9cf63f11afc5e92142ed948c00
python_version=3
pre_configure() {