bash: Update from 4.4.5 to 4.4.10
[termux-packages] / build-package.sh
index 0a05431..b015634 100755 (executable)
@@ -64,7 +64,6 @@ termux_setup_golang() {
 
        local TERMUX_GO_VERSION=go1.8rc1
        local TERMUX_GO_PLATFORM=linux-amd64
-       test "$(uname)" = "Darwin" && TERMUX_GO_PLATFORM=darwin-amd64
 
        local TERMUX_BUILDGO_FOLDER=$TERMUX_COMMON_CACHEDIR/${TERMUX_GO_VERSION}.${TERMUX_GO_PLATFORM}
        export GOROOT=$TERMUX_BUILDGO_FOLDER
@@ -211,8 +210,6 @@ termux_step_setup_variables() {
 
        export TERMUX_TAR="tar"
        export TERMUX_TOUCH="touch"
-       test "$(uname)" = "Darwin" && TERMUX_TAR=gtar
-       test "$(uname)" = "Darwin" && TERMUX_TOUCH=gtouch
        export prefix=${TERMUX_PREFIX}
        export PREFIX=${TERMUX_PREFIX}
        export PKG_CONFIG_LIBDIR=$TERMUX_PREFIX/lib/pkgconfig
@@ -462,10 +459,10 @@ termux_step_setup_toolchain() {
        # and no longer remove DT_RUNPATH in termux-elf-cleaner.
 
        if [ "$TERMUX_ARCH" = "arm" ]; then
-               CFLAGS+=" -march=armv7-a -mfpu=neon -mfloat-abi=softfp"
-               # "first flag instructs the linker to pick libgcc.a, libgcov.a, and
-               # crt*.o, which are tailored for armv7-a"
-               # - https://developer.android.com/ndk/guides/standalone_toolchain.html
+               # https://developer.android.com/ndk/guides/standalone_toolchain.html#abi_compatibility:
+               # "We recommend using the -mthumb compiler flag to force the generation of 16-bit Thumb-2 instructions".
+               # With r13 of the ndk ruby 2.4.0 segfaults when built on arm with clang without -mthumb.
+               CFLAGS+=" -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb"
                LDFLAGS+=" -march=armv7-a -Wl,--fix-cortex-a8"
        elif [ "$TERMUX_ARCH" = "i686" ]; then
                # From $NDK/docs/CPU-ARCH-ABIS.html:
@@ -821,7 +818,7 @@ termux_step_massage() {
        if [ -d include ] && [ -z "${TERMUX_PKG_NO_DEVELSPLIT}" ]; then
                # Add virtual -dev sub package if there are include files:
                local _DEVEL_SUBPACKAGE_FILE=$TERMUX_PKG_TMPDIR/${TERMUX_PKG_NAME}-dev.subpackage.sh
-               echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal $TERMUX_PKG_INCLUDE_IN_DEVPACKAGE\" > "$_DEVEL_SUBPACKAGE_FILE"
+               echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal lib/cmake $TERMUX_PKG_INCLUDE_IN_DEVPACKAGE\" > "$_DEVEL_SUBPACKAGE_FILE"
                echo "TERMUX_SUBPKG_DESCRIPTION=\"Development files for ${TERMUX_PKG_NAME}\"" >> "$_DEVEL_SUBPACKAGE_FILE"
                if [ -n "$TERMUX_PKG_DEVPACKAGE_DEPENDS" ]; then
                        echo "TERMUX_SUBPKG_DEPENDS=\"$TERMUX_PKG_NAME,$TERMUX_PKG_DEVPACKAGE_DEPENDS\"" >> $_DEVEL_SUBPACKAGE_FILE