Skip to content

Commit da39bf1

Browse files
committedSep 16, 2021
clamav: update to 0.104.0, new cmake-based build
1 parent 29ab230 commit da39bf1

File tree

3 files changed

+28
-83
lines changed

3 files changed

+28
-83
lines changed
 

‎sysutils/clamav/Portfile

+28-49
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
PortSystem 1.0
2-
PortGroup muniversal 1.0
32
PortGroup legacysupport 1.0
3+
PortGroup cmake 1.1
44

55
name clamav
6-
version 0.103.3
7-
revision 1
6+
version 0.104.0
87
categories sysutils
98
maintainers {geeklair.net:dluke @danielluke}
109
description clamav antivirus software
@@ -16,27 +15,24 @@ long_description Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The \
1615

1716
homepage http://www.clamav.net
1817
master_sites http://www.clamav.net/downloads/production
19-
checksums rmd160 537e622e85490b64591734160820422da7d31777 \
20-
sha256 9f6e3d18449f3d1a3992771d696685249dfa12736fe2b2929858f2c7d8276ae9 \
21-
size 13389239
18+
checksums rmd160 6cae80695cb2e2f5214ce6b999517e1f1f2a4305 \
19+
sha256 a079d64cd55d6184510adfe0f341b2f278f7fb1bcc080d28d374298160f19cb2 \
20+
size 11896747
2221

2322
platforms darwin
2423

25-
configure.args --mandir=${prefix}/share/man \
26-
--with-zlib=${prefix} \
27-
--with-openssl=${prefix} \
28-
--with-pcre=${prefix} \
29-
--with-xml=${prefix} \
30-
--with-libcurl=${prefix} \
31-
--with-libjson=${prefix} \
32-
--disable-silent-rules \
33-
--enable-llvm=no
34-
#- disable llvm because of upstream bug
35-
#- https://bugzilla.clamav.net/show_bug.cgi?id=11309
24+
# Disable tests to avoid extra dependencies
25+
configure.args-append -D ENABLE_TESTS=OFF
3626

37-
use_parallel_build yes
27+
#Parallel build causes build failures as of 0.104.0
28+
#use_parallel_build yes
3829

39-
depends_build port:pkgconfig
30+
depends_build port:cmake \
31+
port:pkgconfig \
32+
bin:git:git
33+
34+
#depends_test port:check \
35+
# port:py39-pytest
4036

4137
depends_lib port:libiconv \
4238
port:zlib \
@@ -49,11 +45,6 @@ depends_lib port:libiconv \
4945
port:json-c \
5046
port:libtool
5147

52-
#- makefile hack to build even when chmlib is installed with its own lzx.h
53-
#- configure hack to use pkgc-config for libxml2 libraries because
54-
#- xml2-config includes the icu libraries and we overlink otherwiwse
55-
patchfiles patch-libclamav-Makefile.diff patch-configure.diff
56-
5748
## older systems support
5849
# use linux version of openssl cert util on systems < 10.7 that don't support the macOS version
5950
# ./shared/linux/cert_util_linux.c -> ./shared/mac/cert_util_mac.m
@@ -67,34 +58,22 @@ post-extract {
6758
}
6859
}
6960

70-
test.run yes
71-
test.target check
72-
73-
set merger_dont_diff ${prefix}/bin/clamav-config
74-
7561
platform darwin 8 {
76-
configure.cflags {-O0}
77-
}
78-
79-
post-destroot {
80-
#muniversal should allow this to be hooked in some way that's less gross
81-
#this code copied from nspr's portfile
82-
if {[variant_exists universal] && [variant_isset universal]} {
83-
copy ${destroot}${prefix}/bin/${build_arch}-clamav-config ${destroot}${prefix}/bin/bak-config
84-
foreach file [glob ${destroot}${prefix}/bin/*clamav-config] {
85-
delete $file
86-
}
87-
move ${destroot}${prefix}/bin/bak-config ${destroot}${prefix}/bin/clamav-config
88-
reinplace "s|-arch ${build_arch}||g" ${destroot}${prefix}/bin/clamav-config
89-
reinplace "s|-L\$\{exec_prefix\}/lib/${build_arch}||g" ${destroot}${prefix}/bin/clamav-config
90-
}
91-
reinplace "s|-R${prefix}/lib||g" ${destroot}${prefix}/bin/clamav-config
92-
}
62+
configure.args-append -D OPTIMIZE=OFF
63+
}
9364

9465
variant clamav_milter description {build with libmilter support} {
95-
depends_lib-append port:libmilter
96-
configure.args-append --enable-milter
97-
}
66+
depends_lib-append port:libmilter
67+
configure.args-append -D ENABLE_MILTER=ON
68+
}
69+
70+
#tests fail if this version of the port isn't installed
71+
#should fix it to look in build directory first (only)
72+
# also, need to build withthout ENABLE_TESTS=OFF if we want to run tests
73+
# ... but don't want to force everyone to install check and python
74+
#test.run yes
75+
#test.cmd ctest
76+
#test.target --rerun-failed --output-on-failure
9877

9978
livecheck.type regex
10079
livecheck.url http://www.clamav.net/downloads

‎sysutils/clamav/files/patch-configure.diff

-23
This file was deleted.

‎sysutils/clamav/files/patch-libclamav-Makefile.diff

-11
This file was deleted.

0 commit comments

Comments
 (0)