# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0

name            libgtkhtml3
set my_name     gtkhtml
version         3.32.2
revision        7
checksums       rmd160  b71afbd07c658c2ec6ac285cc428ac1943d39e46 \
                sha256  8746053cf709e1de37c7ac775ab1364ddda4b75167660ed7f98a237b3797e39f \
                size    1217025

set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers     nomaintainer
categories      gnome
license         LGPL

description     GTK HTML rendering engine.

long_description \
    GtkHTML is a lightweight HTML rendering/printing/editing \
    engine. It was originally based on KHTMLW, part of the \
    KDE project, but is now being developed independently.

homepage        https://wiki.gnome.org/RoadMap/GtkHtml
master_sites    gnome:sources/${my_name}/${branch}/
distname        ${my_name}-${version}
use_bzip2       yes

depends_build   port:pkgconfig \
                port:intltool \
                port:gnome-common \
                port:autoconf \
                port:automake \
                port:libtool

depends_lib     port:libsoup-2.4 \
                port:enchant \
                port:iso-codes \
                path:lib/pkgconfig/gtk+-2.0.pc:gtk2 \
                port:gconf \
                port:orbit2 \
                port:gnuregex

patchfiles      patch-configure.ac.diff \
                patch-components-editor-Makefile.am.diff \
                patch-gtkhtml-editor.xml.diff

# reconfigure using upstream autogen.sh for intltool 0.51 compatibility

post-patch {
    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
}

configure.cmd   ./autogen.sh

configure.args  --enable-deprecated-warning-flags=no \
                --disable-silent-rules

test.run        yes
test.dir        $worksrcpath/gtkhtml
test.target     test-verbose

variant glade description {Build glade widget catalog} {
    depends_lib-append port:glade3
    configure.args-append --with-glade-catalog
}

livecheck.type  gnome
livecheck.name  ${my_name}
livecheck.regex {LATEST-IS-(3\.\d*[02468](?:\.\d+)*)}
