Merge Gentoo/FreeBSD 10.1 removal (PR #47)
[gentoo.git] / dev-libs / double-conversion / double-conversion-2.0.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit scons-utils eutils
8
9 DESCRIPTION="Binary-decimal and decimal-binary routines forIEEE doubles"
10 HOMEPAGE="https://github.com/google/double-conversion"
11 SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0/1"
15 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
16 IUSE="static-libs"
17
18 RDEPEND=""
19 DEPEND="${RDEPEND}"
20
21 S="${WORKDIR}"
22
23 LIBNAME=lib${PN}
24
25 src_prepare() {
26         epatch "${FILESDIR}"/${P}-scons.patch
27 }
28
29 src_compile() {
30         escons ${LIBNAME}.so.1
31         use static-libs && escons ${LIBNAME}.a
32 }
33
34 src_test() {
35         escons run_tests
36         export LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
37         ./run_tests --list | tr -d '<' | xargs ./run_tests || die
38 }
39
40 src_install() {
41         dolib.so ${LIBNAME}.so*
42         use static-libs && dolib.a ${LIBNAME}.a
43         insinto /usr/include/double-conversion
44         doins src/{double-conversion,utils}.h
45         dodoc README Changelog AUTHORS
46 }