net-libs/libssh: WITH_STATIC_LIB -> BUILD_SHARED_LIBS
[gentoo.git] / net-libs / wvstreams / wvstreams-4.6.1-r5.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
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="
24         <dev-libs/openssl-1.1:0=
25         sys-libs/readline:0=
26         sys-libs/zlib
27         dbus? ( >=sys-apps/dbus-1.4.20 )
28         pam? ( sys-libs/pam )
29 "
30 DEPEND="
31         ${RDEPEND}
32         virtual/pkgconfig
33         doc? ( app-doc/doxygen )
34         boost? ( >=dev-libs/boost-1.34.1:= )
35 "
36 DOCS="ChangeLog README*"
37 PATCHES=(
38         "${FILESDIR}"/${P}-autoconf.patch
39         "${FILESDIR}"/${P}-fix-c++14.patch
40         "${FILESDIR}"/${P}-gcc47.patch
41         "${FILESDIR}"/${P}-glibc212.patch
42         "${FILESDIR}"/${P}-openssl-1.0.0.patch
43         "${FILESDIR}"/${P}-parallel-make.patch
44         "${FILESDIR}"/${P}-_DEFAULT_SOURCE.patch
45         "${FILESDIR}"/${P}-2048-bytes-should-be-enough-right-question-mark.patch
46 )
47
48 src_prepare() {
49         default
50
51         eautoreconf
52 }
53
54 src_configure() {
55         append-flags -fno-strict-aliasing
56         append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
57
58         tc-export AR CXX
59
60         use boost && export ac_cv_header_tr1_functional=no
61
62         econf \
63                 $(use_enable debug) \
64                 $(use_with dbus) \
65                 $(use_with pam) \
66                 --cache-file="${T}"/config.cache \
67                 --disable-optimization \
68                 --localstatedir=/var \
69                 --with-openssl \
70                 --with-zlib \
71                 --without-qt \
72                 --without-tcl \
73                 --without-valgrind
74 }
75
76 src_compile() {
77         default
78
79         if use doc; then
80                 doxygen || die
81         fi
82 }
83
84 src_test() {
85         emake test
86 }
87
88 src_install() {
89         default
90
91         if use doc; then
92                 #the list of files is too big for dohtml -r Docs/doxy-html/*
93                 docinto html
94                 dodoc -r Docs/doxy-html/*
95         fi
96 }