libelf: Rename to sensible elfutils
[termux-packages] / packages / elfutils / build.sh
CommitLineData
cf310881 1TERMUX_PKG_VERSION=0.166
59f0d218
FF
2TERMUX_PKG_HOMEPAGE=https://fedorahosted.org/elfutils/
3TERMUX_PKG_DESCRIPTION="ELF object file access library"
4TERMUX_PKG_SRCURL=https://fedorahosted.org/releases/e/l/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2
cf310881
FF
5# For langinfo:
6TERMUX_PKG_DEPENDS="libandroid-support"
7# Use "eu-" as program prefix to avoid conflict with binutils programs.
8# This is what several linux distributions do.
9TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--program-prefix='eu-'"
10# The ar.c file is patched away for now:
11TERMUX_PKG_RM_AFTER_INSTALL="bin/eu-ar"
59f0d218
FF
12
13LDFLAGS+=" -lintl"
cf310881 14CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1 -Wno-error=unused-value -Wno-error=format-nonliteral -Wno-error"
59f0d218 15
cf310881
FF
16# Exposes ACCESSPERMS in <sys/stat.h> which elfutils uses:
17CFLAGS+=" -D__USE_BSD"
18
19termux_step_pre_configure () {
20 # Install argp lib.
21 ARGP_FILE=$TERMUX_PKG_CACHEDIR/argp-standalone.1.3.tar.gz
22 if [ ! -f $ARGP_FILE ]; then
23 curl -o $ARGP_FILE http://www.lysator.liu.se/~nisse/archive/argp-standalone-1.3.tar.gz
24 fi
25
26 cd $TERMUX_PKG_TMPDIR
27 tar xf $ARGP_FILE
28 cd argp-standalone-1.3
29 ./configure --host=$TERMUX_HOST_PLATFORM
30 make
59f0d218 31
cf310881
FF
32 cp $TERMUX_PKG_BUILDER_DIR/error.h .
33 cp $TERMUX_PKG_BUILDER_DIR/stdio_ext.h .
34 cp $TERMUX_PKG_BUILDER_DIR/obstack.h .
35 cp $TERMUX_PKG_BUILDER_DIR/qsort_r.h .
36
37 LDFLAGS+=" -L$TERMUX_PKG_TMPDIR/argp-standalone-1.3"
38 CPPFLAGS+=" -isystem $TERMUX_PKG_TMPDIR/argp-standalone-1.3"
59f0d218
FF
39}
40
cf310881
FF
41#termux_step_post_make_install () {
42#make install-includeHEADERS
43#}
44
59f0d218
FF
45termux_step_post_massage () {
46 # Remove to avoid spurios linking to libelf (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=10648):
47 rm -f $TERMUX_PREFIX/lib/libelf*
48}