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

github.setup        sammycage plutovg 1.3.3 v
github.tarball_from archive
revision            0

categories          graphics
license             MIT FreeType
maintainers         {@herbygillot gmail.com:herby.gillot} openmaintainer

description         Small 2D vector graphics library in C
long_description    PlutoVG is a small 2D vector graphics library supporting \
                    paths, fills, strokes, gradients, images and text rendering.

checksums           rmd160  16d4a89fd02a7c3bb492a37439ff80b7ecdbf616 \
                    sha256  2b0d17a6e016f47b86f9c00e2cb82600041b1ea1f7d2a00c2d46ae542cbfed3c \
                    size    237227

compiler.c_standard 2011

# stb is header-only and compiled into the library.
depends_build-append port:stb

# The adapted FreeType rasterizer/stroker uses private PVG_FT interfaces and
# cannot be replaced with libfreetype without changes to the rendering backend.
patchfiles          patch-use-system-stb.diff
patch.pre_args      -p1

configure.args-append \
                    -DBUILD_SHARED_LIBS=ON \
                    -DPLUTOVG_BUILD_EXAMPLES=OFF \
                    -DSTB_INCLUDE_DIR=${prefix}/include/stb

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${docdir}
}
