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

name                girara
version             0.4.5
revision            0
homepage            https://pwmt.org/projects/girara/
master_sites        ${homepage}/download/
use_xz              yes
checksums           rmd160  666dee0e1011ca8ae819435a53dc33d81fcbdcf4 \
                    sha256  6b7f7993f82796854d5036572b879ffaaf7e0b619d12abdb318ce14757bdda91 \
                    size    60204

categories          devel gnome
maintainers         nomaintainer
license             zlib

description         Cross-platform widget toolkit based on GTK+

long_description \
    girara is a library that implements a user interface that focuses on    \
    simplicity and minimalism. Currently based on GTK+, a cross-platform    \
    widget toolkit, it proves an interface that focueses on three main com- \
    ponents: A so-called view widget that represents the actual application \
    (e.g. a website (browser), an image (image viewer) or the document      \
    (document viewer)), an input bar that is used to execute commands of    \
    the application and the status bar which provides the user with current \
    information.

depends_build-append \
                    port:gettext \
                    path:bin/pkg-config:pkgconfig

depends_lib         port:gettext-runtime \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:json-glib

compiler.c_standard 2017

configure.args-append \
                    -Ddocs=disabled

platform darwin     {
# Before 10.7 there's no getline() in stdio.h
# http://stackoverflow.com/a/1117158/205907
    if {${os.major} < 11} {
# Using CVS project implementation
# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getline.c?txt
# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getline.h?txt
# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getdelim.c?txt
# http://www.opensource.apple.com/source/cvs/cvs-47/cvs/lib/getdelim.h?txt
        patchfiles-append   patch-getline.diff
    }
}

livecheck.type      regex
livecheck.url       ${homepage}/download/
livecheck.regex     ${name}-(\\d\.\\d\.\\d)${extract.suffix}
