# -*- 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                    gzip
version                 1.15

categories              archivers
license                 GPL-3+
platforms               darwin freebsd
homepage                https://www.gzip.org
maintainers             {sethm.id.au:dev @McDaMastR} \
                        openmaintainer

description             GNU replacement utility for Unix compress
long_description        gzip (GNU zip) is a compression utility designed to be \
                        a replacement for compress.  Its main advantages over \
                        compress are much better compression and freedom from \
                        patented algorithms.

installs_libs           no
conflicts               ncompress

master_sites            gnu

checksums               rmd160  0767b07c00ee462cecdadd6db89fde1c36116efe \
                        sha256  545886cf57fa88a65e967fbf705903d7fcb2567c82c7342493e82e8d7b1a210b \
                        size    1211921

configure.args-append   --disable-silent-rules \
                        DEFS=NO_ASM

# Bypass year 2038 awareness code that causes the universal variant to fail.
# https://trac.macports.org/ticket/55643
configure.args-append   --disable-year2038

# <https://trac.macports.org/wiki/WimplicitFunctionDeclaration>
configure.checks.implicit_function_declaration.whitelist-append \
                        alignof \
                        strchr

test.run                yes
test.target             check

post-destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}

    xinstall -d ${destdocdir}
    xinstall -W ${worksrcpath} -m 644 \
        AUTHORS \
        COPYING \
        ChangeLog \
        NEWS \
        README \
        THANKS \
        TODO \
        ${destdocdir}
}
