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

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

checksums           rmd160  5b5a836c1b51fac18ca36aa36d9ed4b37e551044 \
                    sha256  c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072 \
                    size    600622

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

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

test.run            yes
test.target         check

platform darwin 8 {
    # the i386 asm bits do work on Tiger
    # other i386 systems not tested at present
    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+)*)"