jobextra/libgit2/PKGBUILD

89 lines
2.8 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.6.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)
# $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() {
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/"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(GPL2)
sha256sums=(d557fbf35557bb5df53cbf38ae0081edb4a36494ec0d19741fa673e509245f8f) # libgit2-v1.6.2.tar.gz
# 8e232d3ac6ba756d6055aaccca9d5704417fe77f53ad91898ffbe1b1439523aa) # libgit2-1.5.0-remove_http-parse_incompatible_tests.patch
sha512sums=('ef9feef36c5876776f3aa608101115c9e7a0970e6dd752851d930cb85b4b1789ed68f42700ebea51095ff54600e37c18a4de0c0678d9a4d7d4aba83668890c09')
b2sums=('7a42d8440fbe0afa24057bf53d52bcb04b4e8654f71cfa55871a7e77a150297731879d8f5be51df61ad91556656b66b102536a508cf61d9c11e8658e841fc560')
## 96218491ca5ae97b42927180990e2abe5cae04d6b11e440870f0dc8969d65a52 libgit2-1:1.6.2-01-x86_64.pkg.tar.lz