# -*- 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                libbonoboui
version             2.24.5
revision            11
set branch          [join [lrange [split ${version} .] 0 1] .]
maintainers         nomaintainer
categories          gnome
# libs are LGPL, binaries and examples are GPL
license             {LGPL GPL-2+}

description         GUI frontend to the libbonobo component of GNOME 2

long_description    Bonobo is a set of language and system independant CORBA \
                    interfaces for creating reusable components and creating compound \
                    documents. libbonoboui includes a Gtk+ based implementation of the \
                    Bonobo interfaces, enabling developers to create reusable \
                    components and applications that can be used to form more complex \
                    documents.

homepage            https://www.gnome.org/
master_sites        gnome:sources/${name}/${branch}/
use_bzip2           yes

checksums           rmd160  0ebf5618e1564317561b098d6774f0c75ea082f0 \
                    sha256  fab5f2ac6c842d949861c07cb520afe5bee3dce55805151ce9cd01be0ec46fcd \
                    size    976250

depends_build       path:libexec/coreutils/libstdbuf.so:coreutils \
                    port:intltool \
                    port:gnome-common \
                    port:gtk-doc \
                    port:autoconf \
                    port:automake \
                    port:libtool \
                    path:bin/pkg-config:pkgconfig

depends_lib         port:desktop-file-utils \
                    port:gconf \
                    port:libbonobo \
                    port:libffi \
                    port:libgnome \
                    port:libgnomecanvas \
                    path:lib/pkgconfig/pango.pc:pango

# see #48986
depends_lib-append path:lib/pkgconfig/gtk+-2.0.pc:gtk2
require_active_variants gtk2 x11

patchfiles          Makefile.am.patch

# 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      --without-x

configure.cflags-append \
                    -Wno-format-nonliteral

variant x11 {
    configure.args-append   --x-includes=${prefix}/include \
                            --x-libraries=${prefix}/lib
    configure.args-replace  --without-x --with-x
}

default_variants    +x11

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

livecheck.type      gnome
