1 |
commit: c1791cb8d661fe7c8916f9787f7772da42e0b435 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 02:59:53 2021 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 02:59:53 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1791cb8 |
7 |
|
8 |
net-proxy/privoxy: fix build without threads |
9 |
|
10 |
Closes: https://bugs.gentoo.org/767166 |
11 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
12 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
13 |
|
14 |
.../privoxy/files/privoxy-3.0.29-pthread.patch | 21 +++++++++++++++++++++ |
15 |
net-proxy/privoxy/privoxy-3.0.29.ebuild | 5 +++-- |
16 |
2 files changed, 24 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/net-proxy/privoxy/files/privoxy-3.0.29-pthread.patch b/net-proxy/privoxy/files/privoxy-3.0.29-pthread.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..2890b824d7e |
21 |
--- /dev/null |
22 |
+++ b/net-proxy/privoxy/files/privoxy-3.0.29-pthread.patch |
23 |
@@ -0,0 +1,21 @@ |
24 |
+diff --git a/project.h b/project.h |
25 |
+index ec3c1559..6c744415 100644 |
26 |
+--- a/project.h |
27 |
++++ b/project.h |
28 |
+@@ -54,16 +54,6 @@ |
29 |
+ #define HASH_OF_HOST_BUF_SIZE 16 |
30 |
+ #endif /* FEATURE_HTTPS_INSPECTION */ |
31 |
+ |
32 |
+-#ifdef FEATURE_PTHREAD |
33 |
+-# include <pthread.h> |
34 |
+- typedef pthread_mutex_t privoxy_mutex_t; |
35 |
+-#else |
36 |
+-# ifdef _WIN32 |
37 |
+-# include <windows.h> |
38 |
+-# endif |
39 |
+- typedef CRITICAL_SECTION privoxy_mutex_t; |
40 |
+-#endif |
41 |
+- |
42 |
+ #ifdef FEATURE_HTTPS_INSPECTION_MBEDTLS |
43 |
+ #include "mbedtls/net_sockets.h" |
44 |
+ #include "mbedtls/entropy.h" |
45 |
|
46 |
diff --git a/net-proxy/privoxy/privoxy-3.0.29.ebuild b/net-proxy/privoxy/privoxy-3.0.29.ebuild |
47 |
index 966001da72e..ded50272b29 100644 |
48 |
--- a/net-proxy/privoxy/privoxy-3.0.29.ebuild |
49 |
+++ b/net-proxy/privoxy/privoxy-3.0.29.ebuild |
50 |
@@ -47,7 +47,7 @@ REQUIRED_USE=" |
51 |
compression? ( zlib ) |
52 |
brotli? ( zlib ) |
53 |
fuzz? ( zlib ) |
54 |
- ssl? ( ^^ ( mbedtls openssl ) ) |
55 |
+ ssl? ( ^^ ( mbedtls openssl ) threads ) |
56 |
" |
57 |
|
58 |
S="${WORKDIR}/${P%_*}-${PRIVOXY_STATUS}" |
59 |
@@ -57,13 +57,14 @@ PATCHES=( |
60 |
"${FILESDIR}"/${PN}-3.0.28-chdir.patch |
61 |
"${FILESDIR}"/${PN}-3.0.28-null-termination.patch |
62 |
"${FILESDIR}"/${PN}-3.0.28-strip.patch |
63 |
+ "${FILESDIR}"/${P}-pthread.patch |
64 |
) |
65 |
|
66 |
pkg_pretend() { |
67 |
if ! use threads; then |
68 |
ewarn |
69 |
ewarn "Privoxy may be very slow without threads support, consider to enable them." |
70 |
- ewarn "See also http://www.privoxy.org/faq/trouble.html#GENTOO-RICERS" |
71 |
+ ewarn "See also https://www.privoxy.org/faq/trouble.html#GENTOO-RICERS" |
72 |
ewarn |
73 |
fi |
74 |
} |