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, 02 Sep 2021 21:00:19
Message-Id: 1630616405.7713ca307d29f58fcd2525dd64453e348f22d6a0.mgorny@gentoo
1 commit: 7713ca307d29f58fcd2525dd64453e348f22d6a0
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 2 20:45:52 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 2 21:00:05 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7713ca30
7
8 dev-libs/libgit2: Bump to 1.2.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-1.2.0.ebuild | 72 +++++++++++++++++++++++++++++++++++
14 2 files changed, 73 insertions(+)
15
16 diff --git a/dev-libs/libgit2/Manifest b/dev-libs/libgit2/Manifest
17 index bee1acd27a7..2682232869b 100644
18 --- a/dev-libs/libgit2/Manifest
19 +++ b/dev-libs/libgit2/Manifest
20 @@ -1,2 +1,3 @@
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 +DIST libgit2-1.2.0.tar.gz 5589147 BLAKE2B b612e3a30b4675431879792132adee22cce57986b4f307507b896d823329f7e37514d9008e008075c395a4eca26aaf6ed6eb3943cf97370a0b04086240a5e1fc SHA512 428188de153fdf8ff5bf78949f4a3a89fba57b87a8b641f92fed501df6a8cfdb72e0ffe0bf61a98adf210a2867134eb4421ea4b8d8219331aabc3daddd92f5fc
24
25 diff --git a/dev-libs/libgit2/libgit2-1.2.0.ebuild b/dev-libs/libgit2/libgit2-1.2.0.ebuild
26 new file mode 100644
27 index 00000000000..f2c774a8b63
28 --- /dev/null
29 +++ b/dev-libs/libgit2/libgit2-1.2.0.ebuild
30 @@ -0,0 +1,72 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +inherit cmake python-any-r1
38 +
39 +DESCRIPTION="A linkable library for Git"
40 +HOMEPAGE="https://libgit2.org"
41 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
42 +S=${WORKDIR}/${P/_/-}
43 +
44 +LICENSE="GPL-2-with-linking-exception"
45 +SLOT="0/1.2"
46 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~ppc-macos"
47 +IUSE="examples gssapi +ssh test +threads trace"
48 +RESTRICT="!test? ( test )"
49 +
50 +RDEPEND="
51 + dev-libs/libpcre:=
52 + net-libs/http-parser:=
53 + sys-libs/zlib
54 + dev-libs/openssl:0=
55 + gssapi? ( virtual/krb5 )
56 + ssh? ( net-libs/libssh2 )
57 +"
58 +DEPEND="${RDEPEND}"
59 +BDEPEND="
60 + ${PYTHON_DEPS}
61 + virtual/pkgconfig
62 +"
63 +
64 +src_prepare() {
65 + cmake_src_prepare
66 + # relying on forked http-parser to support some obscure URI form
67 + sed -i -e '/empty_port/s:test:_&:' tests/network/url/parse.c || die
68 +}
69 +
70 +src_configure() {
71 + local mycmakeargs=(
72 + -DBUILD_CLAR=$(usex test)
73 + -DENABLE_TRACE=$(usex trace ON OFF)
74 + -DUSE_GSSAPI=$(usex gssapi ON OFF)
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 +}