Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/wireshark/
Date: Tue, 07 Dec 2021 02:15:45
Message-Id: 1638842813.7911d3783040e5827d1d3a1ce9a29748989c5add.sam@gentoo
1 commit: 7911d3783040e5827d1d3a1ce9a29748989c5add
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 7 02:05:14 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 7 02:06:53 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7911d378
7
8 net-analyzer/wireshark: modernise 3.6.0 a bit
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 net-analyzer/wireshark/wireshark-3.6.0-r1.ebuild | 49 ++++++++++--------------
13 net-analyzer/wireshark/wireshark-9999.ebuild | 49 ++++++++++--------------
14 2 files changed, 40 insertions(+), 58 deletions(-)
15
16 diff --git a/net-analyzer/wireshark/wireshark-3.6.0-r1.ebuild b/net-analyzer/wireshark/wireshark-3.6.0-r1.ebuild
17 index 145ec1e5d572..3b3d7769e8ea 100644
18 --- a/net-analyzer/wireshark/wireshark-3.6.0-r1.ebuild
19 +++ b/net-analyzer/wireshark/wireshark-3.6.0-r1.ebuild
20 @@ -30,12 +30,14 @@ IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +rand
21 IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl"
22 IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd"
23
24 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
25 + plugin-ifdemo? ( plugins )"
26 +
27 RESTRICT="!test? ( test )"
28
29 # bug #753062 for speexdsp
30 -CDEPEND="
31 - acct-group/pcap
32 - >=dev-libs/glib-2.32:2
33 +RDEPEND="acct-group/pcap
34 + >=dev-libs/glib-2.38:2
35 >=net-dns/c-ares-1.5:=
36 dev-libs/libgcrypt:=
37 media-libs/speexdsp
38 @@ -70,18 +72,12 @@ CDEPEND="
39 sshdump? ( >=net-libs/libssh-0.6 )
40 ssl? ( net-libs/gnutls:= )
41 zlib? ( sys-libs/zlib )
42 - zstd? ( app-arch/zstd:= )
43 -"
44 -# We need perl for `pod2html`. The rest of the perl stuff is to block older
45 -# and broken installs. #455122
46 -DEPEND="
47 - ${CDEPEND}
48 - ${PYTHON_DEPS}
49 -"
50 -BDEPEND="
51 + zstd? ( app-arch/zstd:= )"
52 +DEPEND="${RDEPEND}"
53 +BDEPEND="${PYTHON_DEPS}
54 dev-lang/perl
55 - sys-devel/bison
56 sys-devel/flex
57 + sys-devel/gettext
58 virtual/pkgconfig
59 doc? (
60 app-doc/doxygen
61 @@ -93,17 +89,10 @@ BDEPEND="
62 test? (
63 dev-python/pytest
64 dev-python/pytest-xdist
65 - )
66 -"
67 -RDEPEND="
68 - ${CDEPEND}
69 + )"
70 +RDEPEND="${RDEPEND}
71 qt5? ( virtual/freedesktop-icon-theme )
72 - selinux? ( sec-policy/selinux-wireshark )
73 -"
74 -REQUIRED_USE="
75 - lua? ( ${LUA_REQUIRED_USE} )
76 - plugin-ifdemo? ( plugins )
77 -"
78 + selinux? ( sec-policy/selinux-wireshark )"
79
80 PATCHES=(
81 "${FILESDIR}"/${PN}-2.6.0-redhat.patch
82 @@ -119,7 +108,7 @@ src_configure() {
83
84 # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
85 # --with-ssl to ./configure. (Mimics code from acinclude.m4).
86 - if use kerberos; then
87 + if use kerberos ; then
88 case $(krb5-config --libs) in
89 *-lcrypto*)
90 ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
91 @@ -130,7 +119,7 @@ src_configure() {
92 esac
93 fi
94
95 - if use qt5; then
96 + if use qt5 ; then
97 export QT_MIN_VERSION=5.3.0
98 append-cxxflags -fPIC -DPIC
99 fi
100 @@ -237,19 +226,21 @@ src_install() {
101 doins ${dir}/*.h
102 done
103
104 - if use qt5; then
105 + if use qt5 ; then
106 local s
107 - for s in 16 32 48 64 128 256 512 1024; do
108 +
109 + for s in 16 32 48 64 128 256 512 1024 ; do
110 insinto /usr/share/icons/hicolor/${s}x${s}/apps
111 newins image/wsicon${s}.png wireshark.png
112 done
113 +
114 for s in 16 24 32 48 64 128 256 ; do
115 insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
116 newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
117 done
118 fi
119
120 - if [[ -d "${ED}"/usr/share/appdata ]]; then
121 + if [[ -d "${ED}"/usr/share/appdata ]] ; then
122 rm -r "${ED}"/usr/share/appdata || die
123 fi
124 }
125 @@ -262,7 +253,7 @@ pkg_postinst() {
126 # Add group for users allowed to sniff.
127 chgrp pcap "${EROOT}"/usr/bin/dumpcap
128
129 - if use dumpcap && use pcap; then
130 + if use dumpcap && use pcap ; then
131 fcaps -o 0 -g pcap -m 4710 -M 0710 \
132 cap_dac_read_search,cap_net_raw,cap_net_admin \
133 "${EROOT}"/usr/bin/dumpcap
134
135 diff --git a/net-analyzer/wireshark/wireshark-9999.ebuild b/net-analyzer/wireshark/wireshark-9999.ebuild
136 index 145ec1e5d572..3b3d7769e8ea 100644
137 --- a/net-analyzer/wireshark/wireshark-9999.ebuild
138 +++ b/net-analyzer/wireshark/wireshark-9999.ebuild
139 @@ -30,12 +30,14 @@ IUSE+=" +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +rand
140 IUSE+=" +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl"
141 IUSE+=" sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd"
142
143 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
144 + plugin-ifdemo? ( plugins )"
145 +
146 RESTRICT="!test? ( test )"
147
148 # bug #753062 for speexdsp
149 -CDEPEND="
150 - acct-group/pcap
151 - >=dev-libs/glib-2.32:2
152 +RDEPEND="acct-group/pcap
153 + >=dev-libs/glib-2.38:2
154 >=net-dns/c-ares-1.5:=
155 dev-libs/libgcrypt:=
156 media-libs/speexdsp
157 @@ -70,18 +72,12 @@ CDEPEND="
158 sshdump? ( >=net-libs/libssh-0.6 )
159 ssl? ( net-libs/gnutls:= )
160 zlib? ( sys-libs/zlib )
161 - zstd? ( app-arch/zstd:= )
162 -"
163 -# We need perl for `pod2html`. The rest of the perl stuff is to block older
164 -# and broken installs. #455122
165 -DEPEND="
166 - ${CDEPEND}
167 - ${PYTHON_DEPS}
168 -"
169 -BDEPEND="
170 + zstd? ( app-arch/zstd:= )"
171 +DEPEND="${RDEPEND}"
172 +BDEPEND="${PYTHON_DEPS}
173 dev-lang/perl
174 - sys-devel/bison
175 sys-devel/flex
176 + sys-devel/gettext
177 virtual/pkgconfig
178 doc? (
179 app-doc/doxygen
180 @@ -93,17 +89,10 @@ BDEPEND="
181 test? (
182 dev-python/pytest
183 dev-python/pytest-xdist
184 - )
185 -"
186 -RDEPEND="
187 - ${CDEPEND}
188 + )"
189 +RDEPEND="${RDEPEND}
190 qt5? ( virtual/freedesktop-icon-theme )
191 - selinux? ( sec-policy/selinux-wireshark )
192 -"
193 -REQUIRED_USE="
194 - lua? ( ${LUA_REQUIRED_USE} )
195 - plugin-ifdemo? ( plugins )
196 -"
197 + selinux? ( sec-policy/selinux-wireshark )"
198
199 PATCHES=(
200 "${FILESDIR}"/${PN}-2.6.0-redhat.patch
201 @@ -119,7 +108,7 @@ src_configure() {
202
203 # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
204 # --with-ssl to ./configure. (Mimics code from acinclude.m4).
205 - if use kerberos; then
206 + if use kerberos ; then
207 case $(krb5-config --libs) in
208 *-lcrypto*)
209 ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
210 @@ -130,7 +119,7 @@ src_configure() {
211 esac
212 fi
213
214 - if use qt5; then
215 + if use qt5 ; then
216 export QT_MIN_VERSION=5.3.0
217 append-cxxflags -fPIC -DPIC
218 fi
219 @@ -237,19 +226,21 @@ src_install() {
220 doins ${dir}/*.h
221 done
222
223 - if use qt5; then
224 + if use qt5 ; then
225 local s
226 - for s in 16 32 48 64 128 256 512 1024; do
227 +
228 + for s in 16 32 48 64 128 256 512 1024 ; do
229 insinto /usr/share/icons/hicolor/${s}x${s}/apps
230 newins image/wsicon${s}.png wireshark.png
231 done
232 +
233 for s in 16 24 32 48 64 128 256 ; do
234 insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
235 newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
236 done
237 fi
238
239 - if [[ -d "${ED}"/usr/share/appdata ]]; then
240 + if [[ -d "${ED}"/usr/share/appdata ]] ; then
241 rm -r "${ED}"/usr/share/appdata || die
242 fi
243 }
244 @@ -262,7 +253,7 @@ pkg_postinst() {
245 # Add group for users allowed to sniff.
246 chgrp pcap "${EROOT}"/usr/bin/dumpcap
247
248 - if use dumpcap && use pcap; then
249 + if use dumpcap && use pcap ; then
250 fcaps -o 0 -g pcap -m 4710 -M 0710 \
251 cap_dac_read_search,cap_net_raw,cap_net_admin \
252 "${EROOT}"/usr/bin/dumpcap