summaryrefslogtreecommitdiff
path: root/system/libgcrypt/APKBUILD
blob: da5eb8713ac26c7325fab1402936c9518c939c82 (plain) (blame)
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
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libgcrypt
pkgver=1.10.1
pkgrel=0
pkgdesc="GnuPG cryptography library"
url="https://www.gnupg.org"
arch="all"
license="LGPL-2.1+"
depends=""
makedepends="libgpg-error-dev texinfo"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.gnupg.org/ftp/gcrypt/$pkgname/$pkgname-$pkgver.tar.bz2"

# secfixes:
#   1.10.0-r0:
#     - CVE-2021-40528
#   1.8.5-r0:
#     - CVE-2019-13627

build() {
	local _arch_configure=
	case "$CARCH" in
	arm*)
		# disable arm assembly for now as it produces TEXTRELs
		export gcry_cv_gcc_arm_platform_as_ok=no
		;;
	x86 | pmmx | x86_64)
		_arch_configure="--enable-padlock-support"
		;;
	esac

	case "$CARCH" in
	pmmx)
		# https://git.adelielinux.org/adelie/packages/-/issues/511
		_arch_configure="${_arch_configure} --disable-asm"
		;;
	esac

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static \
		$_arch_configure

	make
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
	rm -f ${pkgdir}/usr/share/info/dir
}

sha512sums="e5ca7966624fff16c3013795836a2c4377f0193dbb4ac5ad2b79654b1fa8992e17d83816569a402212dc8367a7980d4141f5d6ac282bae6b9f02186365b61f13  libgcrypt-1.10.1.tar.bz2"