Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/sniproxy/files/, www-servers/sniproxy/
Date: Sat, 28 Nov 2020 23:10:15
Message-Id: 1606604961.4b9142d25d28c969e823177916b5319a8f808a7b.soap@gentoo
1 commit: 4b9142d25d28c969e823177916b5319a8f808a7b
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Sat Nov 28 23:09:21 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 28 23:09:21 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b9142d2
7
8 www-servers/sniproxy: fix build with gcc-10, port to GLEP 81
9
10 Closes: https://bugs.gentoo.org/707530
11 Package-Manager: Portage-3.0.9, Repoman-3.0.1
12 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 .../sniproxy/files/sniproxy-0.6.0-fno-common.patch | 24 +++++++++++++++
16 ...proxy-0.6.0.ebuild => sniproxy-0.6.0-r1.ebuild} | 36 +++++++++-------------
17 2 files changed, 39 insertions(+), 21 deletions(-)
18
19 diff --git a/www-servers/sniproxy/files/sniproxy-0.6.0-fno-common.patch b/www-servers/sniproxy/files/sniproxy-0.6.0-fno-common.patch
20 new file mode 100644
21 index 00000000000..f718bfca736
22 --- /dev/null
23 +++ b/www-servers/sniproxy/files/sniproxy-0.6.0-fno-common.patch
24 @@ -0,0 +1,24 @@
25 +Taken from: https://github.com/dlundquist/sniproxy/commit/822bb80df9b7b345cc9eba55df74a07b498819ba
26 +Author: Pierre-Olivier Mercier <nemunaire@×××××××.re>
27 +
28 +--- a/src/http.h
29 ++++ b/src/http.h
30 +@@ -29,6 +29,6 @@
31 + #include <stdio.h>
32 + #include "protocol.h"
33 +
34 +-const struct Protocol *const http_protocol;
35 ++extern const struct Protocol *const http_protocol;
36 +
37 + #endif
38 +--- a/src/tls.h
39 ++++ b/src/tls.h
40 +@@ -28,6 +28,6 @@
41 +
42 + #include "protocol.h"
43 +
44 +-const struct Protocol *const tls_protocol;
45 ++extern const struct Protocol *const tls_protocol;
46 +
47 + #endif
48 +
49
50 diff --git a/www-servers/sniproxy/sniproxy-0.6.0.ebuild b/www-servers/sniproxy/sniproxy-0.6.0-r1.ebuild
51 similarity index 82%
52 rename from www-servers/sniproxy/sniproxy-0.6.0.ebuild
53 rename to www-servers/sniproxy/sniproxy-0.6.0-r1.ebuild
54 index 458f1e8ac79..9dc8e5a03ef 100644
55 --- a/www-servers/sniproxy/sniproxy-0.6.0.ebuild
56 +++ b/www-servers/sniproxy/sniproxy-0.6.0-r1.ebuild
57 @@ -1,15 +1,14 @@
58 -# Copyright 1999-2019 Gentoo Authors
59 +# Copyright 1999-2020 Gentoo Authors
60 # Distributed under the terms of the GNU General Public License v2
61
62 EAPI=7
63
64 -inherit autotools user
65 +inherit autotools
66
67 -if [[ ${PV} == 9999* ]]; then
68 +if [[ ${PV} == *9999 ]]; then
69 EGIT_REPO_URI="https://github.com/dlundquist/sniproxy.git"
70 EGIT_BRANCH="master"
71 inherit git-r3
72 - KEYWORDS=""
73 else
74 SRC_URI="https://github.com/dlundquist/sniproxy/archive/${PV}.tar.gz -> ${P}.tar.gz"
75 KEYWORDS="~amd64 ~x86"
76 @@ -24,18 +23,18 @@ IUSE="+dns +largefile rfc3339 test"
77 RESTRICT="!test? ( test )"
78
79 RDEPEND="
80 + acct-group/sniproxy
81 + acct-user/sniproxy
82 dev-libs/libev
83 >=dev-libs/libpcre-3
84 - dns? ( net-libs/udns )
85 -"
86 + dns? ( net-libs/udns )"
87 +DEPEND="${RDEPEND}
88 + test? ( net-misc/curl )"
89 BDEPEND="
90 - ${RDEPEND}
91 sys-devel/gettext
92 - virtual/pkgconfig
93 -"
94 -DEPEND="
95 - test? ( net-misc/curl )
96 -"
97 + virtual/pkgconfig"
98 +
99 +PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
100
101 src_prepare() {
102 default
103 @@ -55,6 +54,10 @@ src_configure() {
104 econf "${my_conf[@]}"
105 }
106
107 +src_test() {
108 + emake -j1 check
109 +}
110 +
111 src_install() {
112 default
113
114 @@ -72,12 +75,3 @@ src_install() {
115 doman man/sniproxy.8
116 doman man/sniproxy.conf.5
117 }
118 -
119 -src_test() {
120 - emake -j1 check
121 -}
122 -
123 -pkg_postinst() {
124 - enewgroup "${PN}"
125 - enewuser "${PN}" -1 -1 /var/lib/sniproxy "${PN}"
126 -}