aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-scanners/clamav/clamav_0.102.2.bb (renamed from recipes-scanners/clamav/clamav_0.101.5.bb)66
-rw-r--r--recipes-scanners/clamav/files/fix_libcurl_check.patch231
-rw-r--r--recipes-scanners/clamav/files/fix_pcre_check.patch443
-rw-r--r--recipes-scanners/clamav/files/libcamav_fix.patch13
-rw-r--r--recipes-scanners/clamav/files/libclamav_fix.patch41
5 files changed, 753 insertions, 41 deletions
diff --git a/recipes-scanners/clamav/clamav_0.101.5.bb b/recipes-scanners/clamav/clamav_0.102.2.bb
index f4625b1..a3f3fe6 100644
--- a/recipes-scanners/clamav/clamav_0.101.5.bb
+++ b/recipes-scanners/clamav/clamav_0.102.2.bb
@@ -4,80 +4,66 @@ HOMEPAGE = "http://www.clamav.net/index.html"
SECTION = "security"
LICENSE = "LGPL-2.1"
-DEPENDS = "libtool db libxml2 openssl zlib curl llvm clamav-native libmspack bison-native"
-DEPENDS_class-native = "db-native openssl-native zlib-native llvm-native curl-native bison-native"
+DEPENDS = "db openssl libmspack zlib curl bison"
LIC_FILES_CHKSUM = "file://COPYING.LGPL;beginline=2;endline=3;md5=4b89c05acc71195e9a06edfa2fa7d092"
-SRCREV = "482fcd413b07e9fd3ef9850e6d01a45f4e187108"
+SRCREV = "e2a404340e1f0ad0d26431138fbe1dada49507d4"
-SRC_URI = "git://github.com/vrtadmin/clamav-devel;branch=rel/0.101 \
+SRC_URI = "git://github.com/vrtadmin/clamav-devel;branch=rel/0.102 \
file://clamd.conf \
file://freshclam.conf \
file://volatiles.03_clamav \
file://tmpfiles.clamav \
file://${BPN}.service \
- file://freshclam-native.conf \
+ file://fix_libcurl_check.patch \
+ file://fix_pcre_check.patch \
+ file://libclamav_fix.patch \
+ file://libcamav_fix.patch \
"
S = "${WORKDIR}/git"
LEAD_SONAME = "libclamav.so"
SO_VER = "9.0.2"
+BINCONFIG = "${bindir}/clamav-config"
inherit autotools pkgconfig useradd systemd
CLAMAV_UID ?= "clamav"
CLAMAV_GID ?= "clamav"
-INSTALL_CLAMAV_CVD ?= "1"
-CLAMAV_USR_DIR = "${STAGING_DIR_NATIVE}/usr"
-CLAMAV_USR_DIR_class-target = "${STAGING_DIR_HOST}/usr"
+CLAMAV_USR_DIR = "${STAGING_DIR_HOST}/usr"
-PACKAGECONFIG_class-target ?= "ncurses bz2"
-PACKAGECONFIG_class-target += " ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
-PACKAGECONFIG_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PACKAGECONFIG ?= "ncurses bz2 pcre2"
+PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
+PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
-PACKAGECONFIG[pcre] = "--with-pcre=${STAGING_LIBDIR}, --without-pcre, libpcre"
+PACKAGECONFIG[pcre2] = "--with-pcre=${STAGING_LIBDIR}, --without-pcre, libpcre2"
PACKAGECONFIG[json] = "--with-libjson=${STAGING_LIBDIR}, --without-libjson, json-c,"
PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6"
PACKAGECONFIG[bz2] = "--with-libbz2-prefix=${CLAMAV_USR_DIR}, --disable-bzip2, bzip2"
PACKAGECONFIG[ncurses] = "--with-libncurses-prefix=${CLAMAV_USR_DIR}, --without-libncurses-prefix, ncurses, "
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, --without-systemdsystemunitdir, "
-EXTRA_OECONF_CLAMAV = "--without-libcheck-prefix --disable-unrar \
- --disable-mempool \
- --program-prefix="" \
+EXTRA_OECONF = " \
+ --with-user=${CLAMAV_UID} --with-group=${CLAMAV_GID} \
+ --without-libcheck-prefix --disable-unrar \
+ --disable-mempool --program-prefix="" \
--disable-zlib-vcheck \
- --with-xml=${CLAMAV_USR_DIR} \
--with-zlib=${CLAMAV_USR_DIR} \
--with-openssl=${CLAMAV_USR_DIR} \
--with-libcurl=${CLAMAV_USR_DIR} \
--with-system-libmspack=${CLAMAV_USR_DIR} \
- --with-iconv=no \
- --enable-check=no \
+ --with-iconv=no --enable-check=no \
+ --disable-clamdtop --disable-clamonacc \
"
-EXTRA_OECONF_class-native += "${EXTRA_OECONF_CLAMAV}"
-EXTRA_OECONF_class-target += "--with-user=${CLAMAV_UID} --with-group=${CLAMAV_GID} ${EXTRA_OECONF_CLAMAV}"
-
do_configure () {
${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
}
-do_configure_class-native () {
- ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
-}
-
-do_compile_append_class-target() {
- if [ "${INSTALL_CLAMAV_CVD}" = "1" ]; then
- bbnote "CLAMAV creating cvd"
- install -d ${S}/clamav_db
- ${STAGING_BINDIR_NATIVE}/freshclam --datadir=${S}/clamav_db --config=${WORKDIR}/freshclam-native.conf
- fi
-}
-
-do_install_append_class-target () {
+do_install_append () {
install -d ${D}/${sysconfdir}
install -d ${D}/${localstatedir}/lib/clamav
install -d ${D}${sysconfdir}/clamav ${D}${sysconfdir}/default/volatiles
@@ -87,7 +73,8 @@ do_install_append_class-target () {
install -m 0644 ${WORKDIR}/volatiles.03_clamav ${D}${sysconfdir}/default/volatiles/volatiles.03_clamav
sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/libclamav.pc
rm ${D}/${libdir}/libclamav.so
- install -m 666 ${S}/clamav_db/* ${D}/${localstatedir}/lib/clamav/.
+ rm ${D}/${libdir}/libfreshclam.so
+
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
install -D -m 0644 ${WORKDIR}/clamav.service ${D}${systemd_unitdir}/system/clamav.service
install -d ${D}${sysconfdir}/tmpfiles.d
@@ -109,7 +96,7 @@ pkg_postinst_ontarget_${PN} () {
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-daemon ${PN}-doc ${PN}-cvd \
${PN}-clamdscan ${PN}-freshclam ${PN}-libclamav ${PN}-staticdev"
-FILES_${PN} = "${bindir}/clambc ${bindir}/clamscan ${bindir}/clamsubmit \
+FILES_${PN} = "${bindir}/clambc ${bindir}/clamscan ${bindir}/clamsubmit ${bindir}/clamonacc \
${bindir}/*sigtool ${mandir}/man1/clambc* ${mandir}/man1/clamscan* \
${mandir}/man1/sigtool* ${mandir}/man1/clambsubmit* \
${docdir}/clamav/* "
@@ -143,8 +130,8 @@ FILES_${PN}-dev = " ${bindir}/clamav-config ${libdir}/*.la \
FILES_${PN}-staticdev = "${libdir}/*.a"
-FILES_${PN}-libclamav = "${libdir}/libclamav.so* ${libdir}/libclammspack.so*\
- ${docdir}/libclamav/* "
+FILES_${PN}-libclamav = "${libdir}/libclamav.so* ${libdir}/libclammspack.so* \
+ ${libdir}/libfreshclam.so* ${docdir}/libclamav/* "
FILES_${PN}-doc = "${mandir}/man/* \
${datadir}/man/* \
@@ -164,6 +151,3 @@ RCONFLICTS_${PN} += "${PN}-systemd"
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
RDEPENDS_${PN} = "openssl ncurses-libncurses libxml2 libbz2 ncurses-libtinfo curl libpcre2 clamav-freshclam clamav-libclamav"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native"
diff --git a/recipes-scanners/clamav/files/fix_libcurl_check.patch b/recipes-scanners/clamav/files/fix_libcurl_check.patch
new file mode 100644
index 0000000..163a32d
--- /dev/null
+++ b/recipes-scanners/clamav/files/fix_libcurl_check.patch
@@ -0,0 +1,231 @@
+clamav .102.2 tries to find clamav using culf_config. Use EO pkg_config instead
+
+Upstream-Status: OE specific
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: git/configure
+===================================================================
+--- git.orig/configure
++++ git/configure
+@@ -29921,207 +29921,24 @@ $as_echo_n "checking for libcurl install
+
+
+ # Check whether --with-libcurl was given.
++have_curl="no"
+ if test "${with_libcurl+set}" = set; then :
+ withval=$with_libcurl;
+-find_curl="no"
+-if test "X$withval" = "Xyes"; then
+- find_curl="yes"
+-else
+- if test "X$withval" != "Xno"; then
+- if test -f "${withval}/bin/curl-config"; then
+- LIBCURL_HOME="$withval"
+- have_curl="yes"
+- fi
++ if test "X$withval" != "Xno"; then
++ if test "${PKG_CONFIG} libcurl --exists"; then
++ LIBCURL_HOME="$withval"
++ CURL_LIBS=$($PKG_CONFIG libcurl --libs)
++ #CURL_CPPFLAGS=$($PKG_CONFIG libcurl --cflags)
++
++ CURL_LDFLAGS="-L$LIBCURL_HOME/lib"
++ CURL_CPPFLAGS="-I$LIBCURL_HOME/include"
++
++ have_curl="yes"
++ save_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$CURL_LDFLAGS $CURL_LIBS $SSL_LDFLAGS $SSL_LIBS"
+ fi
+-fi
+-
+-else
+- find_curl="yes"
+-fi
+-
+-
+-if test "X$find_curl" = "Xyes"; then
+- for p in /usr/local /usr ; do
+- if test -f "${p}/bin/curl-config"; then
+- LIBCURL_HOME=$p
+- have_curl="yes"
+- fi
+- done
+-fi
+-
+-if test "X$have_curl" = "Xyes"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5
+-$as_echo "$LIBCURL_HOME" >&6; }
+- if test -f "$LIBCURL_HOME/bin/curl-config"; then
+- CURL_LDFLAGS="$LDFLAGS"
+- CURL_LIBS=$($LIBCURL_HOME/bin/curl-config --libs)
+- CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
+- else
+- if test "$LIBCURL_HOME" != "/usr"; then
+- CURL_LDFLAGS="-L$LIBCURL_HOME/lib"
+- CURL_CPPFLAGS="-I$LIBCURL_HOME/include"
+- else
+- CURL_LDFLAGS="$LDFLAGS"
+- CURL_CPPFLAGS=""
+- fi
+- CURL_LIBS="-lcurl"
+- fi
+- save_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$CURL_LDFLAGS $CURL_LIBS $SSL_LDFLAGS $SSL_LIBS"
+-
+- for ac_prog in gawk mawk nawk awk
+-do
+- # Extract the first word of "$ac_prog", so it can be a program name with args.
+-set dummy $ac_prog; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_prog_AWK+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- if test -n "$AWK"; then
+- ac_cv_prog_AWK="$AWK" # Let the user override the test.
+-else
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_prog_AWK="$ac_prog"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+ fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-AWK=$ac_cv_prog_AWK
+-if test -n "$AWK"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+-$as_echo "$AWK" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+- test -n "$AWK" && break
+-done
+-
+-
+- curl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'"
+- # Extract the first word of "curl-config", so it can be a program name with args.
+-set dummy curl-config; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_curl_config+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- case $curl_config in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_curl_config="$curl_config" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in "$LIBCURL_HOME/bin"
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_curl_config="$as_dir/$ac_word$ac_exec_ext"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+- test -z "$ac_cv_path_curl_config" && ac_cv_path_curl_config=""notfound""
+- ;;
+-esac
+-fi
+-curl_config=$ac_cv_path_curl_config
+-if test -n "$curl_config"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_config" >&5
+-$as_echo "$curl_config" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-
+-
+- awk_curl_version=`$curl_config --version | $AWK '{print $2}'`
+- curl_version=`echo $awk_curl_version | $curl_version_parse`
+-
+- if test -z "$BUILD_CLAMONACC_TRUE"; then :
+- if test $curl_version -ge 470272 ; then
+- $enable_clamonacc="yes"
+- else
+- as_fn_error $? "Your libcurl (e.g. libcurl-devel) is too old. Installing ClamAV with clamonacc requires libcurl 7.45 or higher. For a quick fix, run ./configure again with --disable-clamonacc if you do not wish to use on-access scanning features. For more information on ClamAV's on-access scanner, please read our documentation: https://www.clamav.net/documents/on-access-scanning#on-access-scanning" "$LINENO" 5
+- fi
+-
+-fi
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
+-$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
+-if ${ac_cv_lib_curl_curl_easy_init+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lcurl $CURL_LIBS
+- $LIBS"
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char curl_easy_init ();
+-int
+-main ()
+-{
+-return curl_easy_init ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_curl_curl_easy_init=yes
+-else
+- ac_cv_lib_curl_curl_easy_init=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5
+-$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
+-if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then :
+-
+- curl_msg="";
+- have_curl="yes";
+- CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS $CURL_LIBS";
+- CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS";
+- FRESHCLAM_LIBS="$FRESHCLAM_LIBS $CURL_LDFLAGS $CURL_LIBS";
+- FRESHCLAM_CPPFLAGS="$FRESHCLAM_CPPFLAGS $CURL_CPPFLAGS"
+-
+-else
+-
+- as_fn_error $? "Your libcurl is misconfigured. libcurl (e.g. libcurl-devel) is required in order to build freshclam and clamsubmit." "$LINENO" 5
+-
+-fi
+-
+-
+- LDFLAGS="$save_LDFLAGS"
++ LDFLAGS="$save_LDFLAGS"
+ else
+ as_fn_error $? "libcurl not found. libcurl (e.g. libcurl-devel) is required in order to build freshclam and clamsubmit." "$LINENO" 5
+ fi
diff --git a/recipes-scanners/clamav/files/fix_pcre_check.patch b/recipes-scanners/clamav/files/fix_pcre_check.patch
new file mode 100644
index 0000000..81500c5
--- /dev/null
+++ b/recipes-scanners/clamav/files/fix_pcre_check.patch
@@ -0,0 +1,443 @@
+Index: git/configure
+===================================================================
+--- git.orig/configure
++++ git/configure
+@@ -22779,369 +22779,35 @@ fi
+ LIBS="$save_LIBS"
+
+
+-
+-# Check whether --with-pcre was given.
+-if test "${with_pcre+set}" = set; then :
+- withval=$with_pcre; pcreser=$withval
+-else
+- pcreser="yes"
+-fi
+-
+-
+-case "$pcreser" in
+-no)
+- pcreconfig=""
+- ;;
+-yes)
+- # Extract the first word of "pcre2-config", so it can be a program name with args.
+-set dummy pcre2-config; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_pcreconfig+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- case $pcreconfig in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+- ;;
+-esac
+-fi
+-pcreconfig=$ac_cv_path_pcreconfig
+-if test -n "$pcreconfig"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5
+-$as_echo "$pcreconfig" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+- if test "x$pcreconfig" = "x"; then
+- # Extract the first word of "pcre-config", so it can be a program name with args.
+-set dummy pcre-config; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_pcreconfig+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- case $pcreconfig in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+- ;;
+-esac
+-fi
+-pcreconfig=$ac_cv_path_pcreconfig
+-if test -n "$pcreconfig"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5
+-$as_echo "$pcreconfig" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+- if test "x$pcreconfig" = "x"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: cannot locate libpcre2 or libpcre within PATH" >&5
+-$as_echo "$as_me: cannot locate libpcre2 or libpcre within PATH" >&6;}
+- else
+- pcrelib="pcre"
+- fi
+- else
+- pcrelib="pcre2"
+- fi
+- ;;
+-"")
+- as_fn_error $? "cannot assign blank value to --with-pcre" "$LINENO" 5
+- ;;
+-*)
+- # Extract the first word of "pcre2-config", so it can be a program name with args.
+-set dummy pcre2-config; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_pcreconfig+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- case $pcreconfig in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $pcreser/bin
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+- ;;
+-esac
+-fi
+-pcreconfig=$ac_cv_path_pcreconfig
+-if test -n "$pcreconfig"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5
+-$as_echo "$pcreconfig" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+- if test "x$pcreconfig" = "x"; then
+- # Extract the first word of "pcre-config", so it can be a program name with args.
+-set dummy pcre-config; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_path_pcreconfig+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- case $pcreconfig in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $pcreser/bin
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+- ;;
+-esac
+-fi
+-pcreconfig=$ac_cv_path_pcreconfig
+-if test -n "$pcreconfig"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5
+-$as_echo "$pcreconfig" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+- if test "x$pcreconfig" = "x"; then
+- as_fn_error $? "cannot locate libpcre2 or libpcre at $pcreser" "$LINENO" 5
+- else
+- pcrelib="pcre"
+- fi
+- else
+- pcrelib="pcre2"
+- fi
+- ;;
+-esac
+-
+ found_pcre="no"
+-if test "x$pcreconfig" != "x"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pcre-config version" >&5
+-$as_echo_n "checking pcre-config version... " >&6; }
+- pcre_version="`$pcreconfig --version`"
+-
+- if test "x$pcre_version" = "x"; then
+- as_fn_error $? "$pcreconfig failed" "$LINENO" 5
+- fi
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcre_version" >&5
+-$as_echo "$pcre_version" >&6; }
+-
+- pcrever_prefix=`expr "$pcre_version" : '\([^0-9]*\)'`
+- pcrever_frag=${pcre_version#$pcrever_prefix}
+-
+- pcrever_major=`expr "$pcrever_frag" : '\([0-9]*\)'`
+- pcrever_frag=${pcrever_frag#*\.}
+- pcrever_minor=`expr "$pcrever_frag" : '\([0-9]*\)'`
+-
+- if test "$pcrelib" = "pcre"; then
+- if test $pcrever_major -lt 6; then
+- as_fn_error $? "This pcre version is missing features used by ClamAV. Please upgrade to a newer version: http://www.pcre.org." "$LINENO" 5
+- fi
+- if test $pcrever_major -eq 6 && test $pcrever_minor -lt 5; then
+- as_fn_error $? "This pcre version is missing features used by ClamAV. Please upgrade to a newer version: http://www.pcre.org." "$LINENO" 5
+- fi
+- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcre (original) detected. We recommend upgrading from pcre to pcre2 10.30 or later: http://www.pcre.org." >&5
+-$as_echo "$as_me: WARNING: pcre (original) detected. We recommend upgrading from pcre to pcre2 10.30 or later: http://www.pcre.org." >&2;}
+- fi
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CVE-2017-7186" >&5
+-$as_echo_n "checking for CVE-2017-7186... " >&6; }
+- if test "$pcrelib" = "pcre2"; then
+- if test $pcrever_major -eq 10 && test $pcrever_minor -lt 24; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The installed pcre2 version may contain security bugs. Please upgrade to 10.30 or later: http://www.pcre.org." >&5
+-$as_echo "$as_me: WARNING: The installed pcre2 version may contain security bugs. Please upgrade to 10.30 or later: http://www.pcre.org." >&2;}
+- else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+-$as_echo "ok" >&6; }
+- fi
+- else
+- if test $pcrever_major -eq 8 && test $pcrever_minor -lt 41; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The installed pcre version may contain security bugs. Please upgrade to 8.41+ or _preferably_ install pcre2 10.30+: http://www.pcre.org." >&5
+-$as_echo "$as_me: WARNING: The installed pcre version may contain security bugs. Please upgrade to 8.41+ or _preferably_ install pcre2 10.30+: http://www.pcre.org." >&2;}
+- else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+-$as_echo "ok" >&6; }
+- fi
+- fi
+-
+- found_pcre="yes"
+- PCRE_HOME="`$pcreconfig --prefix`"
+- PCRE_CPPFLAGS="`$pcreconfig --cflags`"
+- if test "$pcrelib" = "pcre2"; then
+- PCRE_LIBS="`$pcreconfig --libs8`"
+- else
+- PCRE_LIBS="`$pcreconfig --libs`"
+- fi
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: CFLAGS from pcre-config: $PCRE_CPPFLAGS" >&5
+-$as_echo "$as_me: CFLAGS from pcre-config: $PCRE_CPPFLAGS" >&6;}
+- { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS from pcre-config: $PCRE_LIBS" >&5
+-$as_echo "$as_me: LIBS from pcre-config: $PCRE_LIBS" >&6;}
+-fi
+-
+ have_pcre="no"
+-if test "x$found_pcre" != "xno"; then
+- save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS=$PCRE_CPPFLAGS
++# Check whether --with-pcre was given.
++if test "${with_pcre+set}" = set; then :
++ withval=$with_pcre;
+ save_LDFLAGS="$LDFLAGS"
+- LDFLAGS=$PCRE_LIBS
+-
+- if test "$pcrelib" = "pcre2"; then
+-
+- have_pcre="yes"
+- else
+- ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
+-if test "x$ac_cv_header_pcre_h" = xyes; then :
+- have_pcre="yes"
+-else
+- have_pcre="no"
+-fi
+-
+-
+- if test "x$have_pcre" = "xno"; then
+- ac_fn_c_check_header_mongrel "$LINENO" "pcre/pcre.h" "ac_cv_header_pcre_pcre_h" "$ac_includes_default"
+-if test "x$ac_cv_header_pcre_pcre_h" = xyes; then :
+- have_pcre="yes"
++ if test "X$withval" != "Xno"; then
++ if test "${PKG_CONFIG}libpcre2-8 --exists"; then
++ pcrelib="pcre2"
++ have_pcre="yes"
++ found_pcre="yes"
++ PCRE_HOME="$withval"
++ PCRE_LIBS="${PKG_CONFIG} libpcre2-8 --libs"
++ LDFLAGS="$PCRE_LIBS $save_LDFLAGS"
++ fi
++ LDFLAGS="$save_LDFLAGS"
++ fi
+ else
+- have_pcre="no"
++ as_fn_error $? "libpcre not found. libpcre (e.g. libpcre-devel) is required in order to build freshclam and clamsubmit." "$LINENO" 5
+ fi
+
+
+- fi
+-
+- if test "x$have_pcre" = "xyes"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
+-$as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
+-if ${ac_cv_lib_pcre_pcre_compile+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lpcre $LIBS"
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char pcre_compile ();
+-int
+-main ()
+-{
+-return pcre_compile ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_pcre_pcre_compile=yes
+-else
+- ac_cv_lib_pcre_pcre_compile=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
+-$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; }
+-if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
+- have_pcre="yes"
+-else
+- have_pcre="no"
+-fi
+-
+- fi
+- fi
+
+- CPPFLAGS="$save_CPPFLAGS"
+- LDFLAGS="$save_LDFLAGS"
++if test "$pcrelib" = "pcre2"; then
++ $as_echo "#define USING_PCRE2 1" >>confdefs.h
++ { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with pcre2 from $PCRE_HOME" >&5
++ $as_echo "$as_me: Compiling and linking with pcre2 from $PCRE_HOME" >&6;}
+ fi
+
+-if test "x$have_pcre" = "xyes"; then
+-
+-$as_echo "#define HAVE_PCRE 1" >>confdefs.h
+-
+-
+- if test "$pcrelib" = "pcre2"; then
+-
+-$as_echo "#define USING_PCRE2 1" >>confdefs.h
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with pcre2 from $PCRE_HOME" >&5
+-$as_echo "$as_me: Compiling and linking with pcre2 from $PCRE_HOME" >&6;}
+- else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with pcre from $PCRE_HOME" >&5
+-$as_echo "$as_me: Compiling and linking with pcre from $PCRE_HOME" >&6;}
+- fi
+-fi
+
+
+
+@@ -37002,33 +36668,27 @@ fi
+
+ fi
+ if test "x$PCRE_HOME" = "x"; then
+-
+-
+ $as_echo_n " pcre : "
+ if test "x$have_pcre" = "xno"; then :
+- $as_echo "no (disabled)"
+-elif test "x$have_pcre" = "xyes"; then :
+- $as_echo "no"
+-elif test "x$have_pcre" = "x"; then :
+- $as_echo "no"
+-else
+- $as_echo "no ($have_pcre)"
+-fi
+-
++ $as_echo "no (disabled)"
++ elif test "x$have_pcre" = "xyes"; then :
++ $as_echo "no"
++ elif test "x$have_pcre" = "x"; then :
++ $as_echo "no"
++ else
++ $as_echo "no ($have_pcre)"
++ fi
+ else
+-
+-
+ $as_echo_n " pcre : "
+ if test "x$have_pcre" = "xno"; then :
+- $as_echo "$PCRE_HOME (disabled)"
+-elif test "x$have_pcre" = "xyes"; then :
+- $as_echo "$PCRE_HOME"
+-elif test "x$have_pcre" = "x"; then :
+- $as_echo "$PCRE_HOME"
+-else
+- $as_echo "$PCRE_HOME ($have_pcre)"
+-fi
+-
++ $as_echo "$PCRE_HOME (disabled)"
++ elif test "x$have_pcre" = "xyes"; then :
++ $as_echo "$PCRE_HOME"
++ elif test "x$have_pcre" = "x"; then :
++ $as_echo "$PCRE_HOME"
++ else
++ $as_echo "$PCRE_HOME ($have_pcre)"
++ fi
+ fi
+
+
diff --git a/recipes-scanners/clamav/files/libcamav_fix.patch b/recipes-scanners/clamav/files/libcamav_fix.patch
new file mode 100644
index 0000000..736a3e6
--- /dev/null
+++ b/recipes-scanners/clamav/files/libcamav_fix.patch
@@ -0,0 +1,13 @@
+Index: git/libclamav.pc.in
+===================================================================
+--- git.orig/libclamav.pc.in
++++ git/libclamav.pc.in
+@@ -6,7 +6,7 @@ includedir=@includedir@
+ Name: libclamav
+ Description: A GPL virus scanner
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lclamav
++Libs: -lclamav
+ Libs.private: @LIBCLAMAV_LIBS@
+ Cflags: -I${includedir}
+
diff --git a/recipes-scanners/clamav/files/libclamav_fix.patch b/recipes-scanners/clamav/files/libclamav_fix.patch
new file mode 100644
index 0000000..84e87e6
--- /dev/null
+++ b/recipes-scanners/clamav/files/libclamav_fix.patch
@@ -0,0 +1,41 @@
+Index: git/libclamav/Makefile.in
+===================================================================
+--- git.orig/libclamav/Makefile.in
++++ git/libclamav/Makefile.in
+@@ -1328,7 +1328,7 @@ libclamav_nocxx_la_SOURCES = bytecode_no
+ libclamav_nocxx_la_CFLAGS = $(AM_CFLAGS) @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@
+ libclamav_la_LIBADD = @SSL_LIBS@ @JSON_LIBS@ @PCRE_LIBS@ @LIBCLAMAV_LIBS@ @ZLIB_LIBS@ @LIBLTDL@ $(XML_LIBS) $(IFACELIBADD) $(MSPACKLIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @THREAD_LIBS@ @LIBM@
+ libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) $(MSPACKDEP) libclamav_internal_utils.la
+-libclamav_la_CFLAGS = $(MSPACK_CFLAGS) $(AM_CFLAGS) $(YARA_CFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\" @LIBCLAMAV_CPPFLAGS@ @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@
++libclamav_la_CFLAGS = $(MSPACK_CFLAGS) $(AM_CFLAGS) $(YARA_CFLAGS) @LIBCLAMAV_CPPFLAGS@ @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@
+ libclamav_la_LDFLAGS = @SSL_LDFLAGS@ @TH_SAFE@ @JSON_LDFLAGS@ \
+ @LIBICONV@ $(XML_LIBS) -version-info @LIBCLAMAV_VERSION@ \
+ -no-undefined $(am__append_8)
+Index: git/libclamav/others.c
+===================================================================
+--- git.orig/libclamav/others.c
++++ git/libclamav/others.c
+@@ -132,10 +132,6 @@ static lt_dlhandle lt_dlfind(const char
+ lt_dlhandle rhandle;
+ unsigned i;
+
+- if (lt_dladdsearchdir(SEARCH_LIBDIR)) {
+- cli_dbgmsg("lt_dladdsearchdir failed for %s\n", SEARCH_LIBDIR);
+- }
+-
+ searchpath = lt_dlgetsearchpath();
+ if (!searchpath)
+ searchpath = "";
+Index: git/clamav-config.in
+===================================================================
+--- git.orig/clamav-config.in
++++ git/clamav-config.in
+@@ -59,7 +59,7 @@ while test $# -gt 0; do
+ ;;
+
+ --libs)
+- echo -L@libdir@ @LIBCLAMAV_LIBS@
++ echo @LIBCLAMAV_LIBS@
+ ;;
+
+ *)