# -*- 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           gobject_introspection 1.0
PortGroup           meson 1.0

github.setup        libvips libvips 8.16.0 v
revision            0
name                vips
distname            vips-${version}
description         VIPS is an image processing library.
long_description    VIPS is an image processing library. It is good for \
                    large images and for colour.
maintainers         {gmail.com:jcupitt @jcupitt} openmaintainer
categories          graphics
license             LGPL-2.1+
homepage            https://libvips.github.io/libvips/
github.tarball_from releases

use_xz              yes

checksums           rmd160  42ea6698ee767b2fd8b6e09d2424639bd4b3383f \
                    sha256  6eca46c6ba5fac86224fd69007741012b0ea1f9aa1fcb9256b0cbc2faf768563 \
                    size    29542092

depends_build       path:bin/doxygen:doxygen \
                    port:gtk-doc \
                    path:bin/pkg-config:pkgconfig

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/pango.pc:pango \
                    port:cfitsio \
                    port:expat \
                    port:fftw-3 \
                    port:hdf5 \
                    port:ImageMagick \
                    path:include/turbojpeg.h:libjpeg-turbo \
                    port:lcms2 \
                    port:libarchive \
                    port:libexif \
                    port:libgsf \
                    port:libjxl \
                    port:libpng \
                    path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
                    port:libtool \
                    port:matio \
                    port:nifticlib \
                    port:openexr \
                    port:openslide \
                    port:orc \
                    path:lib/pkgconfig/poppler.pc:poppler \
                    port:tiff \
                    port:webp \
                    port:zlib

# meson.build: ERROR: C++ Compiler does not support -std=c++11
compiler.cxx_standard   2011

configure.post_args-append \
                   -Dintrospection=enabled

if {${os.platform} eq "darwin" && ${os.major} > 22} {
    if {[string match *clang* ${configure.compiler}]} {
        configure.cflags-append \
                    -Wno-error=incompatible-function-pointer-types
    }
}
