From f4d0939e17e95216ff256f6d3687dbb1522b7f80 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sat, 23 Apr 2016 09:03:07 -0400 Subject: [PATCH] python: Build a working crypt module (closes #230) --- packages/python/build.sh | 4 ++-- packages/python/cryptmodule.c.patch | 11 +++++++++++ packages/python2/build.sh | 4 ++-- packages/python2/cryptmodule.c.patch | 11 +++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 packages/python/cryptmodule.c.patch create mode 100644 packages/python2/cryptmodule.c.patch diff --git a/packages/python/build.sh b/packages/python/build.sh index 8276d9f4e8..583fbebd47 100644 --- a/packages/python/build.sh +++ b/packages/python/build.sh @@ -4,12 +4,12 @@ TERMUX_PKG_DESCRIPTION="Python 3 programming language intended to enable clear p # openssl for ensurepip. # libbz2 for the bz2 module. # ncurses-ui-libs for the curses.panel module. -TERMUX_PKG_DEPENDS="libandroid-support, ncurses, readline, libffi, openssl, libutil, libbz2, liblzma, libsqlite, gdbm, ncurses-ui-libs" +TERMUX_PKG_DEPENDS="libandroid-support, ncurses, readline, libffi, openssl, libutil, libbz2, liblzma, libsqlite, gdbm, ncurses-ui-libs, libcrypt" TERMUX_PKG_HOSTBUILD=true _MAJOR_VERSION=3.5 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.1 -TERMUX_PKG_BUILD_REVISION=3 +TERMUX_PKG_BUILD_REVISION=4 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/cryptmodule.c.patch b/packages/python/cryptmodule.c.patch new file mode 100644 index 0000000000..6d60188ab0 --- /dev/null +++ b/packages/python/cryptmodule.c.patch @@ -0,0 +1,11 @@ +diff -u -r ../Python-3.5.1/Modules/_cryptmodule.c ./Modules/_cryptmodule.c +--- ../Python-3.5.1/Modules/_cryptmodule.c 2015-12-06 20:39:10.000000000 -0500 ++++ ./Modules/_cryptmodule.c 2016-04-23 08:11:35.832616854 -0400 +@@ -4,6 +4,7 @@ + #include "Python.h" + + #include ++#include + + /* Module crypt */ + diff --git a/packages/python2/build.sh b/packages/python2/build.sh index 9609ff71f7..655ca186dc 100644 --- a/packages/python2/build.sh +++ b/packages/python2/build.sh @@ -4,12 +4,12 @@ TERMUX_PKG_DESCRIPTION="Python 2 programming language intended to enable clear p # openssl for ensurepip. # libbz2 for the bz2 module. # ncurses-ui-libs for the curses.panel module. -TERMUX_PKG_DEPENDS="libandroid-support, ncurses, readline, libffi, openssl, libutil, libbz2, libsqlite, gdbm, ncurses-ui-libs" +TERMUX_PKG_DEPENDS="libandroid-support, ncurses, readline, libffi, openssl, libutil, libbz2, libsqlite, gdbm, ncurses-ui-libs, libcrypt" TERMUX_PKG_HOSTBUILD=true _MAJOR_VERSION=2.7 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.11 -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/cryptmodule.c.patch b/packages/python2/cryptmodule.c.patch new file mode 100644 index 0000000000..dc3e50291b --- /dev/null +++ b/packages/python2/cryptmodule.c.patch @@ -0,0 +1,11 @@ +diff -u -r ../Python-2.7.11/Modules/cryptmodule.c ./Modules/cryptmodule.c +--- ../Python-2.7.11/Modules/cryptmodule.c 2015-12-05 14:47:14.000000000 -0500 ++++ ./Modules/cryptmodule.c 2016-04-23 08:16:39.850613791 -0400 +@@ -4,6 +4,7 @@ + #include "Python.h" + + #include ++#include + + #ifdef __VMS + #include