~dricottone/huttese-apk

ref: 907d9d4eb488aaed759dba26825bd2e0c102bcfc huttese-apk/sr.ht/libgit2/APKBUILD -rw-r--r-- 2.0 KiB
907d9d4e — Drew DeVault libgit2: import, add CRLF patch 5 years ago
                                                                                
907d9d4e Drew DeVault
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Pierre-Gilas MILLON <pgmillon@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgit2
pkgver=0.27.7
pkgrel=1
pkgdesc="A linkable library for Git"
url="https://libgit2.org/"
arch="all"
license="GPL-2.0-only-WITH-GCC-exception-2.0"
depends_dev="curl-dev libssh2-dev"
makedepends="$depends_dev python2 cmake zlib-dev openssl-dev"
subpackages="$pkgname-dev $pkgname-tests::noarch"
provides="$pkgname-libs"  # for backward compatibility with v3.4
replaces="$pkgname-libs"  # for backward compatibility with v3.4
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
	build-both-static-dynamic.patch
	handle-crlf-in-parse_header_start.patch
	"
options="!check" # FIXME some tests fails
builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   0.27.4-r0:
#   - CVE-2018-15501
#   0.27.3-r0:
#   - CVE-2018-10887
#   - CVE-2018-10888
#   0.25.1-r0:
#   - CVE-2016-10128
#   - CVE-2016-10129
#   - CVE-2016-10130
#   0.24.3-r0:
#   - CVE-2016-8568
#   - CVE-2016-8569

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build

	cmake .. \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_C_FLAGS="$CFLAGS"
	make
}

check() {
	cd "$builddir"/build
	make test
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

tests() {
	pkgdesc="$pkgdesc (tests)"

	mkdir -p "$subpkgdir"/usr/src/$pkgname/
	cp -a "$builddir"/tests "$subpkgdir"/usr/src/$pkgname/
}

sha512sums="de2e266939bd40bc580603539e1156906b97299523336ddc6a66c3bec26729495bef2daa2d240b83b7e011e93852381e95a4407132b0440a5aa1e1b7642c0011  libgit2-0.27.7.tar.gz
268e24554282666900a2179a368dc2569cb3bce60ffea187fd53de1bc119a85abc02cddd8be2ab607d44db793c4807acdbb49fc5d1badfc08bf382fa511d7b3e  build-both-static-dynamic.patch
c55455c9548c01cda77641ce4c0b328c9cb8fc1b5b6dd8401b50ee7665034c8382cd651db27272931f169b898de36d1cb1b6d0266369cd63664505d881e25317  handle-crlf-in-parse_header_start.patch"