2022-04-13 23:51:42 +02:00
|
|
|
#!/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
|
2023-03-22 01:18:43 +01:00
|
|
|
pkgver=1.6.3
|
2023-03-19 18:07:05 +01:00
|
|
|
pkgrel=01
|
2022-04-13 23:51:42 +02:00
|
|
|
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)
|
2022-04-13 23:51:42 +02:00
|
|
|
provides=(libgit2.so)
|
2023-03-19 18:07:05 +01:00
|
|
|
source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
|
|
|
|
# $pkgname-1.5.0-remove_http-parse_incompatible_tests.patch)
|
2022-04-13 23:51:42 +02:00
|
|
|
|
2023-03-19 18:07:05 +01:00
|
|
|
#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
|
|
|
|
#}
|
2022-04-13 23:51:42 +02:00
|
|
|
|
|
|
|
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-03-19 18:07:05 +01:00
|
|
|
|
2023-01-22 15:03:17 +01:00
|
|
|
cmake "${cmake_options[@]}"
|
|
|
|
cmake --build build --verbose
|
2022-04-13 23:51:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2023-03-19 18:07:05 +01:00
|
|
|
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"
|
2022-04-13 23:51:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2023-01-22 15:03:17 +01:00
|
|
|
depends+=(
|
|
|
|
libssh2 libssh2.so
|
|
|
|
openssl libcrypto.so libssl.so
|
|
|
|
pcre2 libpcre2-8.so
|
|
|
|
)
|
2022-04-13 23:51:42 +02:00
|
|
|
|
2022-08-25 20:47:01 +02:00
|
|
|
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/"
|
2022-04-13 23:51:42 +02:00
|
|
|
}
|
|
|
|
|
2023-03-19 18:07:05 +01:00
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
|
|
|
|
arch=(x86_64)
|
2022-07-14 11:54:22 +02:00
|
|
|
|
2022-04-13 23:51:42 +02:00
|
|
|
license=(GPL2)
|
|
|
|
|
2023-03-19 18:07:05 +01:00
|
|
|
|
2023-03-22 01:18:43 +01:00
|
|
|
sha512sums=('5a390030395d5e00217ca3229ff1374f064b41c7c14c332618778af7067c378bca5ffee5c072ad144a71126f7e8cfcd770746b6af8eccf086c8a8b8afa1733f1')
|
|
|
|
b2sums=('c0a588e962c182c09b91e257760484bc0ebf2ab07fdd89b7b90db1dd6749d7fb65b8e3fcd20e8a46a6381038aeac8759161dc409be36eadc776a55d74290e59c')
|
2023-03-19 18:07:05 +01:00
|
|
|
|
2023-03-22 01:18:43 +01:00
|
|
|
sha256sums=(a8e2a09835eabb24ace2fd597a78af182e1e199a894e99a90e4c87c849fcd9c4) # libgit2-v1.6.3.tar.gz
|
2022-08-25 20:47:01 +02:00
|
|
|
|
2023-03-22 01:18:43 +01:00
|
|
|
## b30be1500cdf171ad95a2165098a47038ffabbecf2d57344d0ae392f02cfc4f8 libgit2-1:1.6.3-01-x86_64.pkg.tar.lz
|
2023-01-22 15:03:17 +01:00
|
|
|
|