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

PortSystem          1.0

name                xmlrpc-c
version             1.16.42
revision            1
categories          devel www
# tools/turbocharger is Apache-1
license             BSD MIT Apache-1
platforms           darwin
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           sha1    7a71fabc652c2848a7226605432a2e420a02dff0 \
                    rmd160  945fb092152a8ff139407ce1e80da9803b5afdce \
                    sha256  6eaf6d4ceba41ad6b47d7e4321afab8fbb18998d9d16655b73242496f759b59b

extract.suffix      .tgz

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

variant universal {}

configure.cc-append [get_canonical_archflags cc]
configure.cxx-append [get_canonical_archflags cxx]
configure.env-append CPP=${configure.cpp}

platform darwin {
    patchfiles-append config.mk.in.diff configure.diff
}

post-patch {
    reinplace "s:#include <curl/types.h>::" \
        ${worksrcpath}/lib/curl_transport/curlmulti.c \
        ${worksrcpath}/lib/curl_transport/curltransaction.c \
        ${worksrcpath}/lib/curl_transport/xmlrpc_curl_transport.c
}

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