1 |
commit: 2387780fc6c76791618ee404889268606bb1530a |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 2 12:12:03 2020 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 2 12:12:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2387780f |
7 |
|
8 |
app-antivirus/clamav: new revision to fix USE="-clamsubmit". |
9 |
|
10 |
Disabling clamsubmit didn't work; now it does. A conditional dependency on |
11 |
libjson-c with USE=metadata-analysis-api has also been moved into RDEPEND |
12 |
from DEPEND, because libclamav gets linked to it in that case. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/720390 |
15 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
16 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
17 |
|
18 |
...-0.102.2-r2.ebuild => clamav-0.102.2-r3.ebuild} | 25 ++++++++++++++++------ |
19 |
1 file changed, 18 insertions(+), 7 deletions(-) |
20 |
|
21 |
diff --git a/app-antivirus/clamav/clamav-0.102.2-r2.ebuild b/app-antivirus/clamav/clamav-0.102.2-r3.ebuild |
22 |
similarity index 88% |
23 |
rename from app-antivirus/clamav/clamav-0.102.2-r2.ebuild |
24 |
rename to app-antivirus/clamav/clamav-0.102.2-r3.ebuild |
25 |
index 35a1db0325c..e4700595b03 100644 |
26 |
--- a/app-antivirus/clamav/clamav-0.102.2-r2.ebuild |
27 |
+++ b/app-antivirus/clamav/clamav-0.102.2-r3.ebuild |
28 |
@@ -35,13 +35,13 @@ CDEPEND="acct-group/clamav |
29 |
!libclamav-only? ( net-misc/curl ) |
30 |
!libressl? ( dev-libs/openssl:0= ) |
31 |
libressl? ( dev-libs/libressl:0= ) |
32 |
+ metadata-analysis-api? ( dev-libs/json-c:= ) |
33 |
milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) ) |
34 |
xml? ( dev-libs/libxml2 )" |
35 |
|
36 |
BDEPEND="virtual/pkgconfig" |
37 |
|
38 |
DEPEND="${CDEPEND} |
39 |
- metadata-analysis-api? ( dev-libs/json-c:* ) |
40 |
test? ( dev-libs/check )" |
41 |
RDEPEND="${CDEPEND} |
42 |
selinux? ( sec-policy/selinux-clamav )" |
43 |
@@ -55,6 +55,19 @@ PATCHES=( |
44 |
src_prepare() { |
45 |
default |
46 |
eautoconf |
47 |
+ |
48 |
+ if ! use clamsubmit; then |
49 |
+ # ENABLE_CLAMSUBMIT is defined in the configure script based on |
50 |
+ # only the values of $have_curl and $have_json (so we have no |
51 |
+ # easy way to disable it). Here we hack the configure script to |
52 |
+ # manually set the value of ENABLE_CLAMSUBMIT to something falsy |
53 |
+ # when USE=clamsubmit is not set. Yes, this looks backwards. The |
54 |
+ # value '#' is not a boolean indicator, it's a comment character. |
55 |
+ sed -e "s/ENABLE_CLAMSUBMIT_TRUE=$/ENABLE_CLAMSUBMIT_TRUE='#'/" \ |
56 |
+ -e "s/ENABLE_CLAMSUBMIT_FALSE='#'/ENABLE_CLAMSUBMIT_FALSE=/" \ |
57 |
+ -i configure \ |
58 |
+ || die 'failed to disable clamsubmit in ./configure script' |
59 |
+ fi |
60 |
} |
61 |
|
62 |
src_configure() { |
63 |
@@ -67,13 +80,11 @@ src_configure() { |
64 |
# but that does not work |
65 |
# do not add this, since --disable-xml seems to override |
66 |
# --without-xml |
67 |
- JSONUSE="--without-libjson" |
68 |
+ JSONCONF="--without-libjson" |
69 |
|
70 |
if use clamsubmit || use metadata-analysis-api; then |
71 |
- # either of those 2 requires libjson. |
72 |
- # clamsubmit will be built as soon as libjson and curl are found |
73 |
- # but we only install the binary if requested |
74 |
- JSONUSE="--with-libjson=${EPREFIX}/usr" |
75 |
+ # Either of these requires libjson-c. |
76 |
+ JSONCONF="--with-libjson=${EPREFIX}/usr" |
77 |
fi |
78 |
|
79 |
local myeconfargs=( |
80 |
@@ -84,7 +95,7 @@ src_configure() { |
81 |
$(use_enable test check) |
82 |
$(use_with xml) |
83 |
$(use_with iconv) |
84 |
- ${JSONUSE} |
85 |
+ ${JSONCONF} |
86 |
$(use_enable libclamav-only) |
87 |
$(use_with !libclamav-only libcurl) |
88 |
--with-system-libmspack |