19 | | homepage http://code.google.com/p/yara-project/ |
20 | | master_sites googlecode:yara-project |
| 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 | } |
32 | | variant re2 description "uses re2 library instead of pcre for regular expression parsing" { |
33 | | configure.args-append --with-re2 |
34 | | depends_lib-append port:re2 |
35 | | depends_lib-delete port:pcre |
| 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 | } |