Merge pull request #279 from michalbednarski/python-setinheritable
authorFredrik Fornwall <fredrik@fornwall.net>
Wed, 18 May 2016 23:39:37 +0000 (01:39 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Wed, 18 May 2016 23:39:37 +0000 (01:39 +0200)
python: Make os.set_inheritable work on sockets

28 files changed:
build-package.sh
ndk_patches/stdio.h.patch
packages/aria2/build.sh
packages/binutils/ldmain.c.patch [deleted file]
packages/clang/build.sh
packages/clang/tools-clang-lib-Driver-Tools.cpp.patch
packages/elfutils/build.sh
packages/gcc/build.sh
packages/gdbm/build.sh
packages/lftp/build.sh
packages/libandroid-support/build.sh
packages/libgnustl/build.sh
packages/libsqlite/build.sh
packages/libuv/build.sh
packages/libuv/pthread-sigmask.patch
packages/ltrace/build.sh [moved from disabled-packages/ltrace/build.sh with 95% similarity]
packages/ltrace/ltrace-elf.c.patch [moved from disabled-packages/ltrace/ltrace-elf.c.patch with 100% similarity]
packages/ltrace/sysdeps-linux-gnu-proc.c.patch [moved from disabled-packages/ltrace/sysdeps-linux-gnu-proc.c.patch with 100% similarity]
packages/make/default.c.patch.disabled [new file with mode: 0644]
packages/ndk-stl/build.sh
packages/nodejs/build.sh
packages/nodejs/lib-child_process.js.patch [new file with mode: 0644]
packages/nodejs/src-node_config.cc.patch [new file with mode: 0644]
packages/openssl/build.sh
packages/picolisp/build.sh
packages/python/build.sh
packages/python/mathmodule.c.patch [deleted file]
packages/ruby/configure.in.patch [new file with mode: 0644]

index 1cc958a..a19b8bb 100755 (executable)
@@ -80,7 +80,7 @@ if [ "$TERMUX_CLANG" = "" ]; then
        export CXX=$TERMUX_HOST_PLATFORM-g++
        _SPECSFLAG="-specs=$TERMUX_SCRIPTDIR/termux.spec"
 else
-       export AS=${TERMUX_HOST_PLATFORM}-clang
+       export AS=${TERMUX_HOST_PLATFORM}-gcc
        export CC=$TERMUX_HOST_PLATFORM-clang
        export CXX=$TERMUX_HOST_PLATFORM-clang++
        # TODO: clang does not have specs file, how to ensure pie
@@ -102,19 +102,11 @@ export CFLAGS="$_SPECSFLAG"
 export LDFLAGS="$_SPECSFLAG -L${TERMUX_PREFIX}/lib"
 
 if [ "$TERMUX_ARCH" = "arm" ]; then
-        # For hard support: http://blog.alexrp.com/2014/02/18/android-hard-float-support/
-        # "First, to utilize the hard float ABI, you must either compile every last component of your application
-        # as hard float (the -mhard-float GCC/Clang switch), or mark individual functions with the appropriate
-        # __attribute__ to indicate the desired ABI. For example, to mark a function so that it’s called with the
-        # soft float ABI, stick __attribute__((pcs("aapcs"))) on it.
-        # Note that the NDK will link to a libm which uses the aforementioned attribute on all of its functions.
-        # This means that if you use libm functions a lot, you’re not likely to get much of a boost in those places.
-        # The way to fix this is to add -mhard-float -D_NDK_MATH_NO_SOFTFP=1 to your GCC/Clang command line. Then
-        # add -lm_hard to your linker command line (or -Wl,-lm_hard if you just invoke GCC/Clang to link). This will
-        # make your application link statically to a libm compiled for the hard float ABI. The only downside of this
-        # is that your application will increase somewhat in size."
-       CFLAGS+=" -march=armv7-a -mfpu=neon -mhard-float -Wl,--no-warn-mismatch"
-       LDFLAGS+=" -march=armv7-a -Wl,--no-warn-mismatch"
+       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
+       LDFLAGS+=" -march=armv7-a -Wl,--fix-cortex-a8"
 elif [ $TERMUX_ARCH = "i686" ]; then
        # From $NDK/docs/CPU-ARCH-ABIS.html:
        CFLAGS+=" -march=i686 -msse3 -mstackrealign -mfpmath=sse"
index d8f6626..8dfed60 100644 (file)
@@ -6,7 +6,7 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
  #include <stddef.h>
  
 +#include <string.h>           /* For strcpy(3) used by ctermid() */
-+#include <asm-generic/fcntl.h> /* For O_RDWR and other O_* constants */
++#include <asm/fcntl.h>         /* For O_RDWR and other O_* constants */
 +#include <stdlib.h>            /* For arc4random() */
 +
  #define __need_NULL
index 4b97dfd..46743b3 100644 (file)
@@ -1,13 +1,12 @@
 TERMUX_PKG_HOMEPAGE=http://aria2.sourceforge.net/
 TERMUX_PKG_DESCRIPTION="Multi-protocol & multi-source command-line download utility supporting HTTP/HTTPS, FTP, BitTorrent and Metalink"
-TERMUX_PKG_VERSION=1.22.0
+TERMUX_PKG_VERSION=1.23.0
 TERMUX_PKG_SRCURL=https://github.com/tatsuhiro-t/aria2/releases/download/release-$TERMUX_PKG_VERSION/aria2-${TERMUX_PKG_VERSION}.tar.xz
 TERMUX_PKG_DEPENDS="c-ares, openssl, libxml2, libgnustl"
 # sqlite3 is only used for loading cookies from firefox or chrome:
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-openssl --without-gnutls --without-libuv --without-sqlite3 ac_cv_search_getaddrinfo=no ac_cv_func_getaddrinfo=yes ac_cv_func_gettimeofday=yes ac_cv_func_sleep=yes ac_cv_func_usleep=yes ac_cv_func_basename=yes"
 
 termux_step_pre_configure () {
-       export CXXFLAGS="$CXXFLAGS -lgnustl_shared"
        # Run autoreconf since we have patched Makefile.am:
        cd $TERMUX_PKG_SRCDIR
        autoreconf
diff --git a/packages/binutils/ldmain.c.patch b/packages/binutils/ldmain.c.patch
deleted file mode 100644 (file)
index 53cf466..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -u -r ../binutils-2.24/ld/ldmain.c ./ld/ldmain.c
---- ../binutils-2.24/ld/ldmain.c       2013-11-08 11:13:48.000000000 +0100
-+++ ./ld/ldmain.c      2014-06-18 08:16:53.945378483 +0200
-@@ -263,7 +263,13 @@
-   config.text_read_only = TRUE;
-   link_info.disable_target_specific_optimizations = -1;
--  command_line.warn_mismatch = TRUE;
-+  command_line.warn_mismatch =
-+#if defined(__ANDROID__) && defined(__arm__)
-+        /* --no-warn-mismatch is needed to suppress linker errors about not all functions using VFP register to pass arguments: */
-+        FALSE;
-+# else
-+        TRUE;
-+#endif
-   command_line.warn_search_mismatch = TRUE;
-   command_line.check_section_addresses = -1;
index e7fe3d2..5a3fb0b 100644 (file)
@@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://clang.llvm.org/
 TERMUX_PKG_DESCRIPTION="C and C++ frontend for the LLVM compiler"
 _PKG_MAJOR_VERSION=3.8
 TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0
-TERMUX_PKG_BUILD_REVISION=2
+TERMUX_PKG_BUILD_REVISION=3
 TERMUX_PKG_SRCURL=http://llvm.org/releases/${TERMUX_PKG_VERSION}/llvm-${TERMUX_PKG_VERSION}.src.tar.xz
 TERMUX_PKG_HOSTBUILD=true
 TERMUX_PKG_RM_AFTER_INSTALL="bin/macho-dump bin/bugpoint bin/llvm-tblgen lib/BugpointPasses.so lib/LLVMHello.so"
index bc83924..4ccaae3 100644 (file)
@@ -6,12 +6,12 @@ diff -u -r ../llvm-3.8.0.src/tools/clang/lib/Driver/Tools.cpp ./tools/clang/lib/
          break;
        case llvm::Triple::Android:
 -        ABI = (SubArch == 7) ? FloatABI::SoftFP : FloatABI::Soft;
-+        ABI = FloatABI::Hard;
++        ABI = FloatABI::SoftFP;
          break;
        default:
          // Assume "soft", but warn the user we are guessing.
 -        ABI = FloatABI::Soft;
-+        ABI = FloatABI::Hard;
++        ABI = FloatABI::SoftFP;
          if (Triple.getOS() != llvm::Triple::UnknownOS ||
              !Triple.isOSBinFormatMachO())
            D.Diag(diag::warn_drv_assuming_mfloat_abi_is) << "soft";
index 4ce1985..72050b4 100644 (file)
@@ -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 .
index 45ebc2e..442b48b 100755 (executable)
@@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://gcc.gnu.org/
 TERMUX_PKG_DESCRIPTION="GNU C compiler"
 TERMUX_PKG_DEPENDS="binutils, libgmp, libmpfr, libmpc, ndk-sysroot, libgcc, libisl, libgnustl"
 TERMUX_PKG_VERSION=6.1.0
-TERMUX_PKG_BUILD_REVISION=1
+TERMUX_PKG_BUILD_REVISION=2
 TERMUX_PKG_SRCURL=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-${TERMUX_PKG_VERSION}/gcc-${TERMUX_PKG_VERSION}.tar.bz2
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-languages=c,c++ --with-system-zlib --disable-multilib --disable-lto"
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --target=$TERMUX_HOST_PLATFORM"
@@ -16,7 +16,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-host-shared"
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-default-pie"
 
 if [ "$TERMUX_ARCH" = "arm" ]; then
-        TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-arch=armv7-a --with-fpu=neon --with-float=hard"
+        TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-arch=armv7-a --with-fpu=neon --with-float=softfp"
 elif [ "$TERMUX_ARCH" = "aarch64" ]; then
        TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-arch=armv8-a"
 elif [ "$TERMUX_ARCH" = "i686" ]; then
index fe75089..3c902f1 100644 (file)
@@ -1,4 +1,4 @@
 TERMUX_PKG_HOMEPAGE=http://www.gnu.org.ua/software/gdbm/
 TERMUX_PKG_DESCRIPTION="Library of database functions that use extensible hashing"
-TERMUX_PKG_VERSION=1.11
+TERMUX_PKG_VERSION=1.12
 TERMUX_PKG_SRCURL=ftp://ftp.gnu.org/gnu/gdbm/gdbm-${TERMUX_PKG_VERSION}.tar.gz
index ecddfc4..632a73e 100644 (file)
@@ -1,11 +1,12 @@
 TERMUX_PKG_HOMEPAGE=http://lftp.yar.ru/
 TERMUX_PKG_DESCRIPTION="FTP/HTTP client and file transfer program"
 TERMUX_PKG_VERSION=4.7.1
+TERMUX_PKG_BUILD_REVISION=1
 TERMUX_PKG_SRCURL=http://lftp.yar.ru/ftp/lftp-${TERMUX_PKG_VERSION}.tar.xz
 # (1) Android has dn_expand, but lftp assumes that dn_skipname then exists, which it does not on android.
 # (2) Use --with-openssl to use openssl instead of gnutls.
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_dn_expand=no --with-openssl --with-zlib=$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr --with-expat=$TERMUX_PREFIX"
-TERMUX_PKG_DEPENDS="libexpat, openssl, readline, libutil, libidn"
+TERMUX_PKG_DEPENDS="libexpat, openssl, readline, libutil, libidn, libgnustl"
 
 termux_step_pre_configure () {
        # We have patched an m4 file.
index ada9d5f..dab900e 100755 (executable)
@@ -1,7 +1,7 @@
 TERMUX_PKG_HOMEPAGE=https://developer.android.com/tools/sdk/ndk/index.html
 TERMUX_PKG_DESCRIPTION="Library extending the Android C library (Bionic) for additional multibyte, locale and math support"
 # Increase last digit each time a patch changes.
-TERMUX_PKG_VERSION=${TERMUX_NDK_VERSION}.8
+TERMUX_PKG_VERSION=${TERMUX_NDK_VERSION}.9
 TERMUX_PKG_BUILD_IN_SRC=yes
 TERMUX_PKG_ESSENTIAL=yes
 
index 360f28c..fdd0d9b 100644 (file)
@@ -1,13 +1,22 @@
 TERMUX_PKG_HOMEPAGE=http://gcc.gnu.org/onlinedocs/libstdc++/
 TERMUX_PKG_DESCRIPTION="The GNU Standard C++ Library (a.k.a. libstdc++-v3), necessary on android since the system libstdc++.so is stripped down"
 TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION
-TERMUX_PKG_BUILD_REVISION=3
+TERMUX_PKG_BUILD_REVISION=4
 
 termux_step_make_install () {
-        LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/libgnustl_shared.so
+        local LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/libgnustl_shared.so
        if [ $TERMUX_ARCH = arm ]; then
-               LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/armv7-a/hard/libgnustl_shared.so
+               LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/armv7-a/libgnustl_shared.so
        fi
 
        cp $LIBFILE $TERMUX_PREFIX/lib/
 }
+
+termux_step_post_massage () {
+       # Setup a libgnustl_shared.so in $PREFIX/lib, so that other C++ using packages
+       # links to it. We do however want to avoid installing this, to avoid problems
+       # where e.g. libm.so on some i686 devices links against libstdc++.so, so do
+       # this here in termux_step_post_massage.
+       cd $TERMUX_PREFIX/lib
+       ln -f -s libgnustl_shared.so libstdc++.so
+}
index ee6dac9..43c7f5e 100755 (executable)
@@ -1,5 +1,5 @@
 TERMUX_PKG_HOMEPAGE=http://www.sqlite.org/
 TERMUX_PKG_DESCRIPTION="Software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine"
-TERMUX_PKG_VERSION=3.12.2
-TERMUX_PKG_SRCURL=https://www.sqlite.org/2016/sqlite-autoconf-3120200.tar.gz
+TERMUX_PKG_VERSION=3.13.0
+TERMUX_PKG_SRCURL=https://www.sqlite.org/2016/sqlite-autoconf-3130000.tar.gz
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-readline"
index 20eb8a7..3705cff 100644 (file)
@@ -1,6 +1,6 @@
 TERMUX_PKG_HOMEPAGE=http://libuv.org
 TERMUX_PKG_DESCRIPTION="Support library with a focus on asynchronous I/O"
-TERMUX_PKG_VERSION=1.9.0
+TERMUX_PKG_VERSION=1.9.1
 TERMUX_PKG_SRCURL=http://dist.libuv.org/dist/v${TERMUX_PKG_VERSION}/libuv-v${TERMUX_PKG_VERSION}.tar.gz
 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-dtrace" # needed for building on mac
 
@@ -10,8 +10,3 @@ termux_step_pre_configure () {
        cd $TERMUX_PKG_SRCDIR
        sh autogen.sh
 }
-
-termux_step_post_make_install () {
-       # The installed include/uv-unix includes pthread-fixes.h inside ifdef __ANDROID__
-       cp $TERMUX_PKG_SRCDIR/include/pthread-fixes.h $TERMUX_PREFIX/include
-}
index cb06932..8fd5ac2 100644 (file)
@@ -1,57 +1,46 @@
-Remove no longer needed workaround which breaks node.js build.
-
-diff -u -r ../libuv-v1.7.3/include/pthread-fixes.h ./include/pthread-fixes.h
---- ../libuv-v1.7.3/include/pthread-fixes.h    2015-08-27 17:42:36.000000000 -0400
-+++ ./include/pthread-fixes.h  2015-09-08 17:31:47.658023853 -0400
-@@ -57,16 +57,4 @@
+diff -u -r ../libuv-v1.9.1/src/unix/internal.h ./src/unix/internal.h
+--- ../libuv-v1.9.1/src/unix/internal.h        2016-05-16 17:22:19.000000000 -0400
++++ ./src/unix/internal.h      2016-05-18 10:48:45.456553752 -0400
+@@ -55,14 +55,6 @@
+ # include <CoreServices/CoreServices.h>
+ #endif
  
- int pthread_yield(void);
--/* Workaround pthread_sigmask() returning EINVAL on versions < 4.1 by
-- * replacing all calls to pthread_sigmask with sigprocmask. See:
-- * https://android.googlesource.com/platform/bionic/+/9bf330b5
-- * https://code.google.com/p/android/issues/detail?id=15337
-- */
+-#if defined(__ANDROID__)
 -int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
--
--#ifdef pthread_sigmask
--#undef pthread_sigmask
+-# ifdef pthread_sigmask
+-# undef pthread_sigmask
+-# endif
+-# define pthread_sigmask(how, set, oldset) uv__pthread_sigmask(how, set, oldset)
 -#endif
--#define pthread_sigmask(how, set, oldset) uv__pthread_sigmask(how, set, oldset)
 -
- #endif  /* GOOGLE_BREAKPAD_COMMON_ANDROID_TESTING_PTHREAD_FIXES_H */
-diff -u -r ../libuv-v1.7.3/src/unix/pthread-fixes.c ./src/unix/pthread-fixes.c
---- ../libuv-v1.7.3/src/unix/pthread-fixes.c   2015-08-27 17:42:36.000000000 -0400
-+++ ./src/unix/pthread-fixes.c 2015-09-08 17:31:31.562244293 -0400
-@@ -29,31 +29,6 @@
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ #define ACCESS_ONCE(type, var)                                                \
+   (*(volatile type*) &(var))
  
--/* Android versions < 4.1 have a broken pthread_sigmask.
-- * Note that this block of code must come before any inclusion of
-- * pthread-fixes.h so that the real pthread_sigmask can be referenced.
-- * */
--#include <errno.h>
--#include <pthread.h>
--#include <signal.h>
+diff -u -r ../libuv-v1.9.1/src/unix/pthread-fixes.c ./src/unix/pthread-fixes.c
+--- ../libuv-v1.9.1/src/unix/pthread-fixes.c   2016-05-16 17:22:19.000000000 -0400
++++ ./src/unix/pthread-fixes.c 2016-05-18 10:47:54.209328719 -0400
+@@ -33,24 +33,3 @@
+ #include <errno.h>
+ #include <pthread.h>
+ #include <signal.h>
 -
 -int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset) {
 -  static int workaround;
+-  int err;
 -
 -  if (workaround) {
 -    return sigprocmask(how, set, oset);
--  } else if (pthread_sigmask(how, set, oset)) {
--    if (errno == EINVAL && sigprocmask(how, set, oset) == 0) {
--      workaround = 1;
--      return 0;
--    } else {
--      return -1;
--    }
 -  } else {
--    return 0;
+-    err = pthread_sigmask(how, set, oset);
+-    if (err) {
+-      if (err == EINVAL && sigprocmask(how, set, oset) == 0) {
+-        workaround = 1;
+-        return 0;
+-      } else {
+-        return -1;
+-      }
+-    }
 -  }
--}
 -
- /*Android doesn't provide pthread_barrier_t for now.*/
- #ifndef PTHREAD_BARRIER_SERIAL_THREAD
+-  return 0;
+-}
similarity index 95%
rename from disabled-packages/ltrace/build.sh
rename to packages/ltrace/build.sh
index 75f7983..364c264 100644 (file)
@@ -1,7 +1,7 @@
 TERMUX_PKG_HOMEPAGE=http://www.ltrace.org/
 TERMUX_PKG_DESCRIPTION="Tracks runtime library calls in dynamically linked programs"
 TERMUX_PKG_VERSION=0.7.3.20160411
-TERMUX_PKG_DEPENDS="elfutils"
+TERMUX_PKG_DEPENDS="elfutils, libgnustl"
 
 # TERMUX_PKG_SRCURL=http://www.ltrace.org/ltrace_${TERMUX_PKG_VERSION}.orig.tar.bz2
 # TERMUX_PKG_FOLDERNAME=ltrace-${TERMUX_PKG_VERSION}
diff --git a/packages/make/default.c.patch.disabled b/packages/make/default.c.patch.disabled
new file mode 100644 (file)
index 0000000..eb9f77f
--- /dev/null
@@ -0,0 +1,13 @@
+Disabled for now - enable if we want c++ as the default C++ compiler.
+diff -u -r ../make-4.1/default.c ./default.c
+--- ../make-4.1/default.c      2014-10-05 12:24:51.000000000 -0400
++++ ./default.c        2016-05-02 17:35:39.128123074 -0400
+@@ -447,7 +447,7 @@
+     "OBJC", "gcc",
+ #else
+     "CC", "cc",
+-    "CXX", "g++",
++    "CXX", "c++",
+     "OBJC", "cc",
+ #endif
index 33220ac..4811fc2 100644 (file)
@@ -5,13 +5,9 @@ TERMUX_PKG_DEPENDS="libgnustl"
 TERMUX_PKG_NO_DEVELSPLIT=yes
 
 termux_step_extract_into_massagedir () {
-        #mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/gcc/arm-linux-androideabi/4.9.0/include/
-        #cp -Rf $TERMUX_STANDALONE_TOOLCHAIN/include/c++/4.8/* $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/gcc/arm-linux-androideabi/4.9.0/include/
-       # Needed:
-        #cp $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/gcc/arm-linux-androideabi/4.9.0/include/arm-linux-androideabi/bits/* $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/gcc/arm-linux-androideabi/4.9.0/include/bits/
-        
         mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/
-        cp -Rf $TERMUX_STANDALONE_TOOLCHAIN/include/c++/4.9/* $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/
+       cp -Rf $TERMUX_STANDALONE_TOOLCHAIN/include/c++/4.9/* $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/
+
        if [ $TERMUX_ARCH = arm ]; then
                cp $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/arm-linux-androideabi/armv7-a/bits/* \
                   $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/bits
index c8f6bfa..ebcb470 100644 (file)
@@ -1,6 +1,6 @@
 TERMUX_PKG_HOMEPAGE=http://nodejs.org/
 TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
-TERMUX_PKG_VERSION=6.1.0
+TERMUX_PKG_VERSION=6.2.0
 TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz
 TERMUX_PKG_DEPENDS="openssl, libuv, libgnustl, c-ares"
 TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace"
@@ -35,5 +35,6 @@ termux_step_configure () {
                --dest-os=android \
                --shared-openssl --shared-zlib --shared-libuv --shared-cares \
                --without-snapshot \
+               --without-intl \
                $_EXTRA_CONFIGURE_ARGS
 }
diff --git a/packages/nodejs/lib-child_process.js.patch b/packages/nodejs/lib-child_process.js.patch
new file mode 100644 (file)
index 0000000..740e40c
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../node-v6.2.0/lib/child_process.js ./lib/child_process.js
+--- ../node-v6.2.0/lib/child_process.js        2016-05-17 15:53:06.000000000 -0400
++++ ./lib/child_process.js     2016-05-18 16:31:45.574685443 -0400
+@@ -335,7 +335,7 @@
+       if (typeof options.shell === 'string')
+         file = options.shell;
+       else if (process.platform === 'android')
+-        file = '/system/bin/sh';
++        file = '@TERMUX_PREFIX@/bin/sh';
+       else
+         file = '/bin/sh';
+       args = ['-c', command];
diff --git a/packages/nodejs/src-node_config.cc.patch b/packages/nodejs/src-node_config.cc.patch
new file mode 100644 (file)
index 0000000..325d24a
--- /dev/null
@@ -0,0 +1,15 @@
+Backport of https://github.com/nodejs/node/pull/6820
+
+diff -u -r ../node-v6.2.0/src/node_config.cc ./src/node_config.cc
+--- ../node-v6.2.0/src/node_config.cc  2016-05-17 15:53:07.000000000 -0400
++++ ./src/node_config.cc       2016-05-18 16:45:34.588991777 -0400
+@@ -29,8 +29,8 @@
+ void InitConfig(Local<Object> target,
+                 Local<Value> unused,
+                 Local<Context> context) {
+-#ifdef NODE_HAVE_I18N_SUPPORT
+   Environment* env = Environment::GetCurrent(context);
++#ifdef NODE_HAVE_I18N_SUPPORT
+   READONLY_BOOLEAN_PROPERTY("hasIntl");
index 4d426f2..22643b9 100755 (executable)
@@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.openssl.org/
 TERMUX_PKG_DESCRIPTION="Library implementing the SSL and TLS protocols as well as general purpose cryptography functions"
 TERMUX_PKG_DEPENDS="ca-certificates"
 TERMUX_PKG_VERSION=1.0.2h
+TERMUX_PKG_BUILD_REVISION=1
 TERMUX_PKG_SRCURL="http://www.openssl.org/source/openssl-${TERMUX_PKG_VERSION}.tar.gz"
 TERMUX_PKG_RM_AFTER_INSTALL="bin/c_rehash etc/ssl/misc"
 TERMUX_PKG_BUILD_IN_SRC=yes
index 2ddb9fa..83e641b 100644 (file)
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Lisp interpreter and application server framework"
 TERMUX_PKG_DEPENDS="libcrypt, openssl"
 _PICOLISP_YEAR=16
 _PICOLISP_MONTH=5
-_PICOLISP_DAY=8
+_PICOLISP_DAY=13
 TERMUX_PKG_VERSION=${_PICOLISP_YEAR}.${_PICOLISP_MONTH}.${_PICOLISP_DAY}
 TERMUX_PKG_SRCURL=http://software-lab.de/picoLisp.tgz
 TERMUX_PKG_FOLDERNAME=picoLisp
@@ -34,10 +34,10 @@ termux_step_make_install () {
        cd $TERMUX_PKG_SRCDIR/
 
        if [ $TERMUX_ARCH_BITS = "64" ]; then
-               $CC -pie -o ../bin/picolisp -rdynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.base.s -lc -lm -ldl
+               $AS -pie -o ../bin/picolisp -rdynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.base.s -lc -lm -ldl
                chmod +x ../bin/picolisp
-               $CC -pie -o ../lib/ext -shared -export-dynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.s
-               $CC --pie -o ../lib/ht -shared -export-dynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.s
+               $AS -pie -o ../lib/ext -shared -export-dynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.s
+               $AS --pie -o ../lib/ht -shared -export-dynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.s
        fi
 
        mkdir -p $TERMUX_PREFIX/share/man/man1
index 583fbeb..f037786 100644 (file)
@@ -9,7 +9,7 @@ TERMUX_PKG_HOSTBUILD=true
 
 _MAJOR_VERSION=3.5
 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.1
-TERMUX_PKG_BUILD_REVISION=4
+TERMUX_PKG_BUILD_REVISION=5
 TERMUX_PKG_SRCURL=http://www.python.org/ftp/python/${TERMUX_PKG_VERSION}/Python-${TERMUX_PKG_VERSION}.tar.xz
 
 # The flag --with(out)-pymalloc (disable/enable specialized mallocs) is enabled by default and causes m suffix versions of python.
diff --git a/packages/python/mathmodule.c.patch b/packages/python/mathmodule.c.patch
deleted file mode 100644 (file)
index 7f61140..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-The math module uses function pointers to math functions, which breaks
-using the system libm on ARM since we compile with -mhard-float.
-
-diff -u -r ../Python-3.4.3/Modules/mathmodule.c ./Modules/mathmodule.c
---- ../Python-3.4.3/Modules/mathmodule.c       2015-02-25 06:27:46.000000000 -0500
-+++ ./Modules/mathmodule.c     2015-04-29 16:50:52.895371496 -0400
-@@ -727,7 +727,7 @@
- */
- static PyObject *
--math_1_to_whatever(PyObject *arg, double (*func) (double),
-+math_1_to_whatever(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double),
-                    PyObject *(*from_double_func) (double),
-                    int can_overflow)
- {
-@@ -765,7 +765,7 @@
-    errno = ERANGE for overflow). */
- static PyObject *
--math_1a(PyObject *arg, double (*func) (double))
-+math_1a(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double))
- {
-     double x, r;
-     x = PyFloat_AsDouble(arg);
-@@ -808,19 +808,19 @@
- */
- static PyObject *
--math_1(PyObject *arg, double (*func) (double), int can_overflow)
-+math_1(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double), int can_overflow)
- {
-     return math_1_to_whatever(arg, func, PyFloat_FromDouble, can_overflow);
- }
- static PyObject *
--math_1_to_int(PyObject *arg, double (*func) (double), int can_overflow)
-+math_1_to_int(PyObject *arg, __NDK_FPABI_MATH__ double (*func) (double), int can_overflow)
- {
-     return math_1_to_whatever(arg, func, PyLong_FromDouble, can_overflow);
- }
- static PyObject *
--math_2(PyObject *args, double (*func) (double, double), char *funcname)
-+math_2(PyObject *args, __NDK_FPABI_MATH__ double (*func) (double, double), char *funcname)
- {
-     PyObject *ox, *oy;
-     double x, y, r;
diff --git a/packages/ruby/configure.in.patch b/packages/ruby/configure.in.patch
new file mode 100644 (file)
index 0000000..255ac9d
--- /dev/null
@@ -0,0 +1,25 @@
+Fix issues when compiling with clang (where cpp is provided by gcc
+in the standalone toolchain).
+
+diff -u -r ../ruby-2.3.1/configure.in ./configure.in
+--- ../ruby-2.3.1/configure.in 2016-04-24 13:44:40.000000000 -0400
++++ ./configure.in     2016-05-18 01:10:09.523385169 -0400
+@@ -799,7 +799,7 @@
+ rb_cv_warnflags="$warnflags"
+ if test "$GCC:${warnflags+set}:no" = yes::no; then
+     if test $gcc_major -ge 4; then
+-      extra_warning=-Werror=extra-tokens
++      extra_warning=
+     else
+       extra_warning=
+     fi
+@@ -813,9 +813,7 @@
+                -Werror=pointer-arith \
+                -Werror=write-strings \
+                -Werror=declaration-after-statement \
+-               -Werror=shorten-64-to-32 \
+                -Werror=implicit-function-declaration \
+-               -Werror=division-by-zero \
+                -Werror=deprecated-declarations \
+                -Wno-packed-bitfield-compat \
+                $extra_warning \