source: trunk/dports/security/yara/Portfile

Last change on this file was 146517, checked in by raimue@…, 21 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
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: Portfile 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6PortGroup               github 1.0
7
8github.setup            plusvic yara 3.4.0 v
9revision                1
10categories              security
11license                 GPL-2+
12platforms               darwin
13maintainers             yendor.net:a.schuster \
14                        openmaintainer
15
16description             Malware identification and classification tool
17long_description \
18    YARA is a tool aimed at helping malware researchers to identify and \
19    classify malware samples.
20
21checksums               rmd160  7453926c9deee005bda62dc252f37fe4bf769cd6 \
22                        sha256  43a597a48b1a5b39ea43de016db697c8d77d652e21e12848f166d9afaec1c5b6
23
24if {${subport} eq ${name}} {
25    # https://github.com/plusvic/yara/pull/261
26    patchfiles          patch-261.diff
27    patch.pre_args      -p1
28
29    depends_build       port:autoconf \
30                        port:automake \
31                        port:libtool
32
33    depends_lib         port:libmagic \
34                        port:jansson \
35                        path:lib/libssl.dylib:openssl \
36                        port:pcre
37
38    pre-configure {
39        system -W ${worksrcpath} "./bootstrap.sh"
40    }
41    # If yara 1.7 is installed, this build will fail since
42    # /opt/local/include is before ./libyara/include
43    # so swap CPPFLAGS and CFLAGS
44    # Remove this upon the next release after verifying it is not needed.
45    post-configure {
46            reinplace "s|\$(CPPFLAGS) \$(AM_CFLAGS) \$(CFLAGS)|\$(CFLAGS) \$(AM_CFLAGS) \$(CPPFLAGS)|" ${worksrcpath}/Makefile
47            reinplace "s|\$(DEFAULT_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS)|\$(DEFAULT_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CFLAGS)|" ${worksrcpath}/Makefile
48            reinplace "s|\t\$(AM_CFLAGS) \$(CFLAGS)|\t\$(AM_CFLAGS) \$(CPPFLAGS)|" ${worksrcpath}/Makefile
49    }
50
51    configure.cflags-append -std=gnu89
52    configure.args-append   --with-crypto \
53                            --enable-cuckoo \
54                            --enable-magic \
55}
56
57set python.versions {27 34 35}
58
59foreach v ${python.versions} {
60    set python.version         ${v}
61    set python.branch          [string range ${python.version} 0 end-1].[string index ${python.version} end]
62    set python.bin             ${prefix}/bin/python${python.branch}
63    set python.prefix          ${frameworks_dir}/Python.framework/Versions/${python.branch}
64
65    subport py${python.version}-${name} {
66        categories              security python
67        description             ${name} bindings for python ${python.branch}
68        long_description        Malware identification and classification tool. \
69                                    This subport provides bindings for python ${python.branch}
70
71        worksrcdir              ${github.project}-${version}/yara-python
72
73        depends_lib-append      port:${name} \
74                                port:python${python.version}
75
76        use_configure           no
77
78        build.cmd               ${python.bin} setup.py --no-user-cfg
79        build.target            build
80
81        destroot.cmd            ${python.bin} setup.py --no-user-cfg
82        destroot.destdir        --prefix=${python.prefix} --root=${destroot}
83
84        test.run                yes
85        test.cmd                ${python.bin} tests.py
86        test.env                PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
87        test.target
88
89        livecheck.type          none
90    }
91}
Note: See TracBrowser for help on using the repository browser.