sys-cluster/cinder: 12.0.4 and 13.0.1 stable amd64 and x86
[gentoo.git] / dev-libs / leatherman / leatherman-1.4.2.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 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 KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
15 SLOT="0/1.4"
16
17 RDEPEND="net-misc/curl"
18 DEPEND=">=dev-libs/boost-1.54:=[nls]
19         net-misc/curl
20         >=sys-devel/gcc-4.8:*"
21
22 PATCHES=( "${FILESDIR}"/portage-sandbox-test-fix.patch )
23
24 src_prepare() {
25         sed -i 's/\-Werror\ //g' "cmake/cflags.cmake" || die
26         cmake-utils_src_prepare
27 }
28
29 src_configure() {
30         local mycmakeargs=(
31                 -DCMAKE_VERBOSE_MAKEFILE=ON
32                 -DCMAKE_BUILD_TYPE=None
33                 -DCMAKE_INSTALL_PREFIX=/usr
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 }