Use https by default
[gentoo.git] / dev-libs / xmlrpc-c / xmlrpc-c-1.32.05-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="4"
6
7 inherit eutils multilib
8
9 # Maintainer notes: Take a look at http://xmlrpc-c.sourceforge.net/release.html
10 # We use "advanced" branch, so for the current release revision take look here:
11 # http://xmlrpc-c.svn.sourceforge.net/viewvc/xmlrpc-c/advanced/version.mk?view=log
12 # e.g. for 1.27.05 corresponds following revision 2182 and thus following URL:
13 # http://xmlrpc-c.svn.sourceforge.net/viewvc/xmlrpc-c/advanced.tar.gz?view=tar&pathrev=2182
14 # Note: autogenerated tarball checksum changes every download, thus download it
15 # manually and distribute on mirrors.
16 # It's possible to build net-libs/libwww without ssl support, but taking into
17 # account that libwww is not really well maintained and upstream is dead we
18 # better use it only in case ssl is required.
19
20 DESCRIPTION="A lightweigt RPC library based on XML and HTTP"
21 HOMEPAGE="http://xmlrpc-c.sourceforge.net/"
22 SRC_URI="https://dev.gentoo.org/~maksbotan/${P}.tar.gz"
23
24 LICENSE="BSD"
25 SLOT="0"
26 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
27 IUSE="abyss +cgi +curl +cxx +libxml2 static-libs threads test tools"
28
29 REQUIRED_USE="test? ( static-libs abyss curl cxx ) tools? ( curl )"
30
31 DEPEND="
32         sys-libs/ncurses
33         sys-libs/readline
34         curl? ( net-misc/curl )
35         libxml2? ( dev-libs/libxml2 )"
36
37 RDEPEND="${DEPEND}"
38
39 S="${WORKDIR}/advanced"
40
41 pkg_setup() {
42         use curl || ewarn "Curl support disabled: No client library will be built"
43 }
44
45 #Bug 214137: We need to filter this.
46 unset SRCDIR
47
48 # Bug 255440
49 export LC_ALL=C
50 export LANG=C
51
52 src_prepare() {
53         epatch "${FILESDIR}"/${PN}-1.32.05-Wimplicit.patch
54         sed -i \
55                 -e "/CFLAGS_COMMON/s|-g -O3$||" \
56                 -e "/CXXFLAGS_COMMON/s|-g$||" \
57                 "${S}"/common.mk || die
58
59         export LADD=${LDFLAGS} # Respect the user's LDFLAGS.
60
61         use static-libs || { sed \
62                 -e '/\(^TARGET_STATIC_LIBRARIES =\)/{s:\(^TARGET_STATIC_LIBRARIES =\).*:\1:;P;N;d;}' \
63                         -i common.mk || die; }
64 }
65
66 src_configure() {
67         #Disable libwww support due GBZ #409549 and #320253
68
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)
78 }
79
80 src_compile() {
81         emake -r
82         use tools && emake -rC "${S}"/tools
83 }
84
85 src_install() {
86         default_src_install
87         use tools && emake DESTDIR="${D}" -rC "${S}"/tools install
88 }
89
90 src_test() {
91         unset LDFLAGS LADD SRCDIR
92         cd "${S}"/test/
93         einfo "Building general tests"
94         make || die "Make of general tests failed"
95         einfo "Running general tests"
96         ./test || die "General tests failed"
97         cd "${S}"/test/cpp/
98         einfo "Running C++ tests"
99         ./test || die "C++ tests failed"
100 }