1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit cmake-utils multilib
9 if [[ ${PV} == "9999" ]] ; then
10 EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
13 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="amd64 ~arm ~ppc x86 ~ppc-macos"
17 DESCRIPTION="A linkable library for Git"
18 HOMEPAGE="https://libgit2.github.com/"
20 LICENSE="GPL-2-with-linking-exception"
22 IUSE="examples gssapi libressl ssh test threads trace"
25 !libressl? ( dev-libs/openssl:0 )
26 libressl? ( dev-libs/libressl )
28 net-libs/http-parser:=
29 gssapi? ( virtual/krb5 )
30 ssh? ( net-libs/libssh2 )
36 DOCS=( AUTHORS CONTRIBUTING.md CONVENTIONS.md README.md )
40 sed -i '/libgit2_clar/s/-ionline/-xonline/' CMakeLists.txt || die
42 cmake-utils_src_prepare
47 -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
48 $(cmake-utils_use_build test CLAR)
49 $(cmake-utils_use_enable trace TRACE)
50 $(cmake-utils_use_use gssapi GSSAPI)
51 $(cmake-utils_use_use ssh SSH)
52 $(cmake-utils_use threads THREADSAFE)
54 cmake-utils_src_configure
58 if [[ ${EUID} -eq 0 ]] ; then
59 # repo::iterator::fs_preserves_error fails if run as root
60 # since root can still access dirs with 0000 perms
61 ewarn "Skipping tests: non-root privileges are required for all tests to pass"
69 cmake-utils_src_install
71 if use examples ; then
74 docompress -x /usr/share/doc/${PF}/examples