# -*- 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           github 1.0
PortGroup           makefile 1.0

github.setup        zpaq zpaq 7.15
revision            1
checksums           rmd160  a8686308a5ffb9f4168f8afa6562b4c7b703b2c9 \
                    sha256  64280d86cd38ad5ebc1c6415b17eb09ee292078d772176b90e16287687191efe \
                    size    140057

categories          archivers
maintainers         {ryandesign @ryandesign} openmaintainer
license             public-domain

description         journaling archiver optimized for incremental backup

long_description    ${name} is a journaling archiver optimized for \
                    user-level incremental backup of directory trees \
                    in Windows and *nix. It supports AES-256 \
                    encryption, 5 multi-threaded compression levels, \
                    and content-aware file fragment level \
                    deduplication. For backups it adds only files \
                    whose date has changed, and keeps both old and new \
                    versions. You can roll back the archive date to \
                    restore from old versions of the archive. The \
                    default compression level is faster than zip \
                    usually with better compression. zpaq uses a \
                    self-describing compressed format to allow for \
                    future improvements without breaking compatibility \
                    with older versions of the program.

homepage            http://mattmahoney.net/dc/zpaq.html
github.tarball_from archive

patchfiles          nojit.patch

makefile.override-append \
                    CXXFLAGS PREFIX

if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} ne ""} {
    configure.ldflags-append -stdlib=${configure.cxx_stdlib}
}

test.run            yes
test.target         check

post-destroot {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} \
        COPYING \
        readme.txt \
        ${destroot}${docdir}
}

platform darwin {
    configure.cppflags-append -DBSD
}
