sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / net-libs / wvstreams / wvstreams-4.6.1_p14-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools flag-o-matic toolchain-funcs
6
7 DESCRIPTION="A network programming library in C++"
8 HOMEPAGE="https://github.com/apenwarr/wvstreams"
9 SRC_URI="
10         mirror://debian/pool/main/w/${PN}/${PN}_${PV/_p*}.orig.tar.gz
11         mirror://debian/pool/main/w/${PN}/${PN}_${PV/_p/-}.debian.tar.xz
12 "
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 hppa ppc sparc x86"
17 IUSE="boost +dbus debug doc libressl pam"
18
19 #Tests fail if openssl is not compiled with -DPURIFY. Gentoo's isn't. FAIL!
20 RESTRICT="test"
21
22 #QA Fail: xplc is compiled as a part of wvstreams.
23 #It'll take a larger patching effort to get it extracted, since upstream integrated it
24 #more tightly this time. Probably for the better since upstream xplc seems dead.
25
26 RDEPEND="
27         sys-libs/readline:0=
28         sys-libs/zlib
29         dbus? ( >=sys-apps/dbus-1.4.20 )
30         !libressl? ( >=dev-libs/openssl-1.1:0= )
31         libressl? ( dev-libs/libressl:0= )
32         pam? ( sys-libs/pam )
33 "
34 DEPEND="
35         ${RDEPEND}
36         virtual/pkgconfig
37         doc? ( app-doc/doxygen )
38         boost? ( >=dev-libs/boost-1.34.1:= )
39 "
40 DOCS="ChangeLog README*"
41 PATCHES=(
42         "${FILESDIR}"/${PN}-4.6.1-autoconf.patch
43         "${FILESDIR}"/${PN}-4.6.1-gcc47.patch
44         "${FILESDIR}"/${PN}-4.6.1-parallel-make.patch
45         "${FILESDIR}"/${PN}-4.6.1-_DEFAULT_SOURCE.patch
46 )
47 S=${WORKDIR}/${P/_p*}
48
49 src_prepare() {
50         default
51
52         eapply $(awk '{ print "'"${WORKDIR}"'/debian/patches/" $0; }' < "${WORKDIR}"/debian/patches/series)
53         eapply "${FILESDIR}"/${P}-libressl.patch # bug 687096
54
55         eautoreconf
56 }
57
58 src_configure() {
59         append-flags -fno-strict-aliasing
60         append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
61
62         tc-export AR CXX
63
64         use boost && export ac_cv_header_tr1_functional=no
65
66         econf \
67                 $(use_enable debug) \
68                 $(use_with dbus) \
69                 $(use_with pam) \
70                 --cache-file="${T}"/config.cache \
71                 --disable-optimization \
72                 --localstatedir=/var \
73                 --with-openssl \
74                 --with-zlib \
75                 --without-qt \
76                 --without-tcl \
77                 --without-valgrind
78 }
79
80 src_compile() {
81         default
82
83         if use doc; then
84                 doxygen || die
85         fi
86 }
87
88 src_test() {
89         emake test
90 }
91
92 src_install() {
93         default
94
95         if use doc; then
96                 docinto html
97                 dodoc -r Docs/doxy-html/*
98         fi
99 }