dev-python/zipp: keyworded 0.5.2 for ppc, bug #690956
[gentoo.git] / net-libs / wvstreams / wvstreams-4.6.1-r3.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit autotools eutils flag-o-matic toolchain-funcs versionator
6
7 DESCRIPTION="A network programming library in C++"
8 HOMEPAGE="http://alumnit.ca/wiki/?WvStreams"
9 SRC_URI="https://wvstreams.googlecode.com/files/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="alpha amd64 hppa ppc sparc x86"
14 IUSE="pam doc +ssl +dbus debug boost"
15
16 #Tests fail if openssl is not compiled with -DPURIFY. Gentoo's isn't. FAIL!
17 RESTRICT="test"
18
19 #QA Fail: xplc is compiled as a part of wvstreams.
20 #It'll take a larger patching effort to get it extracted, since upstream integrated it
21 #more tightly this time. Probably for the better since upstream xplc seems dead.
22
23 RDEPEND="sys-libs/readline:0=
24         sys-libs/zlib
25         dbus? ( >=sys-apps/dbus-1.4.20 )
26         <dev-libs/openssl-1.1:0=
27         pam? ( virtual/pam )"
28 DEPEND="${RDEPEND}
29         virtual/pkgconfig
30         doc? ( app-doc/doxygen )
31         boost? ( >=dev-libs/boost-1.34.1:= )"
32
33 DOCS="ChangeLog README*"
34
35 pkg_pretend() {
36         [[ ${MERGE_TYPE} == "binary" ]] && return
37
38         if ! use boost && ! version_is_at_least 4.1 "$(gcc-fullversion)"; then
39                 eerror "This package requires the active gcc to be at least version 4.1"
40                 eerror "or USE=boost must be installed."
41                 die "Please activate >=sys-devel/gcc-4.1 with gcc-config."
42         fi
43 }
44
45 src_prepare() {
46         epatch \
47                 "${FILESDIR}"/${P}-parallel-make.patch \
48                 "${FILESDIR}"/${P}-openssl-1.0.0.patch \
49                 "${FILESDIR}"/${P}-glibc212.patch \
50                 "${FILESDIR}"/${P}-gcc47.patch \
51                 "${FILESDIR}"/${P}-fix-c++14.patch
52
53         sed -i \
54                 -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
55                 -e 's:AM_PROG_CC_STDC:AC_PROG_CC:' \
56                 argp/configure.ac || die
57
58         eautoreconf
59         pushd argp >/dev/null
60         eautoreconf
61         popd >/dev/null
62 }
63
64 src_configure() {
65         append-flags -fno-strict-aliasing
66         append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
67
68         tc-export AR CXX
69
70         use boost && export ac_cv_header_tr1_functional=no
71
72         econf \
73                 --localstatedir=/var \
74                 $(use_enable debug) \
75                 --disable-optimization \
76                 $(use_with dbus) \
77                 --with-openssl \
78                 $(use_with pam) \
79                 --without-tcl \
80                 --without-qt \
81                 --with-zlib \
82                 --without-valgrind
83 }
84
85 src_compile() {
86         default
87
88         if use doc; then
89                 doxygen || die
90         fi
91 }
92
93 src_test() {
94         emake test
95 }
96
97 src_install() {
98         default
99
100         if use doc; then
101                 #the list of files is too big for dohtml -r Docs/doxy-html/*
102                 cd Docs/doxy-html
103                 dohtml -r *
104         fi
105 }