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

name                xmlrpc-c
version             1.60.05
revision            1
categories          devel www
# tools/turbocharger is Apache-1
license             BSD MIT Apache-1
maintainers         nomaintainer

description         Lightweight RPC library based on XML and HTTP

long_description    XML-RPC is a quick-and-easy way to make procedure calls \
                    over the Internet. It converts the procedure call into \
                    XML document, sends it to a remote server using HTTP, and \
                    gets back the response as XML. \
                    This library provides a modular implementation of XML-RPC \
                    for C and C++.

homepage            http://xmlrpc-c.sourceforge.net/
master_sites        sourceforge:project/xmlrpc-c/Xmlrpc-c%20Super%20Stable/${version}

checksums           md5 643abc5b51929400bbb0ceb4c34f2dc4 \
                    sha1 983e28950cbe08f4a845ec68a88f12f6aa558944 \
                    rmd160 dc548f62605a9262b47df8b4dd600f631f770004 \
                    sha256 67d860062459ea2784c07b4d7913319d9539fa729f534378e8e41c8918f2adf6

extract.suffix      .tgz

depends_build       path:bin/pkg-config:pkgconfig

depends_lib         path:lib/libssl.dylib:openssl \
                    port:curl

patchfiles          bind.patch \
                    strcasecmp.patch

platform darwin {
    patchfiles-append   _XOPEN_SOURCE.patch \
                        finite.patch
}

configure.args-append --disable-libwww-client --without-libwww-ssl

variant libxml2 description {Use libxml2 instead of built-in expat} {
    depends_lib-append      port:libxml2
    configure.args-append   --enable-libxml2-backend
}

default_variants +libxml2

variant libwww description {Build libwww client transport} {
    depends_lib-append      port:libwww
    configure.args-delete   --disable-libwww-client --without-libwww-ssl
}

test.run            yes
test.target         check

livecheck.type      sourceforge
livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
