aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-10-15 22:05:48 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-10-16 01:21:31 +0000
commit6425be941961881e542ff2604ea869f94f51c0a8 (patch)
tree4fafaa68425f75f28f8d1173bc020b7649edbd24
parent79acd0e4a4826807e7092966a274defa1b59748c (diff)
downloadaports-6425be941961881e542ff2604ea869f94f51c0a8.tar.gz
aports-6425be941961881e542ff2604ea869f94f51c0a8.tar.bz2
aports-6425be941961881e542ff2604ea869f94f51c0a8.tar.xz
community/libgit2-1.0: new aport
https://libgit2.org/ linkable library for Git
-rw-r--r--community/libgit2-1.0/APKBUILD80
1 files changed, 80 insertions, 0 deletions
diff --git a/community/libgit2-1.0/APKBUILD b/community/libgit2-1.0/APKBUILD
new file mode 100644
index 0000000000..aca6e9bf17
--- /dev/null
+++ b/community/libgit2-1.0/APKBUILD
@@ -0,0 +1,80 @@
+# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Contributor: Pierre-Gilas MILLON <pgmillon@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libgit2-1.0
+pkgver=1.0.1
+pkgrel=1
+pkgdesc="linkable library for Git"
+url="https://libgit2.org/"
+arch="all"
+license="GPL-2.0-only WITH GCC-exception-2.0"
+depends_dev="curl-dev libssh2-dev http-parser-dev"
+makedepends="$depends_dev python3 cmake zlib-dev openssl-dev pcre-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/libgit2/libgit2/archive/v$pkgver.tar.gz
+ "
+builddir="$srcdir/libgit2-$pkgver"
+
+# secfixes:
+# 0.28.4-r0:
+# - CVE-2019-1348
+# - CVE-2019-1349
+# - CVE-2019-1350
+# - CVE-2019-1351
+# - CVE-2019-1352
+# - CVE-2019-1353
+# - CVE-2019-1354
+# - CVE-2019-1387
+# 0.27.4-r0:
+# - CVE-2018-15501
+# 0.27.3-r0:
+# - CVE-2018-10887
+# - CVE-2018-10888
+# 0.25.1-r0:
+# - CVE-2016-10128
+# - CVE-2016-10129
+# - CVE-2016-10130
+# 0.24.3-r0:
+# - CVE-2016-8568
+# - CVE-2016-8569
+
+prepare() {
+ default_prepare
+ mkdir -p "$builddir"/build
+ sed -i 's|/usr/bin/env python|/usr/bin/env python3|' tests/generate.py
+}
+
+build() {
+ cd "$builddir"/build
+
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DUSE_HTTP_PARSER=system \
+ -DUSE_HTTPS=OpenSSL \
+ -DREGEX_BACKEND=pcre \
+ -DUSE_BUNDLED_ZLIB=OFF \
+ -DCMAKE_C_FLAGS="$CFLAGS"
+ make
+}
+
+check() {
+ cd "$builddir"/build
+ # Test 'offline' fails on s390x, aarch64 and ppc64le
+ ctest -E offline
+}
+
+package() {
+ make -C build DESTDIR="$pkgdir" install
+
+ # Remove everything but the library
+ local dir; for dir in \
+ usr/include \
+ usr/lib/libgit2.so \
+ usr/lib/pkgconfig; do
+ rm -rf "$pkgdir"/"$dir"
+ done
+}
+
+sha512sums="7c307822b22e3771e5e908b115600310f7901b3250287532c498003b25a5b1e007bfa23592f16ec4d83c1567a9213710526f78cab7c120316e9a8fc74c5e57a9 libgit2-1.0-1.0.1.tar.gz"