2021-04-20 13:14:36 +02:00
|
|
|
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.
|
srcpkgs/l*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
2021-06-19 05:03:21 +02:00
|
|
|
--- a/lib/searpc-client.h~ 2020-06-18 05:23:11.000000000 +0200
|
|
|
|
+++ b/lib/searpc-client.h 2021-04-10 15:48:09.994005146 +0200
|
2021-04-20 13:14:36 +02:00
|
|
|
@@ -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
|