dev-libs/leatherman: stable 1.2.1 for ppc64, bug #625764
[gentoo.git] / dev-libs / leatherman / leatherman-1.2.1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 USE_RUBY="ruby21 ruby22"
6
7 inherit cmake-utils multilib
8
9 DESCRIPTION="A C++ toolkit"
10 HOMEPAGE="https://github.com/puppetlabs/leatherman"
11 SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="Apache-2.0"
14 SLOT="0"
15 IUSE="debug test"
16 KEYWORDS="amd64 ~arm ~hppa ~ppc ppc64 ~sparc x86"
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         default
28 }
29
30 src_configure() {
31         local mycmakeargs=(
32                 -DCMAKE_VERBOSE_MAKEFILE=ON
33                 -DCMAKE_BUILD_TYPE=None
34                 -DCMAKE_INSTALL_PREFIX=/usr
35                 -DCMAKE_INSTALL_SYSCONFDIR=/etc
36                 -DCMAKE_INSTALL_LOCALSTATEDIR=/var
37         )
38         if use debug; then
39                 mycmakeargs+=(
40                   -DCMAKE_BUILD_TYPE=Debug
41                 )
42         fi
43         cmake-utils_src_configure
44 }
45
46 src_test() {
47         "${WORKDIR}/${P}"_build/bin/leatherman_test
48 }
49
50 src_install() {
51         cmake-utils_src_install
52 }