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 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup github 1.0 |
---|
6 | |
---|
7 | github.setup plusvic yara 3.3.0 v |
---|
8 | revision 0 |
---|
9 | categories security |
---|
10 | platforms darwin |
---|
11 | license Apache-2.0 |
---|
12 | maintainers yendor.net:a.schuster \ |
---|
13 | openmaintainer |
---|
14 | |
---|
15 | description The pattern matching swiss knife for malware researchers |
---|
16 | long_description \ |
---|
17 | YARA is a tool aimed at helping malware researchers to identify and \ |
---|
18 | classify malware samples. |
---|
19 | |
---|
20 | homepage http://${github.author}.github.io/${github.project}/ |
---|
21 | master_sites https://github.com/${github.author}/${github.project}/archive/ |
---|
22 | distname v${version} |
---|
23 | checksums rmd160 330de9de9294953a3a42032ccc5ae849f065ab5e \ |
---|
24 | sha256 e5f4359082e35ff00ee94af9ee897bb0ab18abf49a2c4fe45968d7a848e5bd83 |
---|
25 | |
---|
26 | # specifics for yara library and tools |
---|
27 | |
---|
28 | if {${subport} eq ${name}} { |
---|
29 | |
---|
30 | worksrcdir ${github.project}-${version} |
---|
31 | |
---|
32 | use_configure yes |
---|
33 | pre-configure { |
---|
34 | system -W ${worksrcpath} "/bin/sh bootstrap.sh" |
---|
35 | } |
---|
36 | |
---|
37 | depends_build port:automake \ |
---|
38 | port:libtool |
---|
39 | |
---|
40 | test.run no |
---|
41 | |
---|
42 | variant cuckoo description {Add support for Cuckoo sandbox} { |
---|
43 | depends_lib-append port:jansson |
---|
44 | configure.args-append --enable-cuckoo |
---|
45 | } |
---|
46 | |
---|
47 | variant hash description {Add md5, sha1, and sha256 hash functions} { |
---|
48 | depends_lib-append port:openssl |
---|
49 | configure.args-append --enable-hash \ |
---|
50 | --with-crypto |
---|
51 | } |
---|
52 | |
---|
53 | variant magic description {Add filetype detection by libmagic} { |
---|
54 | depends_lib-append port:libmagic |
---|
55 | configure.args-append --enable-magic |
---|
56 | } |
---|
57 | |
---|
58 | variant math description {Add entropy tests and other helper functions} { |
---|
59 | configure.args-append --enable-math |
---|
60 | } |
---|
61 | } |
---|
62 | |
---|
63 | |
---|
64 | # specifics for python bindings |
---|
65 | |
---|
66 | set python.versions {26 27 31 32 33 34} |
---|
67 | |
---|
68 | foreach v ${python.versions} { |
---|
69 | set python.version ${v} |
---|
70 | set python.branch [string range ${python.version} 0 end-1].[string index ${python.version} end] |
---|
71 | set python.bin ${prefix}/bin/python${python.branch} |
---|
72 | set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch} |
---|
73 | |
---|
74 | subport py${python.version}-${name} { |
---|
75 | categories security python |
---|
76 | description ${name} bindings for python ${python.branch} |
---|
77 | long_description ${long_description}\ |
---|
78 | This subport provides bindings for python ${python.branch}. |
---|
79 | |
---|
80 | worksrcdir ${github.project}-${version}/yara-python |
---|
81 | |
---|
82 | depends_lib-append port:${name} \ |
---|
83 | port:python${python.version} |
---|
84 | |
---|
85 | use_configure no |
---|
86 | |
---|
87 | build.cmd ${python.bin} setup.py --no-user-cfg |
---|
88 | build.target build |
---|
89 | |
---|
90 | destroot.cmd ${python.bin} setup.py --no-user-cfg |
---|
91 | destroot.destdir --prefix=${python.prefix} --root=${destroot} |
---|
92 | |
---|
93 | test.run yes |
---|
94 | test.cmd ${python.bin} |
---|
95 | test.target tests.py |
---|
96 | } |
---|
97 | } |
---|