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

name                lzip
epoch               20091025
version             1.21
categories          archivers
license             GPL-2+
platforms           darwin
maintainers         nomaintainer
description         Compression program based on LZMA similar to gzip or bzip2
long_description    Lzip is a lossless data compressor based on the LZMA    \
                    algorithm, with very safe integrity checking and a      \
                    user interface similar to the one of gzip or bzip2.     \
                    Lzip decompresses almost as fast as gzip and compresses \
                    better than bzip2, which makes it well suited for       \
                    software distribution and data archiving.
homepage            https://www.nongnu.org/lzip/lzip.html
master_sites        https://download.savannah.gnu.org/releases/lzip/

checksums           rmd160  5e37348c9061d14f7776b99ac816ad730c9fade4 \
                    sha256  e48b5039d3164d670791f9c5dbaa832bf2df080cb1fbb4f33aa7b3300b670d8b \
                    size    105558

variant universal {}

# respect default optimization
configure.cflags-replace -Os -O2

configure.args      CXX="${configure.cxx}" \
                    CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
                    CPPFLAGS="${configure.cppflags}" \
                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    file mkdir ${docdir}
    xinstall -m 644 -v -W ${worksrcpath} \
      AUTHORS ChangeLog COPYING NEWS ${docdir}
}

livecheck.type      regex
livecheck.url       ${master_sites}/?C=M&O=D
livecheck.regex     ${name}-(\[-0-9.\]+)\\.tar\\.gz