summaryrefslogtreecommitdiff
path: root/system/bison/APKBUILD
blob: 0130a203832943c9604a5ef6bec5fdccc3b8aa07 (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
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=bison
pkgver=3.7.2
pkgrel=0
pkgdesc="The GNU general-purpose parser generator"
arch="all"
# iconv issue:
# https://lists.gnu.org/archive/html/bug-bison/2020-07/msg00001.html
# https://www.openwall.com/lists/musl/2020/07/29/2
options="!check"  # see above
license="GPL-3.0+"
url="https://www.gnu.org/software/bison/bison.html"
depends="m4"
checkdepends="bison flex musl-locales"
makedepends="perl"
provider_priority=1
subpackages="$pkgname-doc $pkgname-lang"
source="https://ftp.gnu.org/gnu/bison/${pkgname}-${pkgver}.tar.xz"

# secfixes:
#   3.7-r0:
#     - CVE-2020-24240
#   3.5.4-r0:
#     - CVE-2020-14150

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man
	make
}

check() {
	# Work around for Bison 3.4.x test failure
	for _calc in calc lexcalc mfcalc reccalc rpcalc; do
		make -j1 examples/c/$_calc/$_calc
	done
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
}

sha512sums="42eb501c246e9b4b24cb212c8da538b11b1944b997314105e67f88f22d73b7d00cf19b21e086aa7523630a2a24e1fd70a89d85a7e3003783990e08d31f711a27  bison-3.7.2.tar.xz"