c76dd168a2f9ebaa9ba6ea6014fc378fa1bcf4a0
[gentoo.git] / dev-cpp / asio / asio-1.10.8.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 DESCRIPTION="Asynchronous Network Library"
7 HOMEPAGE="http://asio.sourceforge.net/"
8 SRC_URI="mirror://sourceforge/${PN}/${PN}/${P}.tar.bz2"
9
10 LICENSE="Boost-1.0"
11 SLOT="0"
12 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ppc ppc64 sparc x86"
13 IUSE="doc examples ssl test"
14 RESTRICT="!test? ( test )"
15
16 RDEPEND="dev-libs/boost
17         ssl? ( dev-libs/openssl:0= )"
18 DEPEND="${RDEPEND}"
19
20 src_prepare() {
21         default
22
23         if ! use test; then
24                 # Don't build nor install any examples or unittests
25                 # since we don't have a script to run them
26                 cat > src/Makefile.in <<-EOF || die
27                         all:
28
29                         install:
30
31                         clean:
32                 EOF
33         fi
34 }
35
36 src_install() {
37         use doc && local HTML_DOCS=( doc/. )
38         default
39
40         if use examples; then
41                 # Get rid of the object files
42                 emake clean
43                 dodoc -r src/examples
44                 docompress -x /usr/share/doc/${PF}/examples
45         fi
46 }