# -*- 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       muniversal 1.0
PortGroup       clang_dependency 1.0

name		    lzo2
set my_name     lzo
version		    2.10
categories	    archivers
license		    GPL-2+
platforms	    darwin
maintainers	    nomaintainer
description	    Real-time data compression library

long_description \
	LZO is a portable lossless data compression library written in ANSI C. \
	It offers pretty fast compression and very fast decompression. \
	Decompression requires no memory. \
	In addition there are slower compression levels achieving a quite \
	competitive compression ratio while still decompressing at \
	this very high speed. \
	LZO is distributed under the GNU General Public License.

homepage		http://www.oberhumer.com/opensource/lzo/
master_sites    ${homepage}download/ \
                sourceforge:macports
distname        ${my_name}-${version}

checksums           rmd160  5b5a836c1b51fac18ca36aa36d9ed4b37e551044 \
                    sha256  c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072

set docdir ${prefix}/share/doc/${name}

configure.args	--enable-shared --enable-static --disable-asm \
				--docdir=${docdir}

test.run		yes
test.target		check

platform darwin 8 {
	# supposedly, the asm bits work on tiger
	configure.args-delete --disable-asm
}

post-destroot {
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} BUGS ChangeLog README doc/LZOTEST.TXT \
        ${destroot}${docdir}
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex "Version (\\d+(?:\\.\\d+)*)"

