# -*- 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           openssl 1.0
PortGroup           perl5 1.0
PortGroup           yelp 1.0

name                xchat-gnome
version             0.26.1
revision            15
set branch          [join [lrange [split ${version} .] 0 1] .]
description         xchat-gnome is a frontend to X-Chat.
long_description    xchat-gnome is a frontend to the popular X-Chat IRC client which is \
                    designed with the user interface foremost in mind.
maintainers         nomaintainer
categories          gnome irc
license             {GPL-2+ OpenSSLException}

homepage            https://wiki.gnome.org/Attic/Xchat-Gnome
master_sites        gnome:sources/${name}/${branch}/

checksums           rmd160  ff2228aa5258a2c5a3bd7c391e83a15b2f030aff \
                    sha256  6234f14ddc7323faaa4f10f890786a0f69da00774855412a4382b11a6158cf4b \
                    size    1938676

use_bzip2           yes

perl5.branches      5.34

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

depends_lib         port:libgnomeui \
                    port:libglade2 \
                    port:gconf \
                    port:libsexy \
                    port:libcanberra \
                    port:python27 \
                    port:perl${perl5.major} \
                    port:desktop-file-utils \
                    port:rarian

openssl.branch      1.0
openssl.configure   build_flags

patchfiles          patch-configure.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.pkg_config_path \
                    [openssl::pkgconfig_dir]

configure.python    ${prefix}/bin/python2.7
configure.perl      ${perl5.bin}

configure.args      --disable-mmx \
                    --disable-notification \
                    --enable-compile-warnings=minimum \
                    --disable-scrollkeeper \
                    --disable-schemas-install \
                    --disable-tcl

post-activate    {
    system "${prefix}/bin/scrollkeeper-update"
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "${prefix}/bin/gtk-update-icon-cache-2.0 -f -t ${prefix}/share/icons/hicolor"
    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type      gnome
