2017-03-06 00:06:11 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://sourceware.org/elfutils/
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="ELF object file access library"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2018-08-17 21:32:56 +02:00
|
|
|
# NOTE: We only build the libelf part of elfutils for now,
|
|
|
|
# as other parts are not clang compatible.
|
2020-09-28 20:20:22 +02:00
|
|
|
TERMUX_PKG_VERSION=0.181
|
2018-09-22 21:27:43 +02:00
|
|
|
TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2
|
2020-09-28 20:20:22 +02:00
|
|
|
TERMUX_PKG_SHA256=29a6ad7421ec2acfee489bb4a699908281ead2cb63a20a027ce8804a165f0eb3
|
2016-05-04 23:05:15 +02:00
|
|
|
# libandroid-support for langinfo.
|
2020-09-28 20:20:22 +02:00
|
|
|
TERMUX_PKG_DEPENDS="libandroid-support, zlib, libcurl"
|
2018-09-22 21:27:43 +02:00
|
|
|
TERMUX_PKG_BUILD_DEPENDS="argp"
|
2019-12-12 21:42:44 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_c99=yes --disable-symbol-versioning --disable-debuginfod"
|
2019-07-20 10:42:33 +02:00
|
|
|
TERMUX_PKG_CONFLICTS="elfutils, libelf-dev"
|
|
|
|
TERMUX_PKG_REPLACES="elfutils, libelf-dev"
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2016-09-04 00:45:08 +02:00
|
|
|
termux_step_pre_configure() {
|
2017-07-09 23:35:21 +02:00
|
|
|
CFLAGS+=" -Wno-error=unused-value -Wno-error=format-nonliteral -Wno-error"
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2016-09-04 00:45:08 +02:00
|
|
|
# Exposes ACCESSPERMS in <sys/stat.h> which elfutils uses:
|
|
|
|
CFLAGS+=" -D__USE_BSD"
|
2016-05-04 21:31:11 +02:00
|
|
|
|
2017-12-10 01:21:26 +01:00
|
|
|
CFLAGS+=" -DFNM_EXTMATCH=0"
|
|
|
|
|
2019-09-11 00:31:44 +02:00
|
|
|
if [ "$TERMUX_ARCH" = "arm" ]; then
|
|
|
|
CFLAGS="${CFLAGS/-Oz/-O1}"
|
|
|
|
fi
|
|
|
|
|
2017-01-18 10:33:46 +01:00
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/error.h .
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/stdio_ext.h .
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/obstack.h .
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/qsort_r.h .
|
2019-05-29 08:28:03 +02:00
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/aligned_alloc.c libelf
|
2019-09-11 00:31:44 +02:00
|
|
|
autoreconf -if
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|
2018-08-17 21:32:56 +02:00
|
|
|
|
|
|
|
termux_step_make() {
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C lib
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libelf
|
2020-06-20 19:05:31 +02:00
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libdwfl
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libebl
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C backends
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libcpu
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libdwelf
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libdw
|
2018-08-17 21:32:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libelf install
|
2020-06-20 19:05:31 +02:00
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libdwfl install
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libdw install
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES -C libasm install
|
|
|
|
make install-pkgincludeHEADERS
|
|
|
|
make -C config install
|
2018-08-17 21:32:56 +02:00
|
|
|
}
|