# -*- 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
# $Id$

PortSystem          1.0
PortGroup           gobject_introspection 1.0

name                libsoup
version             2.50.0
set branch          [join [lrange [split ${version} .] 0 1] .]
categories          gnome net
platforms           darwin
license             LGPL-2+
maintainers         devans openmaintainer
description         Soup is an HTTP library implementation in C.

long_description    Soup provides a queued asynchronous callback-based \
                    mechanism for sending and servicing SOAP requests \
                    and a WSDL (Web Service Definition Language) for C \
                    compilers which generates client stubs and server \
                    skeletons for easily calling and implementing SOAP \
                    methods.

homepage            https://wiki.gnome.org/Projects/libsoup
master_sites        gnome:sources/${name}/${branch}/
use_xz              yes

checksums           rmd160  96305642e92460269dac05772ea3a0e984e1de49 \
                    sha256  1e01365ac4af3817187ea847f9d3588c27eee01fc519a5a7cb212bb78b0f667b

depends_build       port:pkgconfig \
                    port:intltool \
                    port:gtk-doc \
                    port:autoconf \
                    port:automake \
                    port:libtool \
                    port:curl

depends_lib         port:libxml2 \
                    port:glib-networking

gobject_introspection yes

configure.args      --disable-more-warnings \
                    --disable-silent-rules \
                    --without-gnome

# reconfigure using upstream autogen.sh for intltool 0.51 compatibility

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

configure.cmd       ./autogen.sh

test.run            yes
test.target         check

variant gnome description {Enable GNOME support} {
    configure.args-delete   --without-gnome
}

default_variants    +gnome

livecheck.type      gnome