2019-06-21 09:09:56 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2020-08-01 07:47:54 -06:00
|
|
|
# Build sometimes forces -Werror.
|
|
|
|
export CFLAGS="$CFLAGS -Wno-error"
|
|
|
|
|
2021-07-03 03:30:18 -06:00
|
|
|
# Disable configure error for missing argp/fts/obstack.
|
2021-07-03 15:09:35 -06:00
|
|
|
sed 's/as_fn_error.*\(argp\|fts\|_obstack\)/: "/g' configure > _
|
|
|
|
mv -f _ configure
|
|
|
|
chmod +x configure
|
2019-06-21 09:09:56 -06:00
|
|
|
|
2020-08-01 04:27:23 -06:00
|
|
|
# Don't compile two unrelated C files which require argp.
|
2021-07-03 15:09:35 -06:00
|
|
|
sed 's/color.*printversion../#/g' lib/Makefile.in > _
|
|
|
|
mv -f _ lib/Makefile.in
|
2020-05-26 05:17:16 -06:00
|
|
|
|
2020-08-01 04:27:23 -06:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--disable-symbol-versioning \
|
|
|
|
--disable-debuginfod \
|
2021-07-11 18:38:43 -06:00
|
|
|
--disable-libdebuginfod \
|
2020-10-14 04:25:51 -06:00
|
|
|
--disable-nls \
|
|
|
|
ac_cv_c99=yes # Override check for Clang.
|
2020-05-26 05:17:16 -06:00
|
|
|
|
2020-08-01 04:27:23 -06:00
|
|
|
# Skip the default make target and build only what we need.
|
|
|
|
make -C lib
|
|
|
|
make -C libelf
|
|
|
|
make -C libelf DESTDIR="$1" install
|
2021-07-11 18:38:43 -06:00
|
|
|
make -C doc DESTDIR="$1" install-man3
|
2020-09-11 15:58:15 -06:00
|
|
|
|
|
|
|
mkdir -p "$1/usr/lib/pkgconfig"
|
|
|
|
cp -f config/libelf.pc "$1/usr/lib/pkgconfig/libelf.pc"
|