1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | PortSystem 1.0 |
---|
3 | PortGroup legacysupport 1.0 |
---|
4 | PortGroup cmake 1.1 |
---|
5 | |
---|
6 | name clamav-legacy |
---|
7 | set realname clamav |
---|
8 | conflicts clamav clamav-server |
---|
9 | version 0.104.2 |
---|
10 | revision 0 |
---|
11 | categories sysutils |
---|
12 | maintainers {Peter "Pete" Dyballa} |
---|
13 | description clamav anti-virus software adapted to old Macs |
---|
14 | license {GPL-2 OpenSSLException} |
---|
15 | |
---|
16 | long_description Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The \ |
---|
17 | main purpose of this software is the integration with mail \ |
---|
18 | servers (attachment scanning). This Port supports old Macs \ |
---|
19 | with Mac OS X 10.4…10.6 (Tiger, Leopard, Snow Leopard) |
---|
20 | |
---|
21 | homepage https://www.clamav.net |
---|
22 | master_sites https://www.clamav.net/downloads |
---|
23 | distname ${realname}-${version} |
---|
24 | |
---|
25 | checksums rmd160 62915fde0cb4d659bb4c77ca2278560e7b141bda \ |
---|
26 | sha256 3e45e46d9aaeb3a6956ed30376237ab7c4cd9573bc0f5d6fc15c588d30978d9d \ |
---|
27 | size 11950409 |
---|
28 | |
---|
29 | platforms darwin |
---|
30 | supported_archs i386 ppc ppc64 x86_64 |
---|
31 | use_xcode no |
---|
32 | |
---|
33 | compiler.cxx_standard 2014 |
---|
34 | configure.cxxflags-append -std=c++14 |
---|
35 | |
---|
36 | # Disable tests to avoid extra dependencies |
---|
37 | configure.args-append -DENABLE_TESTS=OFF |
---|
38 | |
---|
39 | ## Parallel build causes build failures as of 0.104.0 |
---|
40 | #use_parallel_build yes |
---|
41 | |
---|
42 | depends_build path:bin/cmake:cmake \ |
---|
43 | port:pkgconfig \ |
---|
44 | bin:git:git |
---|
45 | |
---|
46 | depends_lib port:curl \ |
---|
47 | port:ncurses \ |
---|
48 | port:zlib \ |
---|
49 | port:bzip2 \ |
---|
50 | path:lib/libssl.dylib:openssl \ |
---|
51 | port:pcre2 \ |
---|
52 | port:libxml2 \ |
---|
53 | port:libiconv \ |
---|
54 | port:json-c \ |
---|
55 | port:libtool |
---|
56 | |
---|
57 | ## older systems support |
---|
58 | post-extract { |
---|
59 | if { ${os.platform} eq "darwin" && ${os.major} < 11 } { |
---|
60 | |
---|
61 | # use linux version of openssl cert util on systems < 10.7 that don't support the macOS version |
---|
62 | # ./common/linux/cert_util_linux.c -> ./common/mac/cert_util_mac.m |
---|
63 | # passes all tests. See: https://trac.macports.org/ticket/59168 |
---|
64 | |
---|
65 | ui_msg "Replacing the port's Mac security with plain Linux security" |
---|
66 | delete ${worksrcpath}/common/mac/cert_util_mac.m |
---|
67 | copy ${worksrcpath}/common/linux/cert_util_linux.c \ |
---|
68 | ${worksrcpath}/common/mac/cert_util_mac.m |
---|
69 | } |
---|
70 | } |
---|
71 | |
---|
72 | platform darwin 8 { # Tiger, Mac OS X 10.4, uname -r |
---|
73 | configure.args-append -DOPTIMIZE=OFF |
---|
74 | patchfiles libclamav-others_common.c-O_SYMLINK@Tiger.patch |
---|
75 | } |
---|
76 | |
---|
77 | variant clamav_milter description {Build with libmilter support} { |
---|
78 | depends_lib-append port:libmilter |
---|
79 | configure.args-append -DENABLE_MILTER=ON |
---|
80 | } |
---|
81 | |
---|
82 | pre-test { |
---|
83 | if {![variant_isset tests]} { |
---|
84 | ui_error "'tests' variant must be activated to enable test support" |
---|
85 | error "Please enable the 'tests' variant, choose a suitable Python" |
---|
86 | error "version, install the matching version of 'pytest' and try again" |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | variant tests description {Enable running 'port test'} { |
---|
91 | ui_msg "Tests run using the installed version of this port." |
---|
92 | depends_test-append port:check |
---|
93 | |
---|
94 | configure.args-delete -DENABLE_TESTS=OFF |
---|
95 | configure.pre_args-replace -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \ |
---|
96 | -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF |
---|
97 | |
---|
98 | # default_variants +python38 |
---|
99 | |
---|
100 | variant python37 conflicts python38 python39 python310 description {Create test data with Python 3.7 and run tests with Python 3.7} { |
---|
101 | depends_test-append port:python37 \ |
---|
102 | port:py37-pytest |
---|
103 | } |
---|
104 | variant python38 conflicts python37 python39 python310 description {Create test data with Python 3.8 and run tests with Python 3.8} { |
---|
105 | depends_test-append port:python38 \ |
---|
106 | port:py38-pytest |
---|
107 | } |
---|
108 | variant python39 conflicts python37 python38 python310 description {Create test data with Python 3.9 and run tests with Python 3.9} { |
---|
109 | depends_test-append port:python39 \ |
---|
110 | port:py39-pytest |
---|
111 | } |
---|
112 | variant python310 conflicts python37 python38 python39 description {Create test data with Python 3.10 and run tests with Python 3.10} { |
---|
113 | depends_test-append port:python310 \ |
---|
114 | port:py310-pytest |
---|
115 | } |
---|
116 | |
---|
117 | test.run yes |
---|
118 | test.cmd ctest |
---|
119 | test.target --rerun-failed --output-on-failure |
---|
120 | } |
---|
121 | |
---|
122 | livecheck.type regex |
---|
123 | livecheck.url http://www.clamav.net/downloads |
---|
124 | livecheck.regex ${name}-(\\d+.\\d+.\\d+)${extract.suffix} |
---|