summaryrefslogtreecommitdiff
path: root/dev-libs/libgit2/libgit2-1.9.1.ebuild
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2025-06-07 06:40:07 +0200
committerMichał Górny <mgorny@gentoo.org>2025-06-07 08:13:21 +0200
commitab798e9a2590d6e2174d5e186f4ebc4bf4441d2e (patch)
tree57e2b3400ba1abdd93ce0b8af62f3a3a43b3898e /dev-libs/libgit2/libgit2-1.9.1.ebuild
parentf472ee59d945e90096caea1ffa9c704e399f9d8d (diff)
downloadgentoo-ab798e9a2590d6e2174d5e186f4ebc4bf4441d2e.tar.gz
gentoo-ab798e9a2590d6e2174d5e186f4ebc4bf4441d2e.tar.bz2
gentoo-ab798e9a2590d6e2174d5e186f4ebc4bf4441d2e.zip
dev-libs/libgit2: Bump to 1.9.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-libs/libgit2/libgit2-1.9.1.ebuild')
-rw-r--r--dev-libs/libgit2/libgit2-1.9.1.ebuild79
1 files changed, 79 insertions, 0 deletions
diff --git a/dev-libs/libgit2/libgit2-1.9.1.ebuild b/dev-libs/libgit2/libgit2-1.9.1.ebuild
new file mode 100644
index 000000000000..1d63f91a4de3
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-1.9.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit cmake flag-o-matic 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 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="examples gssapi +ssh test +threads trace"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/libpcre2:=
+ net-libs/llhttp:=
+ 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
+
+ # https://bugs.gentoo.org/948941
+ sed -i -e 's:-Werror::' tests/headertest/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTS=$(usex test)
+ -DUSE_SSH=$(usex ssh libssh2 OFF)
+ -DUSE_GSSAPI=$(usex gssapi ON OFF)
+ -DUSE_HTTP_PARSER=llhttp
+ -DREGEX_BACKEND=pcre2
+ )
+ # https://bugs.gentoo.org/925207
+ append-lfs-flags
+ 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
+}