repo/extra/libelf/build

27 lines
645 B
Plaintext
Raw Normal View History

2019-06-21 15:09:56 +00:00
#!/bin/sh -e
patch -p1 < musl-decls.patch
2019-07-06 14:04:12 +00:00
# Build sometimes forces -Werror.
export CFLAGS="$CFLAGS -Wno-error"
# Disable configure error for missing argp.
sed -i 's/as_fn_error.*libargp/: "/g' configure
2019-06-21 15:09:56 +00:00
# Don't compile two unrelated C files which require argp.
sed -i 's/color.*printversion../#/g' lib/Makefile.in
2020-05-26 11:17:16 +00:00
./configure \
--prefix=/usr \
--disable-symbol-versioning \
--disable-debuginfod \
--disable-nls
2020-05-26 11:17:16 +00:00
# Skip the default make target and build only what we need.
make -C lib
make -C libelf
make -C libelf DESTDIR="$1" install
mkdir -p "$1/usr/lib/pkgconfig"
cp -f config/libelf.pc "$1/usr/lib/pkgconfig/libelf.pc"