summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libgit2/Manifest1
-rw-r--r--dev-libs/libgit2/libgit2-0.28.4.ebuild72
2 files changed, 73 insertions, 0 deletions
diff --git a/dev-libs/libgit2/Manifest b/dev-libs/libgit2/Manifest
index 648863661c71..84346a5b48f6 100644
--- a/dev-libs/libgit2/Manifest
+++ b/dev-libs/libgit2/Manifest
@@ -1 +1,2 @@
DIST libgit2-0.28.3.tar.gz 4988580 BLAKE2B 93d87792b0aef6383845230880d749fa77f28ac8ece4564abf041ccbb672d17e6efb1ef9503879d45cf5f78b6f1e54dd2b2ab9eac0fb09ddb445310484bbd7fc SHA512 15444823b7d4885f7b8c3982f8905efc4a75913de016a9b2e0a24d5ce9746e6a549dffd5469036529557feff2ce7ece9328266eb312c80b96091ce0f65ee97ee
+DIST libgit2-0.28.4.tar.gz 4991720 BLAKE2B 7dc94dce69c27f6de3736b94b4d80b727e3e2a7db255a9eab7422cebd93a3ea1a6f47d1de6c3fbe4ba5bcb28ade9b23a989c5b54c06eafeaf30e382f3b859cdf SHA512 b81160608003b25d9b922d259ebbbbf941b6bd5100fa1875497c8cd29de320e292fff568c757a7a85b2b3044ddc1cb92c74dbcb13d630d62ecf9a8559b619d15
diff --git a/dev-libs/libgit2/libgit2-0.28.4.ebuild b/dev-libs/libgit2/libgit2-0.28.4.ebuild
new file mode 100644
index 000000000000..89a49f8ac99d
--- /dev/null
+++ b/dev-libs/libgit2/libgit2-0.28.4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+inherit cmake-utils python-any-r1
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~ppc-macos"
+fi
+
+DESCRIPTION="A linkable library for Git"
+HOMEPAGE="https://libgit2.github.com/"
+
+LICENSE="GPL-2-with-linking-exception"
+SLOT="0/28"
+IUSE="examples gssapi libressl +ssh test +threads trace"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ sys-libs/zlib
+ net-libs/http-parser:=
+ gssapi? ( virtual/krb5 )
+ ssh? ( net-libs/libssh2 )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${P/_/-}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ -DBUILD_CLAR=$(usex test)
+ -DENABLE_TRACE=$(usex trace)
+ -DUSE_GSSAPI=$(usex gssapi)
+ -DUSE_SSH=$(usex ssh)
+ -DTHREADSAFE=$(usex threads)
+ )
+ cmake-utils_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-utils_src_test -R offline
+ fi
+}
+
+src_install() {
+ cmake-utils_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
+}