summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2020-05-02 08:12:03 -0400
committerMichael Orlitzky <mjo@gentoo.org>2020-05-02 08:12:20 -0400
commit2387780fc6c76791618ee404889268606bb1530a (patch)
tree82a7af6d2d473a25f3e78c8f6a3101b732eff85e /app-antivirus
parentmedia-sound/alsa-tools: Drop 1.2.2 (r0) (diff)
downloadgentoo-2387780fc6c76791618ee404889268606bb1530a.tar.gz
gentoo-2387780fc6c76791618ee404889268606bb1530a.tar.bz2
gentoo-2387780fc6c76791618ee404889268606bb1530a.zip
app-antivirus/clamav: new revision to fix USE="-clamsubmit".
Disabling clamsubmit didn't work; now it does. A conditional dependency on libjson-c with USE=metadata-analysis-api has also been moved into RDEPEND from DEPEND, because libclamav gets linked to it in that case. Closes: https://bugs.gentoo.org/720390 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'app-antivirus')
-rw-r--r--app-antivirus/clamav/clamav-0.102.2-r3.ebuild (renamed from app-antivirus/clamav/clamav-0.102.2-r2.ebuild)25
1 files changed, 18 insertions, 7 deletions
diff --git a/app-antivirus/clamav/clamav-0.102.2-r2.ebuild b/app-antivirus/clamav/clamav-0.102.2-r3.ebuild
index 35a1db0325cf..e4700595b032 100644
--- a/app-antivirus/clamav/clamav-0.102.2-r2.ebuild
+++ b/app-antivirus/clamav/clamav-0.102.2-r3.ebuild
@@ -35,13 +35,13 @@ CDEPEND="acct-group/clamav
!libclamav-only? ( net-misc/curl )
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
+ metadata-analysis-api? ( dev-libs/json-c:= )
milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
xml? ( dev-libs/libxml2 )"
BDEPEND="virtual/pkgconfig"
DEPEND="${CDEPEND}
- metadata-analysis-api? ( dev-libs/json-c:* )
test? ( dev-libs/check )"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-clamav )"
@@ -55,6 +55,19 @@ PATCHES=(
src_prepare() {
default
eautoconf
+
+ if ! use clamsubmit; then
+ # ENABLE_CLAMSUBMIT is defined in the configure script based on
+ # only the values of $have_curl and $have_json (so we have no
+ # easy way to disable it). Here we hack the configure script to
+ # manually set the value of ENABLE_CLAMSUBMIT to something falsy
+ # when USE=clamsubmit is not set. Yes, this looks backwards. The
+ # value '#' is not a boolean indicator, it's a comment character.
+ sed -e "s/ENABLE_CLAMSUBMIT_TRUE=$/ENABLE_CLAMSUBMIT_TRUE='#'/" \
+ -e "s/ENABLE_CLAMSUBMIT_FALSE='#'/ENABLE_CLAMSUBMIT_FALSE=/" \
+ -i configure \
+ || die 'failed to disable clamsubmit in ./configure script'
+ fi
}
src_configure() {
@@ -67,13 +80,11 @@ src_configure() {
# but that does not work
# do not add this, since --disable-xml seems to override
# --without-xml
- JSONUSE="--without-libjson"
+ JSONCONF="--without-libjson"
if use clamsubmit || use metadata-analysis-api; then
- # either of those 2 requires libjson.
- # clamsubmit will be built as soon as libjson and curl are found
- # but we only install the binary if requested
- JSONUSE="--with-libjson=${EPREFIX}/usr"
+ # Either of these requires libjson-c.
+ JSONCONF="--with-libjson=${EPREFIX}/usr"
fi
local myeconfargs=(
@@ -84,7 +95,7 @@ src_configure() {
$(use_enable test check)
$(use_with xml)
$(use_with iconv)
- ${JSONUSE}
+ ${JSONCONF}
$(use_enable libclamav-only)
$(use_with !libclamav-only libcurl)
--with-system-libmspack