#!/bin/sh MAKEDEPS="make autoconf automake autoconf-archive sqlite3 expat bzip2 gdbm libffi libnsl libxcrypt openssl zlib grep" PKG_VER=3.10.7 SOURCE=https://www.python.org/ftp/python/$PKG_VER/Python-$PKG_VER.tgz DESC="The Python development environment" ADDITIONAL=" fix-xattrs-glibc.patch musl-find_library.patch " prepare () { apply_patches rm -r Modules/expat rm -r Modules/_ctypes/darwin* rm -r Modules/_ctypes/libffi* sed -i -e "s|-flto |-flto=4 |g" configure configure.ac GREP="/usr/bin/grep" autoreconf -fi } build () { GREP="/usr/bin/grep" ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --with-ensurepip=yes \ --enable-optimizations && make } package () { make DESTDIR=$PKG_DEST install ln -s /usr/bin/python3 $PKG_DEST/usr/bin/python ln -s /usr/bin/pip3 $PKG_DEST/usr/bin/pip }