dev-libs/leatherman: 1.10.0 stable amd64 and x86
[gentoo.git] / dev-libs / leatherman / leatherman-1.8.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils multilib
7
8 DESCRIPTION="A C++ toolkit"
9 HOMEPAGE="https://github.com/puppetlabs/leatherman"
10 SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="Apache-2.0"
13 IUSE="debug static-libs test"
14 RESTRICT="!test? ( test )"
15 KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
16 SLOT="0/${PV}"
17
18 RDEPEND="net-misc/curl"
19 DEPEND=">=dev-libs/boost-1.54:=[nls]
20         net-misc/curl
21         >=sys-devel/gcc-4.8:*"
22
23 PATCHES=( "${FILESDIR}"/portage-sandbox-test-fix.patch )
24
25 src_prepare() {
26         sed -i 's/\-Werror\ //g' "cmake/cflags.cmake" || die
27         cmake-utils_src_prepare
28 }
29
30 src_configure() {
31         local mycmakeargs=(
32                 -DCMAKE_VERBOSE_MAKEFILE=ON
33                 -DCMAKE_BUILD_TYPE=None
34         )
35         if ! use static-libs; then
36                 mycmakeargs+=(
37                         -DLEATHERMAN_SHARED=ON
38                 )
39         else
40                 mycmakeargs+=(
41                         -DLEATHERMAN_SHARED=OFF
42                 )
43         fi
44         if use debug; then
45                 mycmakeargs+=(
46                   -DCMAKE_BUILD_TYPE=Debug
47                 )
48         fi
49         cmake-utils_src_configure
50 }
51
52 src_test() {
53         "${WORKDIR}/${P}"_build/bin/leatherman_test
54 }
55
56 src_install() {
57         cmake-utils_src_install
58 }