aboutsummaryrefslogtreecommitdiffstats
path: root/main/diffutils/APKBUILD
blob: 0b9d0c1a93f53b9dbedd68688678470db0c1c7cb (plain)
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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=diffutils
pkgver=3.7
pkgrel=0
pkgdesc="Show differences among files"
subpackages="$pkgname-doc"
url="https://www.gnu.org/software/diffutils/"
arch="all"
license="GPL-3.0-or-later"
source="https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.xz
	disable-mbrtowc-test.patch
	"
builddir=$srcdir/$pkgname-$pkgver
options="!check"	# fails on hardened kernels

prepare() {
	cd "$builddir"
	default_prepare

	# fix eglibc-2.16 build issue
	sed -i -e '/gets is a/d' \
		lib/stdio.in.h
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls
	make
}

check() {
	cd "$builddir"
	make check
}

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

	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
}

sha512sums="7b12cf8aea1b9844773748f72272d9c6a38adae9c3c3a8c62048f91fb56c60b76035fa5f51665dceaf2cfbf1d1f4a3efdcc24bf47a5a16ff4350543314b12c9c  diffutils-3.7.tar.xz
2602dabf0ac52a273b84160032416613da7ad111541fe25466cf9d4ce1eb2630f0ba0cb0b3013967965d8359a11a5f390f0486b4526b35516d9de1c8975f720d  disable-mbrtowc-test.patch"