Files
BMLFS/build-scripts/python2.build
2020-10-23 14:19:24 -05:00

59 lines
2.0 KiB
Bash

#! /bin/bash
# Python 2
# Source: https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: Bluez, Valgrind, SQLite, Tk
patch -Np1 -i ../patches/python2-alpine/musl-find_library.patch
patch -Np1 -i ../patches/python2-alpine/unchecked-ioctl.patch
rm -r Modules/expat Modules/_ctypes/libffi* Modules/zlib &&
export OPT="$CFLAGS -DTHREAD_STACK_SIZE=0x100000" &&
./configure \
--prefix=/usr \
--enable-ipv6 \
--enable-optimizations \
--enable-shared \
--enable-unicode=ucs4 \
--with-system-expat \
--with-system-ffi \
--with-system-zlib \
--with-threads $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD install &&
unset OPT &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
python2: python 2 (object-oriented interpreted programming language)
python2:
python2: Python is an interpreted, interactive, object-oriented programming
python2: language that combines remarkable power with very clear syntax.
python2: Python's basic power can be extended with your own modules written in
python2: C or C++. Python is also adaptable as an extension language for
python2: existing applications.
python2:
python2:
python2:
python2:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/python2-2.7.18-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*