diff --git a/common/shlibs b/common/shlibs index 446e4ae0499..60e900856d2 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1342,6 +1342,7 @@ libunwind-setjmp.so.0 libunwind-1.5.0_3 libmicrohttpd.so.12 libmicrohttpd-0.9.73_1 libmicrodns.so.1 libmicrodns-0.2.0_1 libgit2.so.1.7 libgit2-1.7.2_1 +libgit2.so.1.8 libgit2-1.8-1.8.1_1 libgit2-glib-1.0.so.0 libgit2-glib-1.2.0_1 libagg.so.2 agg-2.5_1 libzzip-0.so.13 zziplib-0.13.62_1 diff --git a/srcpkgs/libgit2-1.8-devel b/srcpkgs/libgit2-1.8-devel new file mode 120000 index 00000000000..38cbde53b67 --- /dev/null +++ b/srcpkgs/libgit2-1.8-devel @@ -0,0 +1 @@ +libgit2-1.8 \ No newline at end of file diff --git a/srcpkgs/libgit2-1.8/patches/disable-test-validate_current_user_ownership.patch b/srcpkgs/libgit2-1.8/patches/disable-test-validate_current_user_ownership.patch new file mode 100644 index 00000000000..3cbe2c9b773 --- /dev/null +++ b/srcpkgs/libgit2-1.8/patches/disable-test-validate_current_user_ownership.patch @@ -0,0 +1,13 @@ +diff --git a/tests/util/path/core.c b/tests/util/path/core.c +index d1935a8..bcbabf9 100644 +--- a/tests/util/path/core.c ++++ b/tests/util/path/core.c +@@ -761,7 +761,7 @@ void test_path_core__validate_current_user_ownership(void) + cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "c:\\path\\does\\not\\exist")); + #else + cl_git_pass(git_fs_path_owner_is_current_user(&is_cur, "/")); +- cl_assert_equal_i(is_cur, (geteuid() == 0)); ++ //cl_assert_equal_i(is_cur, (geteuid() == 0)); // xbps-src chroot belongs to $USER, not root + + cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "/path/does/not/exist")); + #endif diff --git a/srcpkgs/libgit2-1.8/template b/srcpkgs/libgit2-1.8/template new file mode 100644 index 00000000000..3cabec38b05 --- /dev/null +++ b/srcpkgs/libgit2-1.8/template @@ -0,0 +1,43 @@ +# Template file for 'libgit2-1.8' +pkgname=libgit2-1.8 +version=1.8.1 +revision=1 +build_style=cmake +configure_args="-DENABLE_REPRODUCIBLE_BUILDS=ON -DBUILD_CLI=OFF -DUSE_SSH=ON -DUSE_HTTP_PARSER=llhttp" +hostmakedepends="python3 pkg-config" +makedepends="zlib-devel openssl-devel llhttp-devel libssh2-devel" +short_desc="Git linkable library ${pkgname#libgit2-}" +maintainer="tranzystorekk " +license="custom:GPL-2.0-or-later WITH GCC-exception-2.0" +homepage="https://libgit2.org" +distfiles="https://github.com/libgit2/libgit2/archive/refs/tags/v${version}.tar.gz" +checksum=8c1eaf0cf07cba0e9021920bfba9502140220786ed5d8a8ec6c7ad9174522f8e + +if [ -z "$XBPS_CHECK_PKGS" ]; then + configure_args+=" -DBUILD_TESTS=OFF" +fi + +CFLAGS="-D_LARGE_FILE_SOURCE=1 -D_FILE_OFFSET_BITS=64" + +post_patch() { + # no online tests + vsed \ + -i tests/libgit2/CMakeLists.txt \ + -e '/-sonline/s/^/#/' +} + +post_install() { + vlicense COPYING +} + +libgit2-1.8-devel_package() { + depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + provides="virtual-libgit2-devel-${version}_${revision}" + conflicts="virtual-libgit2-devel" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +}