summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-01-21 06:08:39 +0100
committerMichał Górny <mgorny@gentoo.org>2023-01-21 06:08:39 +0100
commita986da8ca04e7fc0fe33dba0e689ed2cb82f4812 (patch)
tree2e73ca0d96e88584ab13ad4edc79f62c1cb8126c /dev-libs/libgit2/libgit2-1.5.1.ebuild
parentmedia-gfx/scrot: add 1.8.1 (diff)
downloadgentoo-a986da8ca04e7fc0fe33dba0e689ed2cb82f4812.tar.gz
gentoo-a986da8ca04e7fc0fe33dba0e689ed2cb82f4812.tar.bz2
gentoo-a986da8ca04e7fc0fe33dba0e689ed2cb82f4812.zip
dev-libs/libgit2: Bump to 1.5.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-libs/libgit2/libgit2-1.5.1.ebuild')
-rw-r--r--dev-libs/libgit2/libgit2-1.5.1.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/dev-libs/libgit2/libgit2-1.5.1.ebuild b/dev-libs/libgit2/libgit2-1.5.1.ebuild
new file mode 100644
index 000000000000..2769e48033fe
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-1.5.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake python-any-r1
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="https://libgit2.org/"
+SRC_URI="
+ https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+"
+S=${WORKDIR}/${P/_/-}
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos"
+IUSE="examples gssapi +ssh test +threads trace"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/libpcre2:=
+ net-libs/http-parser:=
+ sys-libs/zlib
+ dev-libs/openssl:0=
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )
+"
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ cmake_src_prepare
+ # relying on forked http-parser to support some obscure URI form
+ sed -i -e '/empty_port/s:test:_&:' \
+ tests/libgit2/network/url/parse.c || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTS=$(usex test)
+ -DUSE_SSH=$(usex ssh)
+ -DUSE_GSSAPI=$(usex gssapi ON OFF)
+ -DUSE_HTTP_PARSER=system
+ -DREGEX_BACKEND=pcre2
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]] ; then
+ # repo::iterator::fs_preserves_error fails if run as root
+ # since root can still access dirs with 0000 perms
+ ewarn "Skipping tests: non-root privileges are required for all tests to pass"
+ else
+ local TEST_VERBOSE=1
+ cmake_src_test -R offline
+ fi
+}
+
+src_install() {
+ cmake_src_install
+ dodoc docs/*.{md,txt}
+
+ if use examples ; then
+ find examples -name '.gitignore' -delete || die
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}