1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils multilib
8 # Maintainer notes: Take a look at http://xmlrpc-c.sourceforge.net/release.html
9 # We use "advanced" branch, so for the current release revision take look here:
10 # http://xmlrpc-c.svn.sourceforge.net/viewvc/xmlrpc-c/advanced/version.mk?view=log
11 # e.g. for 1.27.05 corresponds following revision 2182 and thus following URL:
12 # http://xmlrpc-c.svn.sourceforge.net/viewvc/xmlrpc-c/advanced.tar.gz?view=tar&pathrev=2182
13 # Note: autogenerated tarball checksum changes every download, thus download it
14 # manually and distribute on mirrors.
15 # It's possible to build net-libs/libwww without ssl support, but taking into
16 # account that libwww is not really well maintained and upstream is dead we
17 # better use it only in case ssl is required.
19 DESCRIPTION="A lightweigt RPC library based on XML and HTTP"
20 HOMEPAGE="http://xmlrpc-c.sourceforge.net/"
21 SRC_URI="https://dev.gentoo.org/~maksbotan/${P}.tar.gz"
25 KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
26 IUSE="abyss +cgi +curl +cxx +libxml2 static-libs threads test tools"
27 RESTRICT="!test? ( test )"
29 REQUIRED_USE="test? ( static-libs abyss curl cxx ) tools? ( curl )"
34 curl? ( net-misc/curl )
35 libxml2? ( dev-libs/libxml2 )"
39 S="${WORKDIR}/advanced"
42 use curl || ewarn "Curl support disabled: No client library will be built"
46 #Bug 214137: We need to filter this.
53 epatch "${FILESDIR}"/${PN}-1.32.05-Wimplicit.patch
55 -e "/CFLAGS_COMMON/s|-g -O3$||" \
56 -e "/CXXFLAGS_COMMON/s|-g$||" \
57 "${S}"/common.mk || die
59 export LADD=${LDFLAGS} # Respect the user's LDFLAGS.
61 use static-libs || { sed \
62 -e '/\(^TARGET_STATIC_LIBRARIES =\)/{s:\(^TARGET_STATIC_LIBRARIES =\).*:\1:;P;N;d;}' \
63 -i common.mk || die; }
67 #Disable libwww support due GBZ #409549 and #320253
69 econf --disable-wininet-client \
70 $(use_enable libxml2 libxml2-backend) \
71 --disable-libwww-client \
72 --without-libwww-ssl \
73 $(use_enable threads abyss-threads) \
74 $(use_enable cgi cgi-server) \
75 $(use_enable abyss abyss-server) \
76 $(use_enable cxx cplusplus) \
77 $(use_enable curl curl-client)
82 use tools && emake -rC "${S}"/tools
87 use tools && emake DESTDIR="${D}" -rC "${S}"/tools install
91 unset LDFLAGS LADD SRCDIR
93 einfo "Building general tests"
94 make || die "Make of general tests failed"
95 einfo "Running general tests"
96 ./test || die "General tests failed"
98 einfo "Running C++ tests"
99 ./test || die "C++ tests failed"