# $Id: Portfile,v 1.4 2005/10/19 08:10:12 blb Exp $

PortSystem			1.0
name				ent
version				19981020
revision			2
categories			math security
maintainers			blb@opendarwin.org
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
use_zip				yes
worksrcdir			ent

checksums			md5 ccaa3fffd4d84d46e9b712d0c88f008c

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

patchfiles			patch-Makefile patch-randtest.c

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}
}

variant darwin {
	build.args-append	CFLAGS="-O3 -DHAVE_LOG2"
}

