# -*- 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        openslide openslide 3.4.1 v
categories          graphics
platforms           darwin
license             LGPL-2.1
maintainers         {bgilbert @bgilbert}

description         A C library for reading virtual slides.

long_description    OpenSlide is a C library that provides a simple \
                    interface for reading whole-slide images, also known as \
                    virtual slides, which are high-resolution images used in \
                    digital pathology.  These images can occupy tens of \
                    gigabytes when uncompressed, and so cannot be easily \
                    read using standard tools or libraries, which are \
                    designed for images that can be comfortably uncompressed \
                    into RAM.  Whole-slide images are typically \
                    multi-resolution\; OpenSlide allows reading a small \
                    amount of image data at the resolution closest to a \
                    desired zoom level.  OpenSlide can read slides in the \
                    Aperio (.svs or .tif), \
                    Hamamatsu (.ndpi, .vms, or .vmu), \
                    Leica (.scn), \
                    MIRAX (.mrxs), \
                    Philips (.tiff), \
                    Sakura (.svslide), \
                    Trestle (.tif), \
                    Ventana (.bif or .tif), \
                    and generic tiled TIFF (.tif) formats.

homepage            http://openslide.org/
github.tarball_from releases
use_xz              yes

checksums           rmd160  e85c6b826f221bf9d9ddd172c8428a19eedfbcd9 \
                    sha256  9938034dba7f48fadc90a2cdf8cfe94c5613b04098d1348a5ff19da95b990564

depends_build       port:pkgconfig

depends_lib         port:libpng \
                    port:jpeg \
                    port:tiff \
                    port:openjpeg \
                    port:gdk-pixbuf2 \
                    port:libxml2 \
                    port:sqlite3 \
                    port:zlib \
                    path:lib/pkgconfig/cairo.pc:cairo \
                    path:lib/pkgconfig/glib-2.0.pc:glib2

configure.args      --disable-silent-rules

post-destroot {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        CHANGELOG.txt \
        CONTRIBUTING.txt \
        LICENSE.txt \
        README.txt \
        lgpl-2.1.txt \
        ${destroot}${docdir}
}