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: Thu, 01 Jul 2021 06:13:53
Message-Id: 1625120017.51ac996ce913fdbecd4eab068a3867216682a80b.mgorny@gentoo
1 commit: 51ac996ce913fdbecd4eab068a3867216682a80b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 1 05:49:18 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 1 06:13:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51ac996c
7
8 dev-libs/libgit2: Bump to 1.1.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-libs/libgit2/Manifest | 1 +
13 dev-libs/libgit2/libgit2-1.1.1.ebuild | 72 +++++++++++++++++++++++++++++++++++
14 2 files changed, 73 insertions(+)
15
16 diff --git a/dev-libs/libgit2/Manifest b/dev-libs/libgit2/Manifest
17 index 8699bbf4ef8..bee1acd27a7 100644
18 --- a/dev-libs/libgit2/Manifest
19 +++ b/dev-libs/libgit2/Manifest
20 @@ -1 +1,2 @@
21 DIST libgit2-1.1.0.tar.gz 5426975 BLAKE2B 2a1c1f71d2a2e06448c78eb46028fdcfd59682dccf2365851c4bd059cdd78842320f9a5ba7345e761611a5b4eba634faf2e26cc669097da0ba2e1c832c23059f SHA512 347bb68900181b44fa58a0417506c91383adb965607fce049a5b4c57ac9cc286e0a140d164c339b50fb6cd6951f47757c2917a2df44ba004bfaa4fb643946bb8
22 +DIST libgit2-1.1.1.tar.gz 5451203 BLAKE2B 46842ea270fc457d0960c1a825928eb2747b236e689ff785e9fc2bce919744d1da95a89e6fcf928bbe6a4981e2ff6a02989df92026ba181f2743e949982a18df SHA512 287255c81e5baa04d8fbce95efca8174cb34da8025cab979445d41e8361955f1d8c582d7705666ae9fc03c5215fc4f4f57e51d73d14ca9b063ed94077f88e6bc
23
24 diff --git a/dev-libs/libgit2/libgit2-1.1.1.ebuild b/dev-libs/libgit2/libgit2-1.1.1.ebuild
25 new file mode 100644
26 index 00000000000..949a6c1dbb7
27 --- /dev/null
28 +++ b/dev-libs/libgit2/libgit2-1.1.1.ebuild
29 @@ -0,0 +1,72 @@
30 +# Copyright 1999-2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +PYTHON_COMPAT=( python3_{8..10} )
36 +inherit cmake python-any-r1
37 +
38 +DESCRIPTION="A linkable library for Git"
39 +HOMEPAGE="https://libgit2.org"
40 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
41 +S=${WORKDIR}/${P/_/-}
42 +
43 +LICENSE="GPL-2-with-linking-exception"
44 +SLOT="0/1.1"
45 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~ppc-macos"
46 +IUSE="examples gssapi +ssh test +threads trace"
47 +RESTRICT="!test? ( test )"
48 +
49 +RDEPEND="
50 + dev-libs/libpcre:=
51 + net-libs/http-parser:=
52 + sys-libs/zlib
53 + dev-libs/openssl:0=
54 + gssapi? ( virtual/krb5 )
55 + ssh? ( net-libs/libssh2 )
56 +"
57 +DEPEND="${RDEPEND}"
58 +BDEPEND="
59 + ${PYTHON_DEPS}
60 + virtual/pkgconfig
61 +"
62 +
63 +src_prepare() {
64 + cmake_src_prepare
65 + # relying on forked http-parser to support some obscure URI form
66 + sed -i -e '/empty_port/s:test:_&:' tests/network/urlparse.c || die
67 +}
68 +
69 +src_configure() {
70 + local mycmakeargs=(
71 + -DBUILD_CLAR=$(usex test)
72 + -DENABLE_TRACE=$(usex trace ON OFF)
73 + -DUSE_GSSAPI=$(usex gssapi ON OFF)
74 + -DUSE_SSH=$(usex ssh)
75 + -DTHREADSAFE=$(usex threads)
76 + -DUSE_HTTP_PARSER=system
77 + )
78 + cmake_src_configure
79 +}
80 +
81 +src_test() {
82 + if [[ ${EUID} -eq 0 ]] ; then
83 + # repo::iterator::fs_preserves_error fails if run as root
84 + # since root can still access dirs with 0000 perms
85 + ewarn "Skipping tests: non-root privileges are required for all tests to pass"
86 + else
87 + local TEST_VERBOSE=1
88 + cmake_src_test -R offline
89 + fi
90 +}
91 +
92 +src_install() {
93 + cmake_src_install
94 + dodoc docs/*.{md,txt}
95 +
96 + if use examples ; then
97 + find examples -name '.gitignore' -delete || die
98 + dodoc -r examples
99 + docompress -x /usr/share/doc/${PF}/examples
100 + fi
101 +}