1 | |
---|
2 | |
---|
3 | # -*- 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 |
---|
4 | # $Id$ |
---|
5 | |
---|
6 | PortSystem 1.0 |
---|
7 | |
---|
8 | PortGroup github 1.0 |
---|
9 | |
---|
10 | github.setup plusvic yara 3.1.0 yara |
---|
11 | categories security |
---|
12 | license APL-2 |
---|
13 | platforms darwin |
---|
14 | maintainers yendor.net:a.schuster yahoo.fr:jul_bsd openmaintainer |
---|
15 | |
---|
16 | description Malware identification and classification tool |
---|
17 | long_description \ |
---|
18 | YARA is a tool aimed at helping malware researchers to identify and \ |
---|
19 | classify malware samples. |
---|
20 | |
---|
21 | homepage http://plusvic.github.io/yara/ |
---|
22 | #master_sites https://github.com/plusvic/yara/archive/ |
---|
23 | |
---|
24 | |
---|
25 | if {${subport} eq ${name}} { |
---|
26 | |
---|
27 | #distname v${version} |
---|
28 | #worksrcdir yara-${version} |
---|
29 | # |
---|
30 | #checksums rmd160 9f969977c37a5a27117119c06f9775ff25a8a812 \ |
---|
31 | # sha256 cd71c1009b6400f3220e4994ebd33ebcf6eef1bf5b6bf9d1d105af037d3b29fe |
---|
32 | ## ./include/yara/utils.h:71:8: error: expected parameter declarator |
---|
33 | #patchfiles patch-libyara-include-yara-utils.h.diff |
---|
34 | ## FIXME! https://github.com/plusvic/yara/issues/168 |
---|
35 | |
---|
36 | distname 367b0eab221684d3a818e695c4889193b2c53031 |
---|
37 | worksrcdir ${github.project}-${distname} |
---|
38 | |
---|
39 | checksums rmd160 94f8c8e86fab78dded2aa62f6a76d3b66b7e6169 \ |
---|
40 | sha256 236222b591304df704cc0cc83d159efe5a3e109f1a617dc63090d129e94d8b37 |
---|
41 | |
---|
42 | conflicts ${name}-devel ${name}1 |
---|
43 | |
---|
44 | livecheck.url https://github.com/plusvic/yara/releases/ |
---|
45 | livecheck.regex "<a href=\"/plusvic/yara/tree/v(\\d+(?:\\.\\d+)*)\" class=" |
---|
46 | } |
---|
47 | |
---|
48 | depends_build port:libtool |
---|
49 | |
---|
50 | |
---|
51 | ## https://github.com/Homebrew/homebrew/blob/master/Library/Formula/yara.rb |
---|
52 | use_autoconf yes |
---|
53 | use_automake yes |
---|
54 | ## configure is included in build.sh |
---|
55 | #build.cmd sh build.sh |
---|
56 | configure.cflags-append "-std=gnu89" |
---|
57 | #configure.ldflags-append "-lpcre" |
---|
58 | configure.args --disable-dependency-tracking |
---|
59 | |
---|
60 | pre-configure { |
---|
61 | if {${subport} ne "${name}1"} { |
---|
62 | system -W ${worksrcpath} "/bin/sh bootstrap.sh" |
---|
63 | } |
---|
64 | } |
---|
65 | |
---|
66 | test.run no |
---|
67 | |
---|
68 | default_variants +python27 |
---|
69 | |
---|
70 | variant universal {} |
---|
71 | configure.cflags-append "${configure.cflags} [get_canonical_archflags cc]" |
---|
72 | |
---|
73 | variant python27 description { Python 2.7 bindings } conflicts python33 { |
---|
74 | configure.env PYTHON_CONFIG=${prefix}/bin/python2.7-config PYTHON_VERSION=2.7 |
---|
75 | configure.python ${prefix}/bin/python2.7 |
---|
76 | depends_lib-append port:python27 |
---|
77 | } |
---|
78 | |
---|
79 | variant python33 description { Python 3.3 bindings } conflicts python27 { |
---|
80 | configure.env PYTHON_CONFIG=${prefix}/bin/python3.3-config PYTHON_VERSION=3.3 |
---|
81 | configure.python ${prefix}/bin/python3.3 |
---|
82 | depends_lib-append port:python33 |
---|
83 | } |
---|
84 | |
---|
85 | subport ${name}-devel { |
---|
86 | conflicts ${name} ${name}1 |
---|
87 | |
---|
88 | # fetch.type git |
---|
89 | # git.url https://github.com/plusvic/yara.git |
---|
90 | # version 20140829 |
---|
91 | # git.branch 367b0eab221684d3a818e695c4889193b2c53031 |
---|
92 | ## OR tar.gz |
---|
93 | distname 367b0eab221684d3a818e695c4889193b2c53031 |
---|
94 | worksrcdir ${github.project}-${distname} |
---|
95 | |
---|
96 | checksums rmd160 94f8c8e86fab78dded2aa62f6a76d3b66b7e6169 \ |
---|
97 | sha256 236222b591304df704cc0cc83d159efe5a3e109f1a617dc63090d129e94d8b37 |
---|
98 | |
---|
99 | livecheck.type none |
---|
100 | } |
---|
101 | |
---|
102 | subport ${name}1 { |
---|
103 | conflicts ${name} ${name}-devel |
---|
104 | |
---|
105 | version 1.7 |
---|
106 | license GPL-2+ |
---|
107 | master_sites googlecode:yara-project |
---|
108 | distname yara-${version} |
---|
109 | checksums rmd160 12ca8b2eb7a8b7de3fae8d97e728d4847299d99a \ |
---|
110 | sha256 fcee06a2f43ab65c88597de54d630a3beee925e7e84c890a8303f08a3fc85c91 |
---|
111 | |
---|
112 | use_autoconf no |
---|
113 | use_automake no |
---|
114 | depends_lib-append port:pcre |
---|
115 | depends_build-delete bin:glibtool:libtool |
---|
116 | post-patch { |
---|
117 | # fix use of inline for clang compatibility |
---|
118 | reinplace "s|inline|static inline|g" ${worksrcpath}/libyara/scan.c |
---|
119 | } |
---|
120 | |
---|
121 | variant re2 description "uses re2 library instead of pcre for regular expression parsing" { |
---|
122 | configure.args-append --with-re2 |
---|
123 | depends_lib-append port:re2 |
---|
124 | depends_lib-delete port:pcre |
---|
125 | } |
---|
126 | |
---|
127 | livecheck.type none |
---|
128 | } |
---|
129 | |
---|
130 | |
---|