From 5c919963cd5366fe9ac8eb99874d2c757d47348f Mon Sep 17 00:00:00 2001 From: tranzystorekk Date: Sat, 28 Dec 2024 20:08:02 +0100 Subject: [PATCH] New package: libgit2-1.9-1.9.0 --- common/shlibs | 1 + srcpkgs/libgit2-1.9-devel | 1 + ...test-validate_current_user_ownership.patch | 13 ++++++ srcpkgs/libgit2-1.9/template | 44 +++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 120000 srcpkgs/libgit2-1.9-devel create mode 100644 srcpkgs/libgit2-1.9/patches/disable-test-validate_current_user_ownership.patch create mode 100644 srcpkgs/libgit2-1.9/template diff --git a/common/shlibs b/common/shlibs index 1ef462e0278649..d6997d5666e87f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1349,6 +1349,7 @@ 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.so.1.9 libgit2-1.9-1.9.0_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.9-devel b/srcpkgs/libgit2-1.9-devel new file mode 120000 index 00000000000000..c9346bf001a10b --- /dev/null +++ b/srcpkgs/libgit2-1.9-devel @@ -0,0 +1 @@ +libgit2-1.9 \ No newline at end of file diff --git a/srcpkgs/libgit2-1.9/patches/disable-test-validate_current_user_ownership.patch b/srcpkgs/libgit2-1.9/patches/disable-test-validate_current_user_ownership.patch new file mode 100644 index 00000000000000..33be4ac91e397c --- /dev/null +++ b/srcpkgs/libgit2-1.9/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..3d98f35 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.9/template b/srcpkgs/libgit2-1.9/template new file mode 100644 index 00000000000000..fe3abeded335ef --- /dev/null +++ b/srcpkgs/libgit2-1.9/template @@ -0,0 +1,44 @@ +# Template file for 'libgit2-1.9' +pkgname=libgit2-1.9 +version=1.9.0 +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="GPL-2.0-only WITH GCC-exception-2.0" +homepage="https://libgit2.org" +distfiles="https://github.com/libgit2/libgit2/archive/refs/tags/v${version}.tar.gz" +checksum=75b27d4d6df44bd34e2f70663cfd998f5ec41e680e1e593238bbe517a84c7ed2 + +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.9-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/cmake + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +}