# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem          1.0
name                ent
version             20080128
categories          math security
maintainers         blb
description         Entropy calculator
long_description \
   ent applies various tests to sequences of bytes stored in files and \
   reports the results of those tests.  The program is useful for those \
   evaluating pseudorandom number generators for encryption and statistical \
   sampling applications, compression algorithms, and other applications \
   where the information density of a file is of interest.

platforms           darwin

homepage            http://www.fourmilab.ch/random/
master_sites        ${homepage}
distname            random
dist_subdir         ${name}/${version}
use_zip             yes
worksrcdir          ent

checksums           md5     8104a83af1ea5b280da96c92da18eae4 \
                    sha1    0f2f12dc67d1f02f77776709cf5fc5eee1d1b2e2 \
                    rmd160  b21b8401fdbd2aac189fe4a442a1164b172407f8

pre-extract {
   extract.post_args   "-d ${worksrcpath}"
}

post-extract {
   reinplace "s|^CFLAGS = |CFLAGS = -O3 |" ${worksrcpath}/Makefile
}

use_configure       no

build.target        ent

destroot {
   xinstall -m 755 -d ${destroot}${prefix}/bin \
      ${destroot}${prefix}/share/doc/${name}
   xinstall -m 755 -W ${worksrcpath} ent ${destroot}${prefix}/bin
   xinstall -m 644 -W ${worksrcpath} ent.html entitle.gif \
      ${destroot}${prefix}/share/doc/${name}
}

universal_variant   no

livecheck.type      none

