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

github.setup        JuliaStrings utf8proc 2.11.3 v
github.tarball_from archive
revision            0
name                libutf8proc
categories          textproc
license             MIT
maintainers         {judaew @judaew} openmaintainer
description         library for processing UTF-8 encoded Unicode strings
long_description    {*}${description}

homepage            https://julialang.org/utf8proc/

checksums           rmd160  b56d484287727c8d01147b641a019558273e5206 \
                    sha256  abfed50b6d4da51345713661370290f4f4747263ee73dc90356299dfc7990c78 \
                    size    202535

post-patch {
    reinplace {s/WCFLAGS = -Wsign-conversion/WCFLAGS =/} ${worksrcpath}/Makefile
}

makefile.prefix_name \
                    prefix

makefile.override-append \
                    PREFIX

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

depends_test        bin:curl:curl
test.run            yes
test.target         check
