From 385c8aef84c83d5ccdb9728bb9af082259ef6e68 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sat, 3 Sep 2016 17:48:41 -0400 Subject: [PATCH] Some more clang preparations --- packages/apt/build.sh | 10 +++++----- packages/autossh/build.sh | 6 ++++-- packages/busybox/build.sh | 6 ++++-- packages/cboard/build.sh | 6 ++++-- packages/nano/build.sh | 4 +++- packages/psmisc/build.sh | 4 +++- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/packages/apt/build.sh b/packages/apt/build.sh index dc9289c14..4c8bd0f78 100644 --- a/packages/apt/build.sh +++ b/packages/apt/build.sh @@ -14,13 +14,13 @@ TERMUX_PKG_FOLDERNAME=apt-${TERMUX_PKG_VERSION} TERMUX_PKG_ESSENTIAL=yes TERMUX_PKG_CONFFILES="etc/apt/sources.list" -# Some files use STD*_FILENO without including where they are declared. -# Define them here to avoid having to patch files: -CXXFLAGS+=" -DSTDIN_FILENO=0 -DSTDOUT_FILENO=1 -DSTDERR_FILENO=2 -DAI_IDN=0" - termux_step_pre_configure () { + # Some files use STD*_FILENO without including where they are declared. + # Define them here to avoid having to patch files: + CXXFLAGS+=" -DSTDIN_FILENO=0 -DSTDOUT_FILENO=1 -DSTDERR_FILENO=2 -DAI_IDN=0" + cp $TERMUX_COMMON_CACHEDIR/config.{guess,sub} $TERMUX_PKG_SRCDIR/buildlib - perl -p -i -e "s/TERMUX_ARCH/$TERMUX_ARCH/" $TERMUX_PKG_SRCDIR/configure + perl -p -i -e "s/TERMUX_ARCH/$TERMUX_ARCH/" $TERMUX_PKG_SRCDIR/configure rm $TERMUX_PKG_SRCDIR/apt-pkg/{cdrom.cc,indexcopy.cc} } diff --git a/packages/autossh/build.sh b/packages/autossh/build.sh index 2fc22c4f5..be5bd787d 100644 --- a/packages/autossh/build.sh +++ b/packages/autossh/build.sh @@ -6,5 +6,7 @@ TERMUX_PKG_BUILD_IN_SRC="yes" TERMUX_PKG_DEPENDS="openssh" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--mandir=$TERMUX_PREFIX/share/man ac_cv_path_ssh=$TERMUX_PREFIX/bin/ssh" -# For syslog logging: -LDFLAGS+=" -llog" +termux_step_pre_configure () { + # For syslog logging: + LDFLAGS+=" -llog" +} diff --git a/packages/busybox/build.sh b/packages/busybox/build.sh index 169c361e5..63dc4f564 100755 --- a/packages/busybox/build.sh +++ b/packages/busybox/build.sh @@ -11,7 +11,9 @@ TERMUX_PKG_CONFLICTS="coreutils (<< 8.25-4)" # NOTE: sed on mac does not work for building busybox, install gnu-sed with # homebrew using the --with-default-names option. -CFLAGS+=" -llog -DTERMUX_EXPOSE_MEMPCPY=1" # Android system liblog.so for syslog +termux_step_pre_configure () { + CFLAGS+=" -llog -DTERMUX_EXPOSE_MEMPCPY=1" # Android system liblog.so for syslog +} termux_step_configure () { # Bug in gold linker with busybox in android r10e: @@ -35,7 +37,7 @@ termux_step_post_make_install () { cd $TERMUX_PREFIX/bin/applets for f in `cat $TERMUX_PKG_SRCDIR/busybox.links`; do ln -s ../busybox `basename $f`; done - # The 'ash' and 'env' applets are special in that they go into $PREFIX/bin: + # The 'ash' and 'env' applets are special in that they go into $PREFIX/bin: cd $TERMUX_PREFIX/bin ln -f -s busybox ash ln -f -s busybox env diff --git a/packages/cboard/build.sh b/packages/cboard/build.sh index 9f354fb0b..340480aa1 100644 --- a/packages/cboard/build.sh +++ b/packages/cboard/build.sh @@ -4,5 +4,7 @@ TERMUX_PKG_VERSION=0.7.3 TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/c-board/${TERMUX_PKG_VERSION}/cboard-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_DEPENDS="libandroid-support,libandroid-glob,gnuchess, ncurses, ncurses-ui-libs" -CFLAGS+=" -DLINE_MAX=_POSIX2_LINE_MAX" -LDFLAGS+=" -landroid-glob" +termux_step_pre_configure () { + CFLAGS+=" -DLINE_MAX=_POSIX2_LINE_MAX" + LDFLAGS+=" -landroid-glob" +} diff --git a/packages/nano/build.sh b/packages/nano/build.sh index 699ee8f29..ef776562e 100644 --- a/packages/nano/build.sh +++ b/packages/nano/build.sh @@ -7,7 +7,9 @@ TERMUX_PKG_DEPENDS="libandroid-support,libandroid-glob,ncurses" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-utf8 --disable-libmagic" TERMUX_PKG_RM_AFTER_INSTALL="bin/rnano share/man/man1/rnano.1 share/nano/man-html" -LDFLAGS+=" -landroid-glob" +termux_step_pre_configure() { + LDFLAGS+=" -landroid-glob" +} termux_step_post_make_install () { # Configure nano to use syntax highlighting: diff --git a/packages/psmisc/build.sh b/packages/psmisc/build.sh index aa099a61f..a2b6a842c 100644 --- a/packages/psmisc/build.sh +++ b/packages/psmisc/build.sh @@ -5,4 +5,6 @@ TERMUX_PKG_VERSION=22.21 TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/psmisc/psmisc/psmisc-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_RM_AFTER_INSTALL="bin/pstree.x11" -CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1" +termux_step_pre_configure() { + CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1" +}