termux-packages/packages/libelf/build.sh

37 lines
1.3 KiB
Bash
Raw Normal View History

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"
TERMUX_PKG_MAINTAINER="@termux"
2022-03-11 13:01:50 +01:00
TERMUX_PKG_VERSION=0.186
TERMUX_PKG_SRCURL="https://sourceware.org/elfutils/ftp/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2"
2022-03-11 13:01:50 +01:00
TERMUX_PKG_SHA256=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177
2016-05-04 23:05:15 +02:00
# libandroid-support for langinfo.
TERMUX_PKG_DEPENDS="libandroid-support, zlib, libcurl"
TERMUX_PKG_BUILD_DEPENDS="argp, zstd, liblzma, libmicrohttpd, libsqlite, libarchive, libbz2"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_c99=yes --disable-symbol-versioning"
TERMUX_PKG_CONFLICTS="libelf-dev"
TERMUX_PKG_REPLACES="libelf-dev"
TERMUX_PKG_BUILD_IN_SRC=true
2015-06-13 01:03:31 +02:00
2016-09-04 00:45:08 +02:00
termux_step_pre_configure() {
CXXFLAGS+=" -Wno-unused-const-variable"
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
# Exposes ACCESSPERMS in <sys/stat.h> which elfutils uses
2016-09-04 00:45:08 +02:00
CFLAGS+=" -D__USE_BSD"
2016-05-04 21:31:11 +02:00
2017-12-10 01:21:26 +01:00
CFLAGS+=" -DFNM_EXTMATCH=0"
if [ "$TERMUX_ARCH" = "arm" ]; then
CFLAGS="${CFLAGS/-Oz/-O1}"
fi
2017-01-18 10:33:46 +01:00
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
cp -r $TERMUX_PKG_BUILDER_DIR/search src/
autoreconf -ivf
}