summaryrefslogtreecommitdiff
path: root/user/libgit2
diff options
context:
space:
mode:
Diffstat (limited to 'user/libgit2')
-rw-r--r--user/libgit2/APKBUILD12
-rw-r--r--user/libgit2/test-fix.patch27
2 files changed, 35 insertions, 4 deletions
diff --git a/user/libgit2/APKBUILD b/user/libgit2/APKBUILD
index 0f1a6839d..68cee89a0 100644
--- a/user/libgit2/APKBUILD
+++ b/user/libgit2/APKBUILD
@@ -13,7 +13,9 @@ depends=""
depends_dev="curl-dev libssh2-dev"
makedepends="$depends_dev cmake http-parser-dev openssl-dev python3 zlib-dev"
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
+ test-fix.patch
+ "
# secfixes:
# 0.27.3-r0:
@@ -32,17 +34,19 @@ build() {
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_C_FLAGS="$CFLAGS" .
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ .
make
}
check() {
# Don't run online tests by default.
- CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E 'o.*line'
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E 'online'
}
package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="abfea885f46444b0304ae57c32c06f4252afb0093c924da5e1ba10aaed952824d1b84036adb79b5b8ad8bea56a6331a51c62f3b9839aead16c7b26cb4554b53a libgit2-0.28.5.tar.gz"
+sha512sums="abfea885f46444b0304ae57c32c06f4252afb0093c924da5e1ba10aaed952824d1b84036adb79b5b8ad8bea56a6331a51c62f3b9839aead16c7b26cb4554b53a libgit2-0.28.5.tar.gz
+0df17aeec1445cd88a4dc361e6f2c9451e1b547bc6d1d932a245382184a466422bb66be9e1bfc1aab9370de43b2f0c33a102bab710ba8e0fdb7fc8e8bd875546 test-fix.patch"
diff --git a/user/libgit2/test-fix.patch b/user/libgit2/test-fix.patch
new file mode 100644
index 000000000..a6eed991a
--- /dev/null
+++ b/user/libgit2/test-fix.patch
@@ -0,0 +1,27 @@
+From bdab22384cc61d315005a65456a9f9563bb27c8f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= <carlosmn@github.com>
+Date: Tue, 3 May 2022 09:28:43 +0200
+Subject: [PATCH] revparse: adjust reflog test as we move away from the dates
+
+The dates we use in `refs::revparse::date` has just passed the ten years, so
+now everything is beyond ten years, leading to an unexpected commit being
+returned.
+
+Adjust it to 11 years so it all looks fine again.
+---
+ tests/libgit2/refs/revparse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/libgit2/refs/revparse.c b/tests/libgit2/refs/revparse.c
+index 0bd2ae5bc2c..93d7ce6db81 100644
+--- a/tests/refs/revparse.c
++++ b/tests/refs/revparse.c
+@@ -400,7 +400,7 @@ void test_refs_revparse__date(void)
+ * a65fedf HEAD@{1335806603 -0900}: commit:
+ * be3563a HEAD@{1335806563 -0700}: clone: from /Users/ben/src/libgit2/tests/resour
+ */
+- test_object("HEAD@{10 years ago}", NULL);
++ test_object("HEAD@{11 years ago}", NULL);
+
+ test_object("HEAD@{1 second}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
+ test_object("HEAD@{1 second ago}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");