| 1 | TERMUX_PKG_VERSION=0.166 |
| 2 | TERMUX_PKG_HOMEPAGE=https://fedorahosted.org/elfutils/ |
| 3 | TERMUX_PKG_DESCRIPTION="ELF object file access library" |
| 4 | TERMUX_PKG_SRCURL=https://fedorahosted.org/releases/e/l/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2 |
| 5 | # libandroid-support for langinfo. |
| 6 | TERMUX_PKG_DEPENDS="libandroid-support, liblzma, libbz2" |
| 7 | # Use "eu-" as program prefix to avoid conflict with binutils programs. |
| 8 | # This is what several linux distributions do. |
| 9 | TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--program-prefix='eu-'" |
| 10 | # The ar.c file is patched away for now: |
| 11 | TERMUX_PKG_RM_AFTER_INSTALL="bin/eu-ar" |
| 12 | |
| 13 | LDFLAGS+=" -lintl" |
| 14 | CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1 -Wno-error=unused-value -Wno-error=format-nonliteral -Wno-error" |
| 15 | |
| 16 | # Exposes ACCESSPERMS in <sys/stat.h> which elfutils uses: |
| 17 | CFLAGS+=" -D__USE_BSD" |
| 18 | |
| 19 | termux_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 | ORIG_CFLAGS="$CFLAGS" |
| 30 | CFLAGS+=" -std=gnu89" |
| 31 | ./configure --host=$TERMUX_HOST_PLATFORM |
| 32 | make |
| 33 | CFLAGS="$ORIG_CFLAGS" |
| 34 | |
| 35 | cp $TERMUX_PKG_BUILDER_DIR/error.h . |
| 36 | cp $TERMUX_PKG_BUILDER_DIR/stdio_ext.h . |
| 37 | cp $TERMUX_PKG_BUILDER_DIR/obstack.h . |
| 38 | cp $TERMUX_PKG_BUILDER_DIR/qsort_r.h . |
| 39 | |
| 40 | LDFLAGS+=" -L$TERMUX_PKG_TMPDIR/argp-standalone-1.3" |
| 41 | CPPFLAGS+=" -isystem $TERMUX_PKG_TMPDIR/argp-standalone-1.3" |
| 42 | } |