summaryrefslogtreecommitdiff
path: root/repo/elfutils/elfutils.xibuild
blob: 43eb821b3712a065de07cba48186c83d6ab61369 (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
52
53
54
#!/bin/sh

MAKEDEPS="bison flex zlib bzip2 xz argp-standalone libtool musl-obstack"
DEPS="musl zlib"

PKG_VER=0.187
SOURCE=https://sourceware.org/elfutils/ftp/$PKG_VER/elfutils-$PKG_VER.tar.bz2
ADDITIONAL="
        error.h
        fix-aarch64_fregs.patch
        fix-uninitialized.patch
        musl-macros.patch
        musl-strndupa.patch
        musl-asm-ptrace-h.patch
"

DESC="Utilities and DSOs to handle ELF files and DWARF data"

prepare () {
    apply_patches 

    cp error.h lib
	cp error.h src

	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 \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-werror \
		--program-prefix=eu- \
		--enable-deterministic-archives \
		--disable-nls \
		--disable-libdebuginfod \
		--disable-debuginfod
    make
}

package() {
    make DESTDIR=$PKG_DEST install
    rm -r "$PKG_DEST"/usr/lib/libelf.so.*
    rm -r "$PKG_DEST"/usr/include/libelf.h
}