Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgit2/
Date: Fri, 21 Feb 2020 10:08:36
Message-Id: 1582279703.1d74fa74001932ed9c51020ee952da3f672e6930.mgorny@gentoo
1 commit: 1d74fa74001932ed9c51020ee952da3f672e6930
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 21 06:35:55 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 21 10:08:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d74fa74
7
8 dev-libs/libgit2: Bump to 0.99.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-libs/libgit2/Manifest | 1 +
13 dev-libs/libgit2/libgit2-0.99.0.ebuild | 73 ++++++++++++++++++++++++++++++++++
14 2 files changed, 74 insertions(+)
15
16 diff --git a/dev-libs/libgit2/Manifest b/dev-libs/libgit2/Manifest
17 index e0510a640a7..ed473e8907b 100644
18 --- a/dev-libs/libgit2/Manifest
19 +++ b/dev-libs/libgit2/Manifest
20 @@ -1 +1,2 @@
21 DIST libgit2-0.28.4.tar.gz 4991720 BLAKE2B 7dc94dce69c27f6de3736b94b4d80b727e3e2a7db255a9eab7422cebd93a3ea1a6f47d1de6c3fbe4ba5bcb28ade9b23a989c5b54c06eafeaf30e382f3b859cdf SHA512 b81160608003b25d9b922d259ebbbbf941b6bd5100fa1875497c8cd29de320e292fff568c757a7a85b2b3044ddc1cb92c74dbcb13d630d62ecf9a8559b619d15
22 +DIST libgit2-0.99.0.tar.gz 5307975 BLAKE2B 2ff6c48d29844c8efd292b636c018403f49ae5eef1ef41e2c8755cc35d935677fa965b52c05724aa133f8542a266bb0e0fabb34fcf710127332bd6137ea4ff12 SHA512 e38e18da0e6ed1e5c8198c9eb2c362b21da2d0b9c8bc23309d2f70183549f4b9f23a6db8ce5f1f0f24b373e6427039c2a845b62dd74f91b02cfe8954f961a91b
23
24 diff --git a/dev-libs/libgit2/libgit2-0.99.0.ebuild b/dev-libs/libgit2/libgit2-0.99.0.ebuild
25 new file mode 100644
26 index 00000000000..23bd171e310
27 --- /dev/null
28 +++ b/dev-libs/libgit2/libgit2-0.99.0.ebuild
29 @@ -0,0 +1,73 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +PYTHON_COMPAT=( python3_{6,7} )
36 +inherit cmake python-any-r1
37 +
38 +if [[ ${PV} == "9999" ]] ; then
39 + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
40 + inherit git-r3
41 +else
42 + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
43 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~ppc-macos"
44 +fi
45 +
46 +DESCRIPTION="A linkable library for Git"
47 +HOMEPAGE="https://libgit2.org"
48 +
49 +LICENSE="GPL-2-with-linking-exception"
50 +SLOT="0/28"
51 +IUSE="examples gssapi libressl +ssh test +threads trace"
52 +RESTRICT="!test? ( test )"
53 +
54 +RDEPEND="
55 + !libressl? ( dev-libs/openssl:0= )
56 + libressl? ( dev-libs/libressl:0= )
57 + sys-libs/zlib
58 + net-libs/http-parser:=
59 + gssapi? ( virtual/krb5 )
60 + ssh? ( net-libs/libssh2 )
61 +"
62 +DEPEND="${RDEPEND}
63 + ${PYTHON_DEPS}
64 + virtual/pkgconfig
65 +"
66 +
67 +S=${WORKDIR}/${P/_/-}
68 +
69 +src_configure() {
70 + local mycmakeargs=(
71 + -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
72 + -DBUILD_CLAR=$(usex test)
73 + -DENABLE_TRACE=$(usex trace)
74 + -DUSE_GSSAPI=$(usex gssapi)
75 + -DUSE_SSH=$(usex ssh)
76 + -DTHREADSAFE=$(usex threads)
77 + -DUSE_HTTP_PARSER=system
78 + )
79 + cmake_src_configure
80 +}
81 +
82 +src_test() {
83 + if [[ ${EUID} -eq 0 ]] ; then
84 + # repo::iterator::fs_preserves_error fails if run as root
85 + # since root can still access dirs with 0000 perms
86 + ewarn "Skipping tests: non-root privileges are required for all tests to pass"
87 + else
88 + local TEST_VERBOSE=1
89 + cmake_src_test -R offline
90 + fi
91 +}
92 +
93 +src_install() {
94 + cmake_src_install
95 + dodoc docs/*.{md,txt}
96 +
97 + if use examples ; then
98 + find examples -name '.gitignore' -delete || die
99 + dodoc -r examples
100 + docompress -x /usr/share/doc/${PF}/examples
101 + fi
102 +}