clamav: update to 0.103.1
Convert to using CMake in order to speed up compilation and to fix
compilation under glibc.
Add extra dependencies since they're now needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 7cd687cb7e
)
This commit is contained in:
parent
e1b21ddda2
commit
3a3b7c6eee
3 changed files with 94 additions and 33 deletions
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=clamav
|
PKG_NAME:=clamav
|
||||||
PKG_VERSION:=0.103.0
|
PKG_VERSION:=0.103.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
|
PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
|
||||||
PKG_HASH:=32a9745277bfdda80e77ac9ca2f5990897418e9416880f3c31553ca673e80546
|
PKG_HASH:=7308c47b89b268af3b9f36140528927a49ff3e633a9c9c0aac2712d81056e257
|
||||||
|
|
||||||
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
|
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
|
||||||
Lucian Cristian <lucian.cristian@gmail.com>
|
Lucian Cristian <lucian.cristian@gmail.com>
|
||||||
|
@ -21,16 +21,16 @@ PKG_LICENSE:=GPL-2.0-only
|
||||||
PKG_LICENSE_FILES:=COPYING*
|
PKG_LICENSE_FILES:=COPYING*
|
||||||
PKG_CPE_ID:=cpe:/a:clamav:clamav
|
PKG_CPE_ID:=cpe:/a:clamav:clamav
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=ncurses
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_INSTALL:=1
|
|
||||||
PKG_FIXUP:=autoreconf
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/uclibc++.mk
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
|
||||||
define Package/clamav/Default
|
define Package/clamav/Default
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
DEPENDS:=$(CXX_DEPENDS) +libpthread +zlib +libcurl +libjson-c +libmilter-sendmail +libopenssl +libltdl +libpcre2 +USE_MUSL:musl-fts
|
DEPENDS:=+libstdcpp +libpthread +zlib +libbz2 +libxml2 +libcurl +libjson-c +libmilter-sendmail +libopenssl +libltdl +libpcre2
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
SUBMENU:=Web Servers/Proxies
|
SUBMENU:=Web Servers/Proxies
|
||||||
TITLE:=ClamAV
|
TITLE:=ClamAV
|
||||||
|
@ -56,35 +56,27 @@ define Package/freshclam/description
|
||||||
Database updater for ClamAV
|
Database updater for ClamAV
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CMAKE_OPTIONS += \
|
||||||
--sysconfdir=/etc/clamav/ \
|
-DENABLE_MILTER=ON \
|
||||||
--enable-milter \
|
-DHAVE_ATTRIB_PACKED=ON \
|
||||||
--disable-bzip2 \
|
-DHAVE_ATTRIB_ALIGNED=ON \
|
||||||
--disable-check \
|
-Dtest_run_result=ON \
|
||||||
--disable-clamdtop \
|
-Dtest_run_result__TRYRUN_OUTPUT=ON \
|
||||||
--disable-rpath \
|
-DCLAMAV_USER=nobody \
|
||||||
--disable-xml \
|
-DCLAMAV_GROUP=nogroup \
|
||||||
--disable-zlib-vcheck \
|
-DMMAP_FOR_CROSSCOMPILING=ON \
|
||||||
--with-user=nobody \
|
-DENABLE_CLAMONACC=ON \
|
||||||
--with-group=nogroup \
|
-DENABLE_DOCS=OFF \
|
||||||
--with-libcurl="$(STAGING_DIR)/usr/" \
|
-DENABLE_DOXYGEN=OFF \
|
||||||
--with-libjson="$(STAGING_DIR)/usr/" \
|
-DENABLE_EXAMPLES=OFF \
|
||||||
--with-openssl="$(STAGING_DIR)/usr/" \
|
-DENABLE_UNRAR=OFF \
|
||||||
--with-pcre="$(STAGING_DIR)/usr/" \
|
-DENABLE_SYSTEMD=OFF \
|
||||||
--with-zlib="$(STAGING_DIR)/usr/" \
|
-DIconv_INCLUDE_DIR=$(ICONV_PREFIX)/include \
|
||||||
--without-iconv \
|
-DIconv_LIBRARY=$(ICONV_PREFIX)/lib/libiconv.$(if $(ICONV_FULL),so,a) \
|
||||||
--without-libncurses-prefix
|
-DHAVE_SYSTEM_LFS_FTS=O$(if $(CONFIG_USE_GLIBC),N,FF)
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
|
||||||
ax_cv_uname_syscall=yes \
|
|
||||||
ac_cv_c_mmap_private=yes \
|
|
||||||
have_cv_gai=yes \
|
|
||||||
ac_cv_sys_file_offset_bits=no
|
|
||||||
|
|
||||||
CONFIGURE_VARS += $(if $(CONFIG_IPV6),have_cv_ipv6=yes)
|
|
||||||
|
|
||||||
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto
|
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed $(if $(CONFIG_USE_MUSL),-lfts)
|
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
||||||
|
|
||||||
define Package/clamav/conffiles
|
define Package/clamav/conffiles
|
||||||
/etc/config/clamav
|
/etc/config/clamav
|
||||||
|
|
59
net/clamav/patches/010-musl12x.patch
Normal file
59
net/clamav/patches/010-musl12x.patch
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
--- a/clamonacc/misc/fts.c
|
||||||
|
+++ b/clamonacc/misc/fts.c
|
||||||
|
@@ -744,11 +744,11 @@ static FTSENTRY *
|
||||||
|
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- if ((p = fts_alloc(sp, dp->d_name, _D_EXACT_NAMLEN(dp))) == NULL)
|
||||||
|
+ if ((p = fts_alloc(sp, dp->d_name, strlen(dp->d_name))) == NULL)
|
||||||
|
goto mem1;
|
||||||
|
- if (_D_EXACT_NAMLEN(dp) >= maxlen) { /* include space for NUL */
|
||||||
|
+ if (strlen(dp->d_name) >= maxlen) { /* include space for NUL */
|
||||||
|
oldaddr = sp->fts_path;
|
||||||
|
- if (fts_palloc(sp, _D_EXACT_NAMLEN(dp) + len + 1)) {
|
||||||
|
+ if (fts_palloc(sp, strlen(dp->d_name) + len + 1)) {
|
||||||
|
/*
|
||||||
|
* No more memory for path or structures. Save
|
||||||
|
* errno, free up the current structure and the
|
||||||
|
@@ -773,7 +773,7 @@ static FTSENTRY *
|
||||||
|
maxlen = sp->fts_pathlen - len;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (len + _D_EXACT_NAMLEN(dp) >= USHRT_MAX) {
|
||||||
|
+ if (len + strlen(dp->d_name) >= USHRT_MAX) {
|
||||||
|
/*
|
||||||
|
* In an FTSENT, fts_pathlen is a u_short so it is
|
||||||
|
* possible to wraparound here. If we do, free up
|
||||||
|
@@ -790,7 +790,7 @@ static FTSENTRY *
|
||||||
|
}
|
||||||
|
p->fts_level = level;
|
||||||
|
p->fts_parent = sp->fts_cur;
|
||||||
|
- p->fts_pathlen = len + _D_EXACT_NAMLEN(dp);
|
||||||
|
+ p->fts_pathlen = len + strlen(dp->d_name);
|
||||||
|
|
||||||
|
#if defined FTS_WHITEOUT && 0
|
||||||
|
if (dp->d_type == DT_WHT)
|
||||||
|
--- a/clamonacc/misc/priv_fts.h
|
||||||
|
+++ b/clamonacc/misc/priv_fts.h
|
||||||
|
@@ -207,14 +207,18 @@ typedef struct _ftsent64 {
|
||||||
|
} FTSENT64;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-__BEGIN_DECLS
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+extern "C" {
|
||||||
|
+#endif
|
||||||
|
FTSENT *_priv_fts_children(FTS *, int);
|
||||||
|
int _priv_fts_close(FTS *);
|
||||||
|
FTS *_priv_fts_open(char *const *, int,
|
||||||
|
int (*)(const FTSENT **, const FTSENT **));
|
||||||
|
FTSENT *_priv_fts_read(FTS *);
|
||||||
|
-int _priv_fts_set(FTS *, FTSENT *, int) __THROW;
|
||||||
|
-__END_DECLS
|
||||||
|
+int _priv_fts_set(FTS *, FTSENT *, int) __attribute__ ((__nothrow__));
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#endif /* fts.h */
|
||||||
|
#endif
|
10
net/clamav/patches/020-cmake.patch
Normal file
10
net/clamav/patches/020-cmake.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/freshclam/CMakeLists.txt
|
||||||
|
+++ b/freshclam/CMakeLists.txt
|
||||||
|
@@ -38,7 +38,6 @@ endif()
|
||||||
|
if(WIN32)
|
||||||
|
INSTALL(CODE "FILE(MAKE_DIRECTORY \${ENV}\${CMAKE_INSTALL_PREFIX}/database)")
|
||||||
|
else()
|
||||||
|
- INSTALL(CODE "FILE(MAKE_DIRECTORY \${ENV}\${CMAKE_INSTALL_PREFIX}/share/clamav)")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# now we rename resman-bin executable to resman using target properties
|
Loading…
Reference in a new issue