1 |
commit: 78074b589f7430145b075329864d6a22ca8c8eff |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 3 23:48:58 2017 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 3 23:49:31 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78074b58 |
7 |
|
8 |
dev-cpp/commoncpp2: support gnutls-3.4 + eapi bump |
9 |
|
10 |
Bug: 583110 |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild | 72 +++++++++++++++++++++++++ |
15 |
dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch | 36 +++++++++++++ |
16 |
2 files changed, 108 insertions(+) |
17 |
|
18 |
diff --git a/dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..7993899c48c |
21 |
--- /dev/null |
22 |
+++ b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild |
23 |
@@ -0,0 +1,72 @@ |
24 |
+# Copyright 1999-2017 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=6 |
28 |
+ |
29 |
+inherit autotools eutils |
30 |
+ |
31 |
+DESCRIPTION="C++ library offering portable support for system-related services" |
32 |
+SRC_URI="mirror://gnu/commoncpp/${P}.tar.gz" |
33 |
+HOMEPAGE="https://www.gnu.org/software/commoncpp/" |
34 |
+LICENSE="GPL-2" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
37 |
+IUSE="debug doc examples ipv6 gnutls ssl static-libs" |
38 |
+ |
39 |
+RDEPEND=" |
40 |
+ sys-libs/zlib |
41 |
+ ssl? ( |
42 |
+ gnutls? ( |
43 |
+ dev-libs/libgcrypt:0= |
44 |
+ net-libs/gnutls:= |
45 |
+ ) |
46 |
+ !gnutls? ( dev-libs/openssl:0= ) |
47 |
+ )" |
48 |
+DEPEND="${RDEPEND} |
49 |
+ doc? ( >=app-doc/doxygen-1.3.6 )" |
50 |
+ |
51 |
+HTML_DOCS=() |
52 |
+ |
53 |
+PATCHES=( |
54 |
+ "${FILESDIR}/1.8.1-configure_detect_netfilter.patch" |
55 |
+ "${FILESDIR}/1.8.0-glibc212.patch" |
56 |
+ "${FILESDIR}/1.8.1-autoconf-update.patch" |
57 |
+ "${FILESDIR}/1.8.1-fix-buffer-overflow.patch" |
58 |
+ "${FILESDIR}/1.8.1-parallel-build.patch" |
59 |
+ "${FILESDIR}/1.8.1-libgcrypt.patch" |
60 |
+ "${FILESDIR}/1.8.1-fix-c++14.patch" |
61 |
+ "${FILESDIR}/1.8.1-gnutls-3.4.patch" |
62 |
+) |
63 |
+ |
64 |
+pkg_setup() { |
65 |
+ use doc && HTML_DOCS+=( doc/html/. ) |
66 |
+} |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ default |
70 |
+ eautoreconf |
71 |
+} |
72 |
+ |
73 |
+src_configure() { |
74 |
+ use ssl && local myconf=( $(usex gnutls '--with-gnutls' '--with-openssl') ) |
75 |
+ |
76 |
+ econf \ |
77 |
+ $(use_enable debug) \ |
78 |
+ $(use_with ipv6) \ |
79 |
+ $(use_enable static-libs static) \ |
80 |
+ $(use_with doc doxygen) \ |
81 |
+ "${myconf[@]}" |
82 |
+} |
83 |
+ |
84 |
+src_install () { |
85 |
+ default |
86 |
+ prune_libtool_files |
87 |
+ |
88 |
+ dodoc COPYING.addendum |
89 |
+ |
90 |
+ if use examples; then |
91 |
+ docinto examples |
92 |
+ dodoc demo/{*.cpp,*.h,*.xml,README} |
93 |
+ docompress -x /usr/share/doc/${PF}/examples |
94 |
+ fi |
95 |
+} |
96 |
|
97 |
diff --git a/dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch b/dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch |
98 |
new file mode 100644 |
99 |
index 00000000000..b7365b82206 |
100 |
--- /dev/null |
101 |
+++ b/dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch |
102 |
@@ -0,0 +1,36 @@ |
103 |
+From ba702b6034444c2e30b0990d06e28bb2dea8ecb7 Mon Sep 17 00:00:00 2001 |
104 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
105 |
+Date: Sat, 4 Mar 2017 01:36:23 +0200 |
106 |
+Subject: [PATCH] ssl: support gnutls-3.4 |
107 |
+ |
108 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
109 |
+--- |
110 |
+ src/ssl.cpp | 5 +---- |
111 |
+ 1 file changed, 1 insertion(+), 4 deletions(-) |
112 |
+ |
113 |
+diff --git a/src/ssl.cpp b/src/ssl.cpp |
114 |
+index 5bf526d..38ef0a7 100644 |
115 |
+--- a/src/ssl.cpp |
116 |
++++ b/src/ssl.cpp |
117 |
+@@ -344,9 +344,6 @@ ssize_t SSLStream::readData(void *target, size_t size, char separator, timeout_t |
118 |
+ #ifdef CCXX_GNUTLS |
119 |
+ bool SSLStream::getSession(void) |
120 |
+ { |
121 |
+- const int cert_priority[3] = |
122 |
+- {GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0}; |
123 |
+- |
124 |
+ if(ssl) |
125 |
+ return true; |
126 |
+ |
127 |
+@@ -362,7 +359,7 @@ bool SSLStream::getSession(void) |
128 |
+ |
129 |
+ gnutls_set_default_priority(ssl->session); |
130 |
+ gnutls_certificate_allocate_credentials(&ssl->xcred); |
131 |
+- gnutls_certificate_type_set_priority(ssl->session, cert_priority); |
132 |
++ gnutls_priority_set_direct(ssl->session, "NORMAL:+CTYPE-OPENPGP", NULL); |
133 |
+ gnutls_credentials_set(ssl->session, GNUTLS_CRD_CERTIFICATE, ssl->xcred); |
134 |
+ gnutls_transport_set_ptr(ssl->session, (gnutls_transport_ptr)so); |
135 |
+ if(gnutls_handshake(ssl->session)) { |
136 |
+-- |
137 |
+2.10.2 |
138 |
+ |