Gentoo Archives: gentoo-commits

From: Sergey Popov <pinkbyte@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/commoncpp2/files/, dev-cpp/commoncpp2/
Date: Wed, 25 Nov 2015 12:51:54
Message-Id: 1448455898.b440a90eeeecca2d53d4a7c4f115d9a59117cd7e.pinkbyte@gentoo
1 commit: b440a90eeeecca2d53d4a7c4f115d9a59117cd7e
2 Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 25 12:50:29 2015 +0000
4 Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 25 12:51:38 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b440a90e
7
8 dev-cpp/commoncpp2: fix building with libgcrypt 1.6 and higher
9
10 Reported-by: 3PO <r2d2 <AT> freakmail.de>
11 Gentoo-Bug: 512670
12
13 Package-Manager: portage-2.2.23
14
15 dev-cpp/commoncpp2/commoncpp2-1.8.1-r1.ebuild | 4 ++-
16 dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch | 48 ++++++++++++++++++++++++++
17 2 files changed, 51 insertions(+), 1 deletion(-)
18
19 diff --git a/dev-cpp/commoncpp2/commoncpp2-1.8.1-r1.ebuild b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r1.ebuild
20 index 1baba03..1fdd615 100644
21 --- a/dev-cpp/commoncpp2/commoncpp2-1.8.1-r1.ebuild
22 +++ b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r1.ebuild
23 @@ -28,7 +28,9 @@ src_prepare() {
24 "${FILESDIR}/1.8.0-glibc212.patch" \
25 "${FILESDIR}/1.8.1-autoconf-update.patch" \
26 "${FILESDIR}/1.8.1-fix-buffer-overflow.patch" \
27 - "${FILESDIR}/1.8.1-parallel-build.patch"
28 + "${FILESDIR}/1.8.1-parallel-build.patch" \
29 + "${FILESDIR}/1.8.1-libgcrypt.patch"
30 + epatch_user
31 eautoreconf
32 }
33
34
35 diff --git a/dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch b/dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch
36 new file mode 100644
37 index 0000000..d83ff91
38 --- /dev/null
39 +++ b/dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch
40 @@ -0,0 +1,48 @@
41 +--- src/ssl.cpp.orig 2010-11-01 03:42:51.000000000 +0300
42 ++++ src/ssl.cpp 2015-11-25 15:32:23.923057317 +0300
43 +@@ -99,35 +99,7 @@
44 + return 0;
45 + }
46 +
47 +-extern "C" {
48 +- static int _wrap_mutex_init(void **priv)
49 +- {
50 +- return _gcry_mutex_init((Mutex **)(priv));
51 +- }
52 +-
53 +- static int _wrap_mutex_destroy(void **priv)
54 +- {
55 +- return _gcry_mutex_destroy((Mutex **)(priv));
56 +- }
57 +-
58 +- static int _wrap_mutex_lock(void **priv)
59 +- {
60 +- return _gcry_mutex_lock((Mutex **)(priv));
61 +- }
62 +-
63 +- static int _wrap_mutex_unlock(void **priv)
64 +- {
65 +- return _gcry_mutex_unlock((Mutex **)(priv));
66 +- }
67 +-
68 +- static struct gcry_thread_cbs _gcry_threads =
69 +- {
70 +- GCRY_THREAD_OPTION_PTHREAD, NULL,
71 +- _wrap_mutex_init, _wrap_mutex_destroy,
72 +- _wrap_mutex_lock, _wrap_mutex_unlock
73 +- };
74 +-
75 +-};
76 ++GCRY_THREAD_OPTION_PTHREAD_IMPL;
77 +
78 + #endif
79 +
80 +@@ -135,7 +107,7 @@
81 + public:
82 + _ssl_global() {
83 + #ifndef WIN32
84 +- gcry_control(GCRYCTL_SET_THREAD_CBS, &_gcry_threads);
85 ++ gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
86 + #endif
87 + gnutls_global_init();
88 + }