# -*- 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
PortGroup               active_variants 1.1

name                    gtkextra3
set sf_name             gtkextra
version                 3.1.5
revision                0

categories              x11 devel
license                 LGPL
maintainers             nomaintainer
description             Extra GTK+2 Widgets
long_description        GtkExtra is a useful set of widgets for creating \
                        GUIs for the Xwindows system using GTK+2. You can \
                        use it complementary to GTK+ and it is written \
                        in C. It is also Free Software and released under \
                        the LGPL license.
homepage                https://gtkextra.sourceforge.net

set branch              [join [lrange [split ${version} .] 0 1] .]
master_sites            sourceforge:project/${sf_name}/${branch}
distname                ${sf_name}-${version}

checksums               rmd160  5c5a5503752f8ab80286a240e22a5f5b14e39854 \
                        sha256  967115bddfa48878f43baf0b90cefcd46d6bc5b25b5f8069730e1ffe3873d52d \
                        size    1488404

depends_build-append \
                        port:pkgconfig

depends_lib-append \
                        path:lib/pkgconfig/cairo.pc:cairo \
                        path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
                        path:lib/pkgconfig/gtk+-2.0.pc:gtk2 \
                        path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
                        path:lib/pkgconfig/pango.pc:pango

pre-fetch {
    if {![variant_isset quartz] && ![variant_isset x11]} {
        error "Either +x11 or +quartz is required"
    }
}

configure.args-append \
                        --disable-tests

if {![variant_isset quartz]} {
    default_variants +x11
}

variant quartz conflicts x11 {
    require_active_variants path:lib/pkgconfig/cairo.pc:cairo quartz
    require_active_variants path:lib/pkgconfig/pango.pc:pango quartz
    require_active_variants path:lib/pkgconfig/gtk+-2.0.pc:gtk2 quartz
}


variant x11 conflicts quartz {
    require_active_variants path:lib/pkgconfig/cairo.pc:cairo x11
    require_active_variants path:lib/pkgconfig/pango.pc:pango x11
    require_active_variants path:lib/pkgconfig/gtk+-2.0.pc:gtk2 x11
}

livecheck.type          regex
livecheck.url           http://sourceforge.net/api/file/index/project-name/${sf_name}/rss
livecheck.regex         /${sf_name}/files/${branch}/${sf_name}-(3\\.\[0-9.\]+\[0-9\])\\.tar\\.?\[a-zA-Z\]*/
