From: Fredrik Fornwall Date: Wed, 21 Oct 2015 18:36:57 +0000 (-0400) Subject: Compile python as if link(2) is not available X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/termux-packages/commitdiff_plain/2df87e72e2db004a766676e66bf79170d094b293 Compile python as if link(2) is not available From Android 6.0 on hard links are not permitted, so remove link to force e.g. _vendor/lockfile/linklockfile.py to use other mechanisms. Fixes #29. --- diff --git a/packages/python/build.sh b/packages/python/build.sh index 70d780a2..510a2242 100644 --- a/packages/python/build.sh +++ b/packages/python/build.sh @@ -7,7 +7,7 @@ TERMUX_PKG_HOSTBUILD=true _MAJOR_VERSION=3.5 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.0 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_BUILD_REVISION=2 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. @@ -21,6 +21,8 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_faccessat=no" # The gethostbyname_r function does not exist on device libc: TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_gethostbyname_r=no" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --build=$TERMUX_HOST_TUPLE --disable-ipv6 --with-system-ffi --without-ensurepip" +# Hard links does not work on Android 6: +TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_linkat=no" TERMUX_PKG_RM_AFTER_INSTALL="lib/python${_MAJOR_VERSION}/test lib/python${_MAJOR_VERSION}/tkinter lib/python${_MAJOR_VERSION}/turtledemo lib/python${_MAJOR_VERSION}/idlelib bin/python${_MAJOR_VERSION}m bin/python*-config bin/idle* bin/pyvenv*" # Python does not use CPPFLAGS when building modules, so add this to CFLAGS as well (needed when building _cursesmodule): diff --git a/packages/python/configure.patch b/packages/python/configure.patch new file mode 100644 index 00000000..8ae0eb18 --- /dev/null +++ b/packages/python/configure.patch @@ -0,0 +1,12 @@ +diff -u -r ../Python-3.5.0/configure ./configure +--- ../Python-3.5.0/configure 2015-09-13 07:41:26.000000000 -0400 ++++ ./configure 2015-10-19 19:09:59.295440276 -0400 +@@ -10946,8 +10946,6 @@ + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + +-$as_echo "#define HAVE_LINK 1" >>confdefs.h +- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + else diff --git a/packages/python2/build.sh b/packages/python2/build.sh index 18c23aac..e345b2e9 100644 --- a/packages/python2/build.sh +++ b/packages/python2/build.sh @@ -8,7 +8,7 @@ TERMUX_PKG_HOSTBUILD=true _MAJOR_VERSION=2.7 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.10 -TERMUX_PKG_BUILD_REVISION=2 +TERMUX_PKG_BUILD_REVISION=3 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/python2/configure.patch b/packages/python2/configure.patch new file mode 100644 index 00000000..ec7a843c --- /dev/null +++ b/packages/python2/configure.patch @@ -0,0 +1,12 @@ +diff -u -r ../Python-2.7.10/configure ./configure +--- ../Python-2.7.10/configure 2015-05-23 12:09:25.000000000 -0400 ++++ ./configure 2015-10-20 09:54:55.481316335 -0400 +@@ -10310,7 +10310,7 @@ + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + +-$as_echo "#define HAVE_LINK 1" >>confdefs.h ++# $as_echo "#define HAVE_LINK 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; }