# -*- 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       conflicts_build 1.0
PortGroup       github 1.0

github.setup    gtk-gnutella gtk-gnutella 1.3.1 v
revision        1
epoch           1
categories      net p2p www
license         GPL-2+
maintainers     {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description     GTK-based Gnutella client
long_description \
                GTK-Gnutella is a Gnutella client that features search, \
                download, file sharing, bandwidth limiting, host caching \
                and some basic statistics.
homepage        https://gtk-gnutella.sourceforge.net

checksums       rmd160  1566ee4c153c1a0da9d28e137dbe32d54fa1632a \
                sha256  8dbf3a0483499c8db381d888169490ddf57b4c575bc0c3df7145b88a5a8f1607 \
                size    30400828
github.tarball_from archive

depends_lib-append \
                path:lib/pkgconfig/glib-2.0.pc:glib2 \
                path:lib/pkgconfig/gnutls.pc:gnutls \
                path:lib/pkgconfig/gtk+-2.0.pc:gtk2 \
                port:libiconv \
                port:libxml2 \
                port:pcre2 \
                port:zlib
depends_build-append \
                port:bison \
                path:bin/gawk:gawk \
                path:bin/pkg-config:pkgconfig

configure.cmd   ./build.sh

# Apparently scheduling may be off on some configurations.
use_parallel_build no

configure.args-append \
                --configure-only \
                --disable-dbus \
                --disable-nls \
                --mandir=${prefix}/share/man \
                --yacc=${prefix}/bin/bison

# If alternative libupnp is installed, linkage may fail with undefined symbols.
conflicts_build-append libupnp miniupnpc gupnp

destroot.destdir \
                INSTALL_PREFIX=${destroot}
