jobextra/libgit2/PKGBUILD

88 lines
2.7 KiB
Bash
Raw Normal View History

#!/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.6.3
pkgrel=01
epoch=1
pkgdesc="A linkable library for Git"
url="https://github.com/libgit2/libgit2"
2023-01-22 15:03:17 +01:00
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)
# $pkgname-1.5.0-remove_http-parse_incompatible_tests.patch)
#prepare() {
# # remove tests that are only compatible with the (modified) vendored version
# # of http-parser, but not with upstream http-parser
# patch -d $pkgname-$pkgver -Np1 -i ../$pkgname-1.5.0-remove_http-parse_incompatible_tests.patch
#}
build() {
2023-01-22 15:03:17 +01:00
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
)
2023-01-22 15:03:17 +01:00
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() {
2023-01-22 15:03:17 +01:00
depends+=(
libssh2 libssh2.so
openssl libcrypto.so libssl.so
pcre2 libpcre2-8.so
)
DESTDIR="$pkgdir" cmake --install build
2023-01-22 15:03:17 +01:00
install -vDm 644 $pkgname-$pkgver/{AUTHORS,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
2022-07-14 11:54:22 +02:00
license=(GPL2)
sha512sums=('5a390030395d5e00217ca3229ff1374f064b41c7c14c332618778af7067c378bca5ffee5c072ad144a71126f7e8cfcd770746b6af8eccf086c8a8b8afa1733f1')
b2sums=('c0a588e962c182c09b91e257760484bc0ebf2ab07fdd89b7b90db1dd6749d7fb65b8e3fcd20e8a46a6381038aeac8759161dc409be36eadc776a55d74290e59c')
sha256sums=(a8e2a09835eabb24ace2fd597a78af182e1e199a894e99a90e4c87c849fcd9c4) # libgit2-v1.6.3.tar.gz
## b30be1500cdf171ad95a2165098a47038ffabbecf2d57344d0ae392f02cfc4f8 libgit2-1:1.6.3-01-x86_64.pkg.tar.lz
2023-01-22 15:03:17 +01:00