golang-base.eclass: bump dependency on go to 1.9
[gentoo.git] / sys-block / thin-provisioning-tools / thin-provisioning-tools-0.7.0.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools flag-o-matic
7
8 DESCRIPTION="A suite of tools for thin provisioning on Linux"
9 HOMEPAGE="https://github.com/jthornber/thin-provisioning-tools"
10 SRC_URI="https://github.com/jthornber/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
15 IUSE="static test"
16
17 LIB_DEPEND="dev-libs/expat[static-libs(+)]
18         dev-libs/libaio[static-libs(+)]"
19 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
20 # || ( ) is a non-future proof workaround for Portage unefficiency wrt #477050
21 DEPEND="${RDEPEND}
22         static? ( ${LIB_DEPEND} )
23         test? (
24                 || ( dev-lang/ruby:2.9 dev-lang/ruby:2.8 dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 )
25                 >=dev-cpp/gmock-1.6
26                 >=dev-cpp/gtest-1.6
27                 dev-util/cucumber
28                 dev-util/aruba
29         )
30         dev-libs/boost"
31
32 PATCHES=( "${FILESDIR}"/${PN}-0.7.0-build-fixes.patch )
33
34 src_prepare() {
35         default
36         eautoreconf
37 }
38
39 src_configure() {
40         use static && append-ldflags -static
41         STRIP=true econf \
42                 --prefix="${EPREFIX}"/ \
43                 --bindir="${EPREFIX}"/sbin \
44                 --with-optimisation='' \
45                 $(use_enable test testing)
46 }
47
48 src_compile() {
49         MAKEOPTS+=" V="
50         default
51 }
52
53 src_test() {
54         emake unit-test
55 }
56
57 src_install() {
58         emake DESTDIR="${D}" DATADIR="${ED%/}/usr/share" install
59         dodoc README.md TODO.org
60 }