# -*- 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.18.4 v
revision            0
name                vips
categories          graphics
license             LGPL-2.1+
description         VIPS is an image processing library.
long_description    {*}${description}. It is good \
                    for large images and color.
maintainers         {gmail.com:jcupitt @jcupitt} openmaintainer
homepage            https://libvips.github.io/libvips
distname            ${name}-${version}
github.tarball_from releases

use_xz              yes

checksums           rmd160  c087eaa5123c7a557cb3d121df5e629122679a80 \
                    sha256  2677bad6c422617fd1172d359c16af34e736965d042c214203a87187d26ff037 \
                    size    25424116

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

depends_lib         port:cfitsio \
                    port:expat \
                    port:fftw-3 \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:hdf5 \
                    port:ImageMagick \
                    port:lcms2 \
                    port:libarchive \
                    port:libexif \
                    port:libgsf \
                    path:include/turbojpeg.h:libjpeg-turbo \
                    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/pango.pc:pango \
                    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
    }
}
