dash: Update from 0.5.9 to 0.5.9.1
[termux-packages] / packages / elfutils / build.sh
index 18e6435..de81e4c 100644 (file)
@@ -10,13 +10,13 @@ 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"
 
-LDFLAGS+=" -lintl"
-CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1 -Wno-error=unused-value -Wno-error=format-nonliteral -Wno-error"
+termux_step_pre_configure() {
+       LDFLAGS+=" -lintl"
+       CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1 -Wno-error=unused-value -Wno-error=format-nonliteral -Wno-error"
 
-# Exposes ACCESSPERMS in <sys/stat.h> which elfutils uses:
-CFLAGS+=" -D__USE_BSD"
+       # Exposes ACCESSPERMS in <sys/stat.h> which elfutils uses:
+       CFLAGS+=" -D__USE_BSD"
 
-termux_step_pre_configure () {
         # Install argp lib.
         ARGP_FILE=$TERMUX_PKG_CACHEDIR/argp-standalone.1.3.tar.gz
         if [ ! -f $ARGP_FILE ]; then
@@ -26,8 +26,11 @@ termux_step_pre_configure () {
         cd $TERMUX_PKG_TMPDIR
         tar xf $ARGP_FILE
         cd argp-standalone-1.3
+       ORIG_CFLAGS="$CFLAGS"
+       CFLAGS+=" -std=gnu89"
         ./configure --host=$TERMUX_HOST_PLATFORM
         make
+       CFLAGS="$ORIG_CFLAGS"
 
         cp $TERMUX_PKG_BUILDER_DIR/error.h .
         cp $TERMUX_PKG_BUILDER_DIR/stdio_ext.h .
@@ -37,12 +40,3 @@ termux_step_pre_configure () {
         LDFLAGS+=" -L$TERMUX_PKG_TMPDIR/argp-standalone-1.3"
         CPPFLAGS+=" -isystem $TERMUX_PKG_TMPDIR/argp-standalone-1.3"
 }
-
-#termux_step_post_make_install () {
-#make install-includeHEADERS
-#}
-
-termux_step_post_massage () {
-        # Remove to avoid spurios linking to libelf (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=10648):
-        rm -f $TERMUX_PREFIX/lib/libelf*
-}