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

github.setup        google guetzli 1.0.1 v
checksums           rmd160  4a427f59e47dfea2cb9d278fcd9ede76b42368a7 \
                    sha256  6bcf54cdcccef1a32be553def5fe59cce2b06a21341dea29506130f7de2c552c

description         JPEG encoder that aims for excellent compression density at high visual quality
long_description    Guetzli is a ${description}.  Guetzli-generated images are typically \
                    20-30% smaller than images of equivalent quality generated by libjpeg. \
                    Guetzli generates only sequential (nonprogressive) JPEGs due to faster \
                    decompression speeds they offer.

categories          graphics
platforms           darwin
#supported_archs     x86_64 ??
license             Apache-2
maintainers         {ctreleaven @ctreleaven} openmaintainer

depends_build       port:pkgconfig

depends_lib         port:libpng

compiler.cxx_standard 2011

use_configure       no

build.env-append    verbose=yes \
                    CXX=${configure.cxx}

destroot {
    xinstall -m 755 ${worksrcpath}/bin/Release/${name} \
        ${destroot}${prefix}/bin/
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        CONTRIBUTING.md \
        LICENSE \
        README.md \
        ${destroot}${docdir}
}