# -*- 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

PortSystem          1.0
PortGroup           github 1.0

github.setup        aircrack-ng aircrack-ng 1.2-rc5
categories          security
license             GPL-2+ BSD OpenSSL
platforms           darwin
maintainers         {ryandesign @ryandesign} openmaintainer

# https://github.com/aircrack-ng/aircrack-ng/issues/1850
supported_archs     x86_64

description         Aircrack-ng is the next generation of aircrack with lots of new features

long_description    aircrack is an 802.11 WEP and WPA-PSK keys cracking \
                    program that can recover keys once enough data packets \
                    have been captured. It implements the standard FMS \
                    attack along with some optimizations like KoreK attacks, \
                    thus making the attack much faster compared to other WEP \
                    cracking tools. In fact, aircrack is a set of tools for \
                    auditing wireless networks.

homepage            http://aircrack-ng.org/
master_sites        http://download.aircrack-ng.org/

checksums           rmd160  ab4967ba39ae6f632ed3763f38937e5abfcd0e57 \
                    sha256  fe7fb1b045da8a14075766c68f4481fe1168f26f66d281e114965cf6b360574b \
                    size    4222286

depends_build       port:autoconf \
                    port:automake \
                    port:gmake \
                    port:libtool \
                    port:pkgconfig \
                    port:python36

depends_lib         port:libpcap \
                    path:lib/libssl.dylib:openssl \
                    port:pcre \
                    port:sqlite3

patchfiles-append   aircrack_ng_pcap.m4.patch
patchfiles-append   aircrack_ng_mac.m4.patch

# No configure script in tarball.
configure.cmd       ./autogen.sh

configure.args      --disable-silent-rules \
                    --with-libpcap-include=${prefix}/include \
                    --with-libpcap-lib=${prefix}/lib \
                    --with-openssl=${prefix} \
                    --with-sqlite3=${prefix} \
                    --without-duma \
                    --without-experimental \
                    --without-ext-scripts \
                    --without-gcrypt \
                    --without-xcode
configure.python    ${prefix}/bin/python3.6
configure.env       PYTHON_CONFIG=${configure.python}-config

build.cmd           ${prefix}/bin/gmake

test.run            yes
test.target         check