aboutsummaryrefslogtreecommitdiffstats
path: root/main/elfutils/APKBUILD
blob: aad47bcb6152feeee26bcaffffc2af5eab49e01e (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=elfutils
pkgver=0.182
pkgrel=1
pkgdesc="Utilities and DSOs to handle ELF files and DWARF data"
url="http://elfutils.org/"
arch="all"
license="GPL-3.0-or-later AND (GPL-2.0-or-later OR LGPL-3.0-or-later)"
makedepends="bison flex-dev zlib-dev bzip2-dev xz-dev argp-standalone
	bsd-compat-headers autoconf automake libtool fts-dev musl-obstack-dev
	linux-headers"
subpackages="libelf libelf-static $pkgname-dev $pkgname-doc"
source="https://sourceware.org/elfutils/ftp/$pkgver/elfutils-$pkgver.tar.bz2
	error.h
	fix-aarch64_fregs.patch
	fix-uninitialized.patch
	musl-fts-obstack.patch
	musl-macros.patch
	musl-qsort_r.patch
	musl-strerror_r.patch
	musl-strndupa.patch
	musl-asm-ptrace-h.patch
	"

# secfixes:
#   0.176-r0:
#     - CVE-2019-7146
#     - CVE-2019-7148
#     - CVE-2019-7149
#     - CVE-2019-7150
#     - CVE-2019-7664
#     - CVE-2019-7665
#   0.175-r0:
#     - CVE-2019-18310
#     - CVE-2019-18520
#     - CVE-2019-18521
#   0.174-r0:
#     - CVE-2019-16062
#     - CVE-2019-16402
#     - CVE-2019-16403
#   0.168-r1:
#     - CVE-2017-7607
#     - CVE-2017-7608

prepare() {
	default_prepare

	cp "$srcdir"/error.h "$builddir"/lib
	cp "$srcdir"/error.h "$builddir"/src

	autoreconf -vif

	cat > lib/libintl.h <<-EOF
		#ifndef LIBINTL_H
		#define LIBINTL_H
		#define _(x) (x)
		#endif
	EOF
}

build() {
	CFLAGS="$CFLAGS -Wno-error -Wno-null-dereference" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-werror \
		--program-prefix=eu- \
		--enable-deterministic-archives \
		--disable-nls \
		--disable-libdebuginfod \
		--disable-debuginfod
	# for now we only build libelf
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

libelf() {
	replaces="$pkgname-libelf"
	provides="$pkgname-libelf=$pkgver-r$pkgrel"

	pkgdesc="$pkgdesc - runtime libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/*-*.so "$subpkgdir"/usr/lib/
}

sha512sums="8ab0735bbe11b4383169341bf674ace360038b6ae5239f1d5a991c46260cd4bce545e078735b7de3b8fab132bb5da41f60689ff1b1d7ebccfada117a954a2c81  elfutils-0.182.tar.bz2
8b650bc78cea66f30f0ff66357005890ac8a1b04a8dcc50209cb10a4b4c5ede849505cb68463beca8316ace0fbd53bbc484cfb597805b55616f3b3fc2b864e9a  error.h
c3676b0b8b40d6e437f5d88c0d658dc0829ec97d1955e4bbf96f4cff9ee9001b8f2f06174450ae7aa5858b91c7905bdbd49073b561c346416132338a9c94731b  fix-aarch64_fregs.patch
b9ba55e1b56a8abf694b6d02f022d9a3a0ae6ab53a8c4a71e49552e32411ef410d3a7512fbd1a729696bc2046ac11586829816f0fa3b8226ee77c9dc4b741e58  fix-uninitialized.patch
3b9fb4ebb5b33d4c7fb1e1f7e476a3ea4eba796bd9c89b9c920ef8c879638fb70abb1d83a0039b5b95558ba9597fb9cdb0fd6983498a11bb8dbdd50738c925c8  musl-fts-obstack.patch
952109b1e0a2ccf435f5a7825ca3514d526161dae32e3d734f93d76b5693c469a889a488cb05cf423a006e9df550e7aae68697cc09d2c48fee1acd38163e5750  musl-macros.patch
ce1a25387865ff96ecc5104810acc225dd64c28571ee5473ab732f7b63b927e4a260ebe74f17d3d8ba0c917cce233b9f902dd35c149d6d8317eecbc71f8d2da6  musl-qsort_r.patch
a0d986100c8ff2ef0595645ec1b2eeb1d517b7442aef5f349ebf27fcb66c76e51fadeda25bed5f04b4bb16a61aa23ac6e86a1f34a0087d2136acf0f64c3fa4d1  musl-strerror_r.patch
1728376b8408e9ae97f048d54bc6faae889bca197cc0500a952e64683835dfca66465aa4bce8e57d1ce7a81dcba0bbeeb4bd1e1026d3c4bd196ef4ffe536a509  musl-strndupa.patch
7c529f88dc248f657a8d690044560c20a222c5b37d0d7dcb057bf2eea8938c406cccd6129bce19542088511a026b233234c9a83933a525c4691810be9ca712bf  musl-asm-ptrace-h.patch"