archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libgit2 / trunk / PKGBUILD
blob06de7fa341eea32d38fd77b9b36e53712cbb80ef
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
3 # Contributor: Hilton Medeiros <medeiros.hilton@gmail.com>
4 # Contributor: Dave Reisner <d@falconindy.com>
6 pkgname=libgit2
7 pkgver=1.6.4
8 pkgrel=1
9 epoch=1
10 pkgdesc="A linkable library for Git"
11 arch=(x86_64)
12 url="https://github.com/libgit2/libgit2"
13 license=(GPL2)
14 depends=(
15   gcc-libs
16   glibc
17   http-parser
18   zlib
20 makedepends=(
21   cmake
22   libssh2
23   openssl
24   pcre2
25   python
27 provides=(libgit2.so)
28 source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
29 sha512sums=('fd73df91710f19b0d6c3765c37c7f529233196da91cf4d58028a8d3840244f11df44abafabd74a8ed1cbe4826d1afd6ff9f01316d183ace0924c65e7cf0eb8d5')
30 b2sums=('103af9ea9ed1310b1066a48859bbefc162647d787519bb3df83d7ea1957cda5934537271970d3d180f91daa6edc3bbc05387d6293812f0d849dda966419d29ba')
32 build() {
33   local cmake_options=(
34     -B build
35     -DCMAKE_BUILD_TYPE=None
36     -DCMAKE_INSTALL_PREFIX=/usr
37     -DREGEX_BACKEND=pcre2
38     -DUSE_HTTP_PARSER=system
39     -DUSE_SSH=ON
40     -S $pkgname-$pkgver
41     -Wno-dev
42   )
44   cmake "${cmake_options[@]}"
45   cmake --build build --verbose
48 check() {
49   local ignored_tests=(
50     'invasive|'
51     'online|'
52     'ssh|'
53     'network_url_parse__hostname_implied_root_empty_port|'
54     'network_url_parse__hostname_empty_port|'
55     'network_url_parse__ipv4_implied_root_empty_port|'
56     'network_url_parse__ipv4_empty_port|'
57     'network_url_parse__ipv6_implied_root_empty_port|'
58     'network_url_parse__ipv6_empty_port'
59   )
60   local ifs="$IFS"
61   IFS=
62   # NOTE: disable tests requiring the internet, relying on non-existent
63   # resources, or those that are only compatible with the (modified) vendored
64   # version of http-parser, but not with upstream http-parser
65   ctest --test-dir build --output-on-failure -E "${ignored_tests[*]}"
66   IFS="$ifs"
69 package() {
70   depends+=(
71     libssh2 libssh2.so
72     openssl libcrypto.so libssl.so
73     pcre2 libpcre2-8.so
74   )
76   DESTDIR="$pkgdir" cmake --install build
77   install -vDm 644 $pkgname-$pkgver/{AUTHORS,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"