PortSystem 1.0

name             libnids
version          1.24
revision            1
checksums           rmd160  66a1a332a70b316fd83905887dc731b5bf28d715 \
                    sha256  314b4793e0902fbf1fdb7fb659af37a3c1306ed1aad5d1c84de6c931b351d359 \
                    size    151021

categories       net
license          GPL-2
maintainers      nomaintainer
description      E-component of Network Intrusion Detection System
long_description \
	Libnids is an implementation of an E-component of Network \
	Intrusion Detection System. It emulates the IP stack of \
	Linux 2.0.x. Libnids offers IP defragmentation, TCP stream \
	assembly and TCP port scan detection.
homepage         http://libnids.sourceforge.net/
platforms        darwin

master_sites     sourceforge:project/${name}/${name}/${version}

depends_lib      port:libnet port:libpcap

post-extract {
    # Copy "owner" permission to "group" and "others" but removing write.
    fs-traverse item ${worksrcpath} {
        set p [file attributes ${item} -permissions]
        set x [expr {${p} >> 6 & 5}]
        file attributes ${item} -permissions [format {0%o} [expr {${x} | (${x} << 3) | ${p}}]]
    }
}

patchfiles          implicit.patch \
                    inline.patch \
                    LDFLAGS.patch

platform darwin {
    patchfiles-append \
                    dylib.patch
}

configure.args      --disable-libglib \
                    --enable-shared \
                    --mandir=${prefix}/share/man

destroot.destdir install_prefix=${destroot}
