# -*- 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                lzlib
version             1.14
revision            0

homepage            https://www.nongnu.org/lzip/lzlib.html

categories          archivers devel
installs_libs       yes
license             BSD
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

description         \
    Lzlib is a data compression library providing in-memory LZMA compression \
    and decompression functions

long_description        \
    {*}${description}, including integrity checking of the decompressed data. \
    The compressed data format used by the library is the lzip format. Lzlib \
    is written in C. The lzip file format is designed for data sharing and \
    long-term archiving, taking into account both data integrity and decoder \
    availability\: The lzip format provides very safe integrity checking and \
    some data recovery means. The program lziprecover can repair bit flip \
    errors \(one of the most common forms of data corruption\) in lzip files, \
    and provides data recovery capabilities, including error-checked merging \
    of damaged copies of a file. The lzip format is as simple as possible \
    \(but not simpler\). The lzip manual provides the source code of a simple \
    decompressor along with a detailed explanation of how it works, so that \
    with the only help of the lzip manual it would be possible for a digital \
    archaeologist to extract the data from a lzip file long after quantum \
    computers eventually render LZMA obsolete. Additionally the lzip \
    reference implementation is copylefted, which guarantees that it will \
    remain free forever.

checksums           rmd160  94dce9f39a7f77cdfd95951e2e5f6a8339b67ef1 \
                    sha256  e362ecccd82d4dd297df6a51b952c65d2172f9bf41a5c4590d3604d83aa519d3 \
                    size    96075

master_sites        nongnu:lzip/lzlib
use_lzip            yes

variant universal   {}

platform darwin {
    patchfiles-append patch-darwin-Makefile.in.diff
}

depends_build-append \
                    port:help2man

configure.args-append \
                    --enable-shared \
                    CC=${configure.cc} \
                    CFLAGS=\"${configure.cflags} [get_canonical_archflags cc]\" \
                    LDFLAGS=\"${configure.ldflags} [get_canonical_archflags cc]\"

build.target        all doc

destroot.target     install install-bin install-man

test.run            yes
test.target         check
