termux-packages/packages/elfutils/build.sh

44 lines
1.6 KiB
Bash
Raw Normal View History

2017-01-15 01:36:15 +01:00
TERMUX_PKG_VERSION=0.168
2015-06-13 01:03:31 +02:00
TERMUX_PKG_HOMEPAGE=https://fedorahosted.org/elfutils/
TERMUX_PKG_DESCRIPTION="ELF object file access library"
TERMUX_PKG_SRCURL=https://fedorahosted.org/releases/e/l/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2
2016-05-04 23:05:15 +02:00
# libandroid-support for langinfo.
TERMUX_PKG_DEPENDS="libandroid-support, liblzma, libbz2"
TERMUX_PKG_CLANG=no
2016-05-04 21:31:11 +02:00
# Use "eu-" as program prefix to avoid conflict with binutils programs.
# This is what several linux distributions do.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--program-prefix='eu-'"
# The ar.c file is patched away for now:
TERMUX_PKG_RM_AFTER_INSTALL="bin/eu-ar"
2015-06-13 01:03:31 +02:00
2016-09-04 00:45:08 +02:00
termux_step_pre_configure() {
LDFLAGS+=" -lintl"
CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1 -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
# Install argp lib.
ARGP_FILE=$TERMUX_PKG_CACHEDIR/argp-standalone.1.3.tar.gz
if [ ! -f $ARGP_FILE ]; then
curl -o $ARGP_FILE http://www.lysator.liu.se/~nisse/archive/argp-standalone-1.3.tar.gz
fi
cd $TERMUX_PKG_TMPDIR
tar xf $ARGP_FILE
cd argp-standalone-1.3
2016-05-18 22:47:18 +02:00
ORIG_CFLAGS="$CFLAGS"
CFLAGS+=" -std=gnu89"
2016-05-04 21:31:11 +02:00
./configure --host=$TERMUX_HOST_PLATFORM
make
2016-05-18 22:47:18 +02:00
CFLAGS="$ORIG_CFLAGS"
2015-06-13 01:03:31 +02:00
2016-05-04 21:31:11 +02: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 .
LDFLAGS+=" -L$TERMUX_PKG_TMPDIR/argp-standalone-1.3"
CPPFLAGS+=" -isystem $TERMUX_PKG_TMPDIR/argp-standalone-1.3"
2015-06-13 01:03:31 +02:00
}