84 lines
2.5 KiB
Bash
84 lines
2.5 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=libgit2
|
|
pkgver=1.7.2
|
|
pkgrel=01
|
|
epoch=1
|
|
pkgdesc="A linkable library for Git"
|
|
url="https://github.com/libgit2/libgit2"
|
|
depends=(gcc-libs glibc http-parser zlib)
|
|
makedepends=(cmake libssh2 openssl python pcre2)
|
|
provides=(libgit2.so)
|
|
source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
|
|
|
|
#prepare() {
|
|
# add missing include needed when registering custom transports: https://github.com/libgit2/libgit2/issues/6607
|
|
# patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-1.7.0-git_oidarray_include.patch
|
|
# make reuse of grafts "safe"
|
|
# patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-1.7.0-cleanup_grafts.patch
|
|
#}
|
|
|
|
build() {
|
|
local cmake_options=(
|
|
-B build
|
|
-DCMAKE_BUILD_TYPE=None
|
|
-DCMAKE_INSTALL_PREFIX=/usr
|
|
-DREGEX_BACKEND=pcre2
|
|
-DUSE_HTTP_PARSER=system
|
|
-DUSE_SSH=ON
|
|
-S $pkgname-$pkgver
|
|
-Wno-dev
|
|
)
|
|
|
|
cmake "${cmake_options[@]}"
|
|
cmake --build build --verbose
|
|
}
|
|
|
|
check() {
|
|
local ignored_tests=(
|
|
'invasive|'
|
|
'online|'
|
|
'ssh|'
|
|
'network_url_parse__hostname_implied_root_empty_port|'
|
|
'network_url_parse__hostname_empty_port|'
|
|
'network_url_parse__ipv4_implied_root_empty_port|'
|
|
'network_url_parse__ipv4_empty_port|'
|
|
'network_url_parse__ipv6_implied_root_empty_port|'
|
|
'network_url_parse__ipv6_empty_port'
|
|
)
|
|
local ifs="$IFS"
|
|
IFS=
|
|
# NOTE: disable tests requiring the internet, relying on non-existent
|
|
# resources, or those that are only compatible with the (modified) vendored
|
|
# version of http-parser, but not with upstream http-parser
|
|
ctest --test-dir build --output-on-failure -E "${ignored_tests[*]}"
|
|
IFS="$ifs"
|
|
}
|
|
|
|
package() {
|
|
depends+=(
|
|
libssh2 libssh2.so
|
|
openssl libcrypto.so libssl.so
|
|
pcre2 libpcre2-8.so
|
|
)
|
|
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
install -vDm 644 $pkgname-$pkgver/{AUTHORS,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
|
|
install -vDm 644 $pkgname-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=(LicenseRef-GPL-2.0-only-with-linking-exception)
|
|
|
|
sha256sums=(de384e29d7efc9330c6cdb126ebf88342b5025d920dcb7c645defad85195ea7f) # libgit2-v1.7.2.tar.gz
|
|
|
|
## 3da3397fa99dd263de07d279cf64bd8d6ebe467e2bde8d14824022ebdb73448a libgit2-1_1.7.2-01-x86_64.pkg.tar.lz
|
|
|